Rick Posted December 11, 2011 Share Posted December 11, 2011 Is there a function to get the terrain resolution? Not seeing one but never know sometimes with LE If not what are the work arounds for getting it? Quote Link to comment Share on other sites More sharing options...
Roland Posted December 11, 2011 Share Posted December 11, 2011 its in the sbx file Terrain { altitude=500.000000 resolution=2048 meterspertile=2.00000000 hiddentiles=0 ... ... ... Have not tried it but maybe with GetEnitityKey( terrainEnt, "resolution", "" ) if you get hold of the terrain entity. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
macklebee Posted December 11, 2011 Share Posted December 11, 2011 in lua and bmax you can get it as terrain.resolution... since that probably doesn't exist for c/c++ you probably have to use what roland is suggesting... Quote 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 More sharing options...
Rick Posted December 11, 2011 Author Share Posted December 11, 2011 Cool, doing this in Lua so I'll use terrain.resolution. Thanks guys. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 15, 2011 Author Share Posted December 15, 2011 When I output the value of terrain.resolution for a 128x128 with 1 meter per tile I get 82309936. When I'm generating my grid I'm looping through the entire terrain and so for a 128x128 1 meter per tile I setup my loop from 64 to -64 stepping by -1. What is the relationship between 82309936 and 128x128 1 meter per tile in such that I can get the x & z values of the corners of the terrain? Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 16, 2011 Share Posted December 16, 2011 what version are you using? sounds like you need to update since this was a reported bug for 2.43... and was fixed at that time... Quote 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 More sharing options...
Rick Posted December 16, 2011 Author Share Posted December 16, 2011 I am indeed using 2.43. Bugger. Thanks. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 17, 2011 Author Share Posted December 17, 2011 So upgrading worked. Now is there a way to get meters per tile because that looks like it affects the size of the terrain as well, and I would need to know that. Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 17, 2011 Share Posted December 17, 2011 hmmm... i wonder what it could be? terrain.resolution gave the resolution... i wonder if terrain.meterspertile gives the meters per tile? and yes, meterspertile does effect the size of the terrain... essentially the meterspertile is nothing more than the X & Z value that is used to scale the terrain. so terrain.scale.x would return the same thing as meterspertile and terrain.scale.y can be used to get the altitude. Quote 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 More sharing options...
Rick Posted December 17, 2011 Author Share Posted December 17, 2011 thanks 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.