Discussion area flattening experiment - SUCCESS

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,907
Reaction score
204
Points
138
Location
Cape
I goes into modules/plugins. Rename it D3D9client_FLAT.dll then deactivate(uncheck) the original D3D9client and activate(check) D3D9client_flat.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
Ah yes, sorry! my fault. If I may, I am completely with you that 1 meter is more than enough as resolution but there will be tons of users that will complain that it doesn't work because they had put 0.34 centimeters difference... so if possible I'd switch it to float

Internally Orbiter uses an integer array, so having a float as height type won't do you any good, as the fracture precision will be gone eventually.

---------- Post added at 08:18 ---------- Previous post was at 08:15 ----------

Very good proof-of-concept! :thumbup:
One question (I haven't found time to check for myself):
Can the patches overlap? So a "ring" could be made with:
Code:
// ELLIPSE <height> <lng> <lat> <major> [<minor>] [<phi>] [<falloff>]
ELLIPSE -2000 -33.4375 +41.125 2500
ELLIPSE -3000 -33.4375 +41.125 2000

Yes, patches can overlap, as demonstrated by my example. The later overrides the former for the covered area.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,702
Reaction score
2,678
Points
203
Location
Dallas, TX
I guess I am doing it wrong:
1DLWXYO.jpg
but when I run the dg scn. I get a ctd and this:
Code:
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client_flat.dll ... [Build 190417, API 160828]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
            D3D9: 3D-Adapter.............. : AMD Radeon HD 8330
            D3D9: MaxTextureWidth......... : 16384
            D3D9: MaxTextureHeight........ : 16384
            D3D9: MaxTextureRepeat........ : 8192
            D3D9: VolTexAddressCaps....... : 0x3F
            D3D9: NumSimultaneousRTs...... : 4
            D3D9: VertexDeclCaps.......... : 0x3FF
            D3D9: MiscCaps................ : 0x3FCCF2
            D3D9: XNA Math Support........ : Yes
            D3D9: Vertex Texture.......... : Yes
            D3D9: Shadow Mapping.......... : Yes
            D3D9: D3DFMT_A16B16G16R16F.... : Yes
            D3D9: D3DFMT_A32B32G32R32F.... : Yes
            D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
            D3D9: D3DFMT_A2R10G10B10...... : Yes
            D3D9: D3DFMT_L8............... : Yes
            D3D9: D3DDTCAPS_DEC3N......... : Yes
            D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
            D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
            D3D9: Runs under WINE......... : No
            D3D9: Available Texture Memory : 4095 MB
000000.000: D3D9: [3DDevice Initialized]
D3D9: ERROR: D3D9Surface.cpp Line:2045 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/CKBlit.fx)
D3D9: ERROR: D3D9Pad.cpp Line:87 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/Sketchpad.fx)
D3D9: ERROR: D3D9Effect.cpp Line:341 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER|D3DXSHADER_PREFER_FLOW_CONTROL, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/D3D9Client.fx)
D3D9: ERROR: PlanetRenderer.cpp Line:193 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, 0, 0, &pShader, &errors)
D3D9: ERROR: Failed to create an Effect (Modules\D3D9Client\Surface.fx)
D3D9: ERROR: Scene.cpp Line:2997 Error:-2147024770 D3DXCreateEffectFromFile(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/SceneTech.fx)
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
I guess I am doing it wrong:
1DLWXYO.jpg
but when I run the dg scn. I get a ctd and this:
Code:
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client_flat.dll ... [Build 190417, API 160828]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
            D3D9: 3D-Adapter.............. : AMD Radeon HD 8330
            D3D9: MaxTextureWidth......... : 16384
            D3D9: MaxTextureHeight........ : 16384
            D3D9: MaxTextureRepeat........ : 8192
            D3D9: VolTexAddressCaps....... : 0x3F
            D3D9: NumSimultaneousRTs...... : 4
            D3D9: VertexDeclCaps.......... : 0x3FF
            D3D9: MiscCaps................ : 0x3FCCF2
            D3D9: XNA Math Support........ : Yes
            D3D9: Vertex Texture.......... : Yes
            D3D9: Shadow Mapping.......... : Yes
            D3D9: D3DFMT_A16B16G16R16F.... : Yes
            D3D9: D3DFMT_A32B32G32R32F.... : Yes
            D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
            D3D9: D3DFMT_A2R10G10B10...... : Yes
            D3D9: D3DFMT_L8............... : Yes
            D3D9: D3DDTCAPS_DEC3N......... : Yes
            D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
            D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
            D3D9: Runs under WINE......... : No
            D3D9: Available Texture Memory : 4095 MB
000000.000: D3D9: [3DDevice Initialized]
D3D9: ERROR: D3D9Surface.cpp Line:2045 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/CKBlit.fx)
D3D9: ERROR: D3D9Pad.cpp Line:87 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/Sketchpad.fx)
D3D9: ERROR: D3D9Effect.cpp Line:341 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER|D3DXSHADER_PREFER_FLOW_CONTROL, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/D3D9Client.fx)
D3D9: ERROR: PlanetRenderer.cpp Line:193 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, 0, 0, &pShader, &errors)
D3D9: ERROR: Failed to create an Effect (Modules\D3D9Client\Surface.fx)
D3D9: ERROR: Scene.cpp Line:2997 Error:-2147024770 D3DXCreateEffectFromFile(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/SceneTech.fx)

No clue on those errors. Just keep in mind that it is only for stock Orbiter and a replacement for the 2016 version of the 3.8 D3D9Client. I guess it won't work with anything else.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Couldn't resist...
Code:
ELLIPSE -2700 -32.6  +41.5  2500
ELLIPSE -2600 -32.6  +41.5  1700
ELLIPSE -2700 -32.6  +41.5  1500
RECT    -2700 -32.6  +41.47 3400 2400
ELLIPSE -2600 -32.55 +41.46 250
ELLIPSE -2600 -32.65 +41.46 250
...seems like some digger had fun outside of Brighton Beach
 

Attachments

  • CurrentState.jpg
    CurrentState.jpg
    32.4 KB · Views: 44

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,702
Reaction score
2,678
Points
203
Location
Dallas, TX
Funny. Not sure why I wasn't able to get it to work for me:(
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
Couldn't resist...
Code:
ELLIPSE -2700 -32.6  +41.5  2500
ELLIPSE -2600 -32.6  +41.5  1700
ELLIPSE -2700 -32.6  +41.5  1500
RECT    -2700 -32.6  +41.47 3400 2400
ELLIPSE -2600 -32.55 +41.46 250
ELLIPSE -2600 -32.65 +41.46 250
...seems like some digger had fun outside of Brighton Beach

ahahah this should be the new D3D9 splash screen :lol:
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Funny. Not sure why I wasn't able to get it to work for me:(
- Maybe placed wrong (belongs in Textures/Moon/Flat/)
- Maybe wrong extension (should be .flt)
- Maybe not looking at the right spot? (Scenario:
Code:
BEGIN_DESC
...seems like some digger had fun outside of Brighton Beach
END_DESC

BEGIN_ENVIRONMENT
  System Sol
  Date MJD 58591.3831487852
END_ENVIRONMENT

BEGIN_FOCUS
  Ship GL-NT
END_FOCUS

BEGIN_CAMERA
  TARGET GL-NT
  MODE Extern
  POS 691.333343 -112.430705 -29.997748
  TRACKMODE TargetRelative
  FOV 50.00
END_CAMERA

BEGIN_HUD
  TYPE Surface
END_HUD

BEGIN_MFD Left
  TYPE Launch
  NAV 0
END_MFD

BEGIN_MFD Right
  TYPE Map
  REF Moon
  POS 0.00 0.00
END_MFD

BEGIN_SHIPS
GL-NT:DeltaGlider
  STATUS Landed Moon
  POS -32.6000000 41.5000000
  HEADING 70.00
  ALT 2.553
  AROT 15.719 -18.432 41.655
  AFCMODE 7
  PRPLEVEL 0:1.000000 1:1.000000
  NAVFREQ 0 0 0 0
  XPDR 0
  HOVERHOLD 0 1 0.0000e+000 0.0000e+000
  GEAR 1.0000 0.0000
  AAP 0:0 0:0 0:0
END
END_SHIPS
)
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,702
Reaction score
2,678
Points
203
Location
Dallas, TX
No. I followed Donamy :
download the link and saved in folder. Renamed D3d9Client_flat. put in Plugins folder.

OPen Orbiter and selected D3d9 clint_flat and deactive d3d9 client.

Ran the DG scn. First run said no graphics and ran again started to load and then CTd. Posted log.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,702
Reaction score
2,678
Points
203
Location
Dallas, TX
Thanks. I will see what I got I thought I had the latest.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
@Face: I believe that you build the GC with Visual Studio 2008; Did the provided scenario- & project-files work?
I'm asking because I migrated those "old" project files blindly without having a chance to really test 'em.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
@Face: I believe that you build the GC with Visual Studio 2008; Did the provided scenario- & project-files work?
I'm asking because I migrated those "old" project files blindly without having a chance to really test 'em.

No, I'm building it with 2015. I had to modify the toolset IIRC. The other solutions did not work for me, but TBH I did not try hard to make them work.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Thanks for the feedback.

I can imagine you had to remove the "_xp" part from the PlatformToolset...
Code:
    <PlatformToolset>v140_xp</PlatformToolset>
    // ... to ...
    <PlatformToolset>v140</PlatformToolset>
The XP builds will come to an end with VS2019 anyway, even VS2017 starts to warn about that being deprecated:
warning MSB8051: Support for targeting Windows XP is deprecated and will not be present in future releases of Visual Studio. Please see https://docs.microsoft.com/en-us/cpp/porting/features-deprecated-in-visual-studio?view=vs-2017 for more information.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,702
Reaction score
2,678
Points
203
Location
Dallas, TX
So Now that I got 3.8 working. I switched to the flat d3d9 and ran the dg at Canaveral and it looked the same. Do I need to do more?
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
So Now that I got 3.8 working. I switched to the flat d3d9 and ran the dg at Canaveral and it looked the same. Do I need to do more?

You need to define *.flt files in /Textures/<planet>/Flat with the appropriate lines in it to see something.

E.g. you can put this into a Textures/Earth/Flat/test.flt file to see some freaky Canaveral plateau:
Code:
Ellipse 300 -80.65165 +28.58438 1500 1500 0 40
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,702
Reaction score
2,678
Points
203
Location
Dallas, TX
It is weird that the shadow of the untouched area are high.

fdcx8LB.jpg

7FDvdbK.jpg


I wonder if the launch pad at 39a/b could be made.
 
Top