Jump to content

Terrain max height and procedural roads


Rastar
 Share

Recommended Posts

Hi,

 

newbie question(s):

 

1) I have a height map from World Machine which covers a rather large terrain both in size and height. I actually need to scale it to a maximum height > 1000 (which seems to be the limit according to the ceiling parameter). How can I do that? In the editor? Via C++? And if via C++: Can I save the scaled terrain/project again (couldn't find an API call for that)?

 

2) Is there a way to generate a road programmatically? My terrain is real-world based and I would like to generate the (initial) placement of roads according to real routes that you can get from OpenStreetMap or the like. Is that possible?

 

Thanks so much!

Link to comment
Share on other sites

on 2) Some of the road node data is currently stored in some binary format in the sbx file by the editor ( I cursed Josh when I saw this as it completely screwed up my sbx file parsing routine at the time lol). Presumably if Josh is prepared to divulge the format then it would be quite possible to procedurally output this data.

 

or ... as Chris suggests above, feed the shader directly

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Thanks. Well, I've never looked at a shader before... But quickly looking at terrain.frag, it should be possible to scale the altitude (though the question is why is there a limit in the editor in the first place). And what that might do to physics is indeed an interesting question...

 

As for the roads: Adding additional nodes in the sbx might be an option, if indeed it was possible to generate those binary metadata.

Link to comment
Share on other sites

Well,

 

it seems to work if I modify the terrainaltitude in the sbx: The terrain looks larger in the editor (though ceiling and altitude are still at 1000), and the value is preserved even if I save the project again. Of course, I still have to see if it really works.

 

Regarding roads - by looking at the Lua script, I think I might come up with a solution that fits my needs. Is the binary data in the sbx just the roadmesh, serialized by the call to Save(stream)?

 

I have a different road question, though: If I use the "Align terrain to roads" button in the toolbar, my road gets very bumpy. I was expecting the terrain heightmap to be modified, but instead it seems the road aligns to the terrain... Did I misinterpret something?

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...