Jump to content

How to enable Fit to Terrain


klepto2
 Share

Recommended Posts

Hi,

 

The problem:

I have a nice terrain with a nice colormap. I have created a sbx file with this terrain, the colormap with setting "Fit to Terrain" enabled.

In the editor it looks really nice but using Loadscene on the sbx file just shows the texture tiled and not streched over the terrain.

 

Any idea how to enable this? Or is it a bug or thing which is missing?

 

thx in advance

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

yeah using the SetTerrainTextureScale after the scene is loaded would prevent the vegetation coloring from working because its already set by the original size of the terrain texture...

 

a hack way to get around that for the moment until Josh fixes this bug/omission is to manually edit the SBX file before running your program. Remember to remove SetTerrainTextureScale from your program if you do it this way.

 

Just open up the SBX in notepad and edit the texturescale# of the particular texture# in question to match the resolution...

for example:

Terrain {
altitude=100.000000
resolution=1024
meterspertile=2.00000000
hiddentiles=0

texture0="terrain_desert_rockwall.dds"
bumpmap0="terrain_desert_rockwalldot3.dds"
texturefit0=1
texturescale0=1.000

becomes:

Terrain {
altitude=100.000000
resolution=1024
meterspertile=2.00000000
hiddentiles=0

texture0="terrain_desert_rockwall.dds"
bumpmap0="terrain_desert_rockwalldot3.dds"
texturefit0=1
texturescale0=1024

 

and then run your program and the scale and vegetation coloring should work. Its a hack until Josh fixes it, but it works.

 

--edit- it actually may need to be set to resolution X meterspertile... so in this case, 1024 X 2 = 2048... its hard to tell with the textures i have...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...