Joshua Posted April 10, 2014 Share Posted April 10, 2014 I have been working with the Terrain component in Leadwerks 3.0 outside of the Leadwerks Editor and I was wondering if anyone else has done any programming with the Terrain component in this manner. If so, I was wondering what might be the best way to go about manipulating the Terrain component. Possibly what the different methods in the terrain component do as well as the other components in the Terrain.h file. I am looking to render a 2-d array of Perlin Noise to a Texture object and then using this texture as a heightmap for the terrain. I have already incorporated libNoise into Leadwerks, I just have to write an interface for it to work with the Leadwerks Terrain component. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 11, 2014 Share Posted April 11, 2014 This isn't officially documented/supported, but you will have fun if you look at the header for the Heightfield class. 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...
Joshua Posted April 11, 2014 Author Share Posted April 11, 2014 Thank you Josh! I didn't even see the heightfield header in the dependencies list at first. I also noticed that if I try to create a Terrain component that is less than 64 units, my Leadwerks application crashes. Is this supposed to happen? Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 11, 2014 Share Posted April 11, 2014 I think 256 is a minimum, as the editor has this as the lowest option. Quote Link to comment Share on other sites More sharing options...
Joshua Posted April 11, 2014 Author Share Posted April 11, 2014 Very interesting because a Terrain size of 64 units works just fine. Just anything under 64 causes the application to crash. I was thinking that the Terrain Size dictated the surface area, however, it must just be the number of terrain patches along the outside of the Terrain. This is why a size of 64 works, because it has a surface area of 256. 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.