Rastar Posted January 15, 2013 Share Posted January 15, 2013 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! Quote Link to comment Share on other sites More sharing options...
ChrisMAN Posted January 15, 2013 Share Posted January 15, 2013 1) For hacking the height... total bs answer. Check the terrain shader, you might be able to throw a multiplier in there. I don't know how that will affect physics or things like GetTerrainHeight. 2) Check the shader. There has to be a way to give it what it wants. Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 15, 2013 Share Posted January 15, 2013 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 Quote 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 More sharing options...
Rastar Posted January 15, 2013 Author Share Posted January 15, 2013 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 16, 2013 Share Posted January 16, 2013 You probably could modify the terrain height in the SBX file (just open it in NotePad) and it would probably work just fine...probably. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rastar Posted January 16, 2013 Author Share Posted January 16, 2013 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.