• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v3 Matching photo-real ground textures to a 3D terrain model

Messages
310
Country
us-washington
Hi Guys,

This one has me stumped. The goal is to have a perfect match between the ground surface texture of my large SU model and the adjacent photo-real ground texture compiled with SBuilder. I've managed fairly well in FSX, but in P3D v3 the lighting on the PR vs the model changes dramatically with the time of day. If I use the time preview slider I can find an hour interval or two when the match is good, but the rest of the time one is too dark and one is too light, then vice versa. None of the lighting options in P3D seemed to affect this problem. Maybe I missed something, but I don't find any MCX settings that might be of help. Any suggestions? (Besides the time of day issue there is the seasonal issue, but I think I've got a handle on that.)
 
SBuilderX does not compile, it calls an external compiler, which, I believe, is exactly what MCX does. You might check your paths, my SBX defaults to the tools folder where a '07 vintage resample.exe compiles my PR's (photo reals) into .bgl's. However, browsing my P3D SDK, I find one dated 8/10/2012, maybe they changed some things..
There is no way to get at the material properties of a ground .bgl using the MCX interface that I can find and overall I have found it pretty hard to decompile ground .bgl's. You might be able to get at this information at a more fundamental level, but I think your best bet is to make your editable model match the properties of the ground .bgl, or explore compiling the satellite images as a ground polygon. The developers of Aerosoft Kamchatka and whoever did Kilimanjaro had to confront this same issue because both feature very large models of volcanoes that blend with "PR" ground, so you might explore that.
Since it is a light changing issue, a specular texture for your model might be editable to match the ground .bgl.
 
Rob, I think the problem lies in what you are trying to do. It would be extremely difficult to make the PR texture shading match the texture shading of the SU model, since I think FS treats them differently.

May I ask, is there a reason why your SU model must have it's own ground textures? I'd just let the PR take care of that.
 
Hello:

I believe it would help to clarify what type of "ground" scenery object is being output by MCX with photo textures mapped onto the (imported) Sketchup 3D model : :scratchch


* 3D scenery object exported as a MDL via FSX / P3D SDK X2MDL and placed AGL as a scenery library object via a FSX / P3D SDK BGLComp XML-type BGL

...or:

* sloped terrain flatten BGL compiled via FSX / P3D SDK Resample

...or:

* Ground Polygon (aka "G-Poly") flat 3D planar object compiled and placed AGL via SCASM / ASM as a legacy FS2002-format BGL using the MCX 'Ground Polygon Wizard'


GaryGB
 
Last edited:
Thanks guys,

Rick's idea of trying the P3D version of resample.exe is worth a shot. From what I understand from another source, using certain REX textures can make this problem (mis-matching based on time of day) a lot worse.

As to why I make the model that includes the ground surface, maybe I can just describe one example; the Swartz Bay ferry terminal in the PNW. It's located on steep complex slopes as represented in the sim where no combination of flattens, sloped or not, would work. See the screen clips.

So I make an SU model using the 'show terrain feature' to include the waterfront and the terminal area. It gets greatly simplified, and I have a way of adjusting the ground surface of the model to exactly match the terrain in the sim at the margins of the model. By default, SU shows a fairly low resolution Google Earth snapshot on the model. I only use this image for alignment of a higher res substitute.

In some cases the terminal model abuts Orbx PNW landclass. That's not the issue here.

In other cases I've extended the scenery coverage area with PR when the locale almost forces the addition to avoid having things look just plain wrong. The raw texture for both the SU model and the PR comes from SBuilder X where I 'add map' using the highest resolution I can import. It's easier to throw away resolution later if not needed rather than add it. I save the resulting .bmp as .psd, adjust the colors based on a formula that works for me, mostly using the camera raw filter. A portion of this raw .psd gets copied and resized and is used for the SU model ground surface.

In SBX, I make a map at the desired LOD covering the area needed. I save the resulting .bmp as .psd and add a new layer made from the raw high res texture, resizing the import to match. For use in SBbuilder X, this gets periodically saved as .bmp, overwriting the original. So at this point the PR and the SU model use the same tuned up image for the ground surface. To improve the match in the sim I use various adjustment layers in PS. I can create a near perfect match all times of day, all seasons in FSX... but not P3D v3 .. that's the problem.

Hope it's clear what I'm doing.
 

Attachments

  • swartz bay.JPG
    swartz bay.JPG
    229.2 KB · Views: 660
  • swartz bay2.JPG
    swartz bay2.JPG
    245.6 KB · Views: 720
Hi Larry:

IIUC, your work-flow above describes using a 3D model textured with photo-real textures ...as identified in my post above:

http://www.fsdeveloper.com/forum/th...res-to-a-3d-terrain-model.436776/#post-738323

Hello:

I believe it would help to clarify what type of "ground" scenery object is being output by MCX with photo textures mapped onto a (imported) Sketchup 3D model : :scratchch


* 3D scenery object exported as a MDL via FSX / P3D SDK X2MDL and placed AGL as a scenery library object via a FSX / P3D SDK BGLComp XML-type BGL

BTW: Do you attach a hardened concrete attribute "Platform" to make the terminal area navigable by AI / user-controlled SimObjects on the ground surface ? :scratchch


If you do not require extremely high resolution ground textures draped onto the terrain at your terminal (where you will need to be relatively close to the ground and/or while navigating on land or water in order to see such textures), it may be more practical to simply use custom terrain mesh with- or without- a super-imposed "sloped flatten" ...textured with custom photo-real aerial imagery via a FS SDK Resample work-flow.

If you do require extremely high resolution ground textures draped onto the terrain at your terminal (where you will need to be relatively close to the ground and/or while navigating on land or water in order to see such textures), it may be more practical to use G-Polys ...textured with custom photo-real aerial imagery via a 3D model > MCX > G-Poly wizard work-flow.

http://www.scenerydesign.org/?s=Ground+Polygon+Wizard&submit=Search

...and an interesting even if obscure set of caveats and considerations inherited from older legacy SCASM coding:

http://viditelnykocour.inet-box.cz/viditelny_kocour/scenery/WHITEPAPER/html/poly1.htm


Note that MCX' SCASM-coded G-Polys have limited options for materials, so one is most likely only able to edit the visual RGB equivalent of the "Diffuse" texture image:

SCASM-coded Ground Polygons using LayerCall command and DrawTriList to create textured triangles does not encode a Normal vector, unlike VertexList( ...which utilizes:

"Floating Point and nx, nz, ny components of a so called normal vector

The alternate input format is:

p <elevation angle> <heading angle>
This vector is used for color shading.
"

http://www.scasm.de/doc/sca_cmd2.htm#lcal

http://www.scasm.de/doc/sca_cmd5.htm#matls



FYI: SBuilder v2.05x for FS8 / FS9 has a method of making legacy format Vector Textured Polygons (aka "VTP") Ground Polygons as well:

http://www.fsdeveloper.com/forum/threads/vtp-polys-photo-and-groundmaker.1834/#post-10502

http://www.ptsim.com/forum/viewtopic.php?p=1281



Another option is available via MCX to convert your 3D terrain model to a "sloped flatten" if you also first accurately Geo-reference it in MCX: :wizard:

http://www.scenerydesign.org/2013/04/flattens-from-3d-objects/


You can then simply use the FTX PNW custom terrain mesh with that "sloped terrain flatten" super-imposed on local terrain mesh for the terminal area ...textured with custom photo-real aerial imagery via a FS SDK Resample work-flow. :idea:



PS: Some additional pertinent considerations:

http://www.fsdeveloper.com/forum/threads/can-ade-polygons-be-used-for-a-sloped-runway.435624/


Hope these ideas help with evaluating your options ! :)

GaryGB
 
Last edited:
Thanks for these references Gary. It's easy to get stuck doing things one way. I checked out the MCX ground poly wizard, just ran my current model through it. It won't be helpful in this instance, but maybe others.

The idea of making a collection of sloped flattens from an SU model imported into MCX sounds cool. But it was not clear to me how it blends with the existing terrain mesh at the margins. How is that done? If it's not too hard, perhaps a fairly large area could be reshaped.

I've been hardening the car deck and upper deck of my AI ferries so you can ride along with a SimObject like Orbx Bob for a while now.

What's funny is making a mistake controlling the P3D avatar and have him go over the side from the top deck of the ferry, flailing his arms until he makes a big splash.:) And I've promised to start hardening the whole ferry terminals rather than just the helipads… I guess the heli pilots want to land wherever there is an open spot.:scratchch

Oh, yes, I tried Rick's idea of using the latest resample.exe from the P3D v3 SDK. When it runs, the header still says MS FSX SP2; It does not look like it's been changed.
 
Oh, yes, I tried Rick's idea of using the latest resample.exe from the P3D v3 SDK. When it runs, the header still says MS FSX SP2; It does not look like it's been changed.
Because they didn't edit the message..? In '07 resample was 503 kb and in 2012 it is 494 kb - clearly changed.
 
The idea of making a collection of sloped flattens from an SU model imported into MCX sounds cool. But it was not clear to me how it blends with the existing terrain mesh at the margins. How is that done? If it's not too hard < complicated ? >, perhaps a fairly large area could be reshaped.

If you have decided to use the surrounding/underlying FTX custom terrain mesh as the base onto which you will place your custom sloped terrain flatten, the altitudes for those terrain vertices will be your reference for where to set the elevation of the vertices in the outer perimeter of your custom sloped terrain flatten polygon (actually a Triangulated Irregular Network aka "TIN").


After MCX outputs your custom sloped terrain flatten BGL, you can import that BGL file into Terrain Sculptor by Don Grovestine (aka "gadgets"), which will then internally be able to decompile that CVX vector BGL with the CVX-Extractor utility by Patrick Germain, and instead perform a "semi-automated" update of Altitude matching for those outer perimeter vertices (IIUC, by sampling slewed terrain mesh "ground" elevation at those quad mesh vertex aka "QMV" grid coordinate offsets from within a concurrent FS task session):

http://www.fsdeveloper.com/forum/threads/development-release-1-2-00-available.434575/
http://www.fsdeveloper.com/forum/forums/terrain-sculptor.146/




Alternatively, after MCX outputs your custom sloped terrain flatten BGL, you can manually decompile that CVX vector BGL with CVX-Extractor utility by Patrick Germain:

http://www.fsdeveloper.com/forum/threads/cvxextractor-exporting-vector-data.432918/


CVX-Extractor can then output a ESRI-SHP file for your custom sloped terrain flatten.


When that SHP file is 'Appended' to a project in SBuilderX, one can (manually) select each individual vertex to set the elevation of those vertices in the outer perimeter of your custom sloped terrain flatten polygon (IIUC, by sampling slewed terrain mesh "ground" elevation at those quad mesh vertex aka "QMV" grid coordinate offsets from within a concurrent FS task session), thus reading / writing the FS user aircraft position "ground" Altitude MSL from the surrounding/underlying FTX custom terrain mesh via FSUIPC, so that the assigned elevations match that of the FTX terrain mesh, and your final ground surface "blend" in FS / P3D at run time is visibly 'seamless'.


SBuilderX captures altitude data for a sloped terrain flatten polygon point from aircraft position via the "Point From Aircraft" context menu option:

1.) Select a vertex in the outer perimeter of your custom sloped terrain flatten polygon

2.) Right-click > Fly aircraft here

3.) Right-click > Point from aircraft

4.) Repeat for each individual vertex to set the elevation of those vertices in the outer perimeter of your custom sloped terrain flatten polygon ...to match that of the surrounding/underlying FTX custom terrain mesh, so when the elevations of your polygon vertices match those of the mesh, your surface "blend" is seamless.

[EDITED]

FSUIPC is used by SBuilderX and most other FS utilities to read the FS internal value for ground surface elevation directly below the user aircraft.

Rhumbaflappy's Terrain Calculator X (aka "TCalcX") version 3 is sometimes used to report on-screen the ground surface elevation and a few other values, and AFAIK is also used to insert those values into SBuilderX via "Point from Aircraft".

http://www.ptsim.com/forum/viewtopic.php?p=6226

http://www.fsdeveloper.com/forum/resources/tcalcx.93/


NOTE: The compiled executable TCalcX_003.exe is in the un-ZIP-ped folder path:

[path]\81712-TCalcX_003_source\TCalcX_003_source\TCalcX_003\bin\x86\Release\TCalcX_003.exe


IIRC, the method I recently described in another thread using SBuilderX for deriving elevation from the user aircraft coordinate Lat-Lon position actually inserts the ground surface elevation into a terrain poly vertex point rather than the aircraft flight Altitude AGL or MSL (...and AFAIK ADE9X does the same).

http://www.fsdeveloper.com/forum/th...ground-textures-to-a-3d-terrain-model.436776/


It has been a while since I used that feature in SBuilderX, so I don't recall if that process actually requires one to force and keep the FinneyGround CrossHairs Plus (aka "CH+") on-ground first via the F1 key in FS slew mode, as I instead personally use that excellent "CH+" aircraft scenery tool all the time via a proprietary executable utility which manually or semi-automatically also derives and logs the aircraft flight and ground surface altitude, Geographic coordinates, True heading and Magnetic variation, as well as various other FS internal values from FSUIPC offsets, and converts them to 13 decimal place floating point numbers.

[END_EDIT]


I've been hardening the car deck and upper deck of my AI ferries so you can ride along with a SimObject like Orbx Bob for a while now.

What's funny is making a mistake controlling the P3D avatar and have him go over the side from the top deck of the ferry, flailing his arms until he makes a big splash.:)

I'd like to see a video of that (it might motivate me to not wait even longer for LM to get more fixes into P3Dv3x before I acquire that current working version) ! :D

GaryGB
 
Last edited:
Thanks for all of this Gary. I may not use it right now, but I copied it all and put it in my 'how to' file. Don's TS looks like it can be very handy!

Maybe I can mention my currently preferred method where I match the model to the terrain rather than the terrain to the model. It's really very simple. In SU, I attach multiple copies of a temporary scale (as a component) vertically all around the margin of the model. I make them all a group so they do not weld themselves to the model and it's easy to delete them when they are not needed. Once I have the final position of the model in the sim with the required flatten under it, in the sim I read each scale in succession noting where it intersects the sim terrain mesh. That gives me the exact adjustment needed and it can be as accurate as I want, down to the inch if need be, like when matching roads and avoiding flickering. It's also quick using ThomThom's Vertex Tools.
 
This is a very interesting topic. I cannot find the way either. The problem is the same with the tunnel under the taxiway, especially that part of taxiway include the terrain (grass, hill). It is very difficult to make it match with the rest of the taxiway made by ground poly.
 
Back
Top