Changing square size?
by Jonas · in Torque 3D Professional · 09/17/2010 (8:45 am) · 17 replies
Hi fellow Torqueneers!
I found that one of my terrain blocks have the wrong square size today and i need it changed. My question is: is it possible to change square size on a terrain file without having to remake the block?
Kind regards
Jonas
I found that one of my terrain blocks have the wrong square size today and i need it changed. My question is: is it possible to change square size on a terrain file without having to remake the block?
Kind regards
Jonas
About the author
Freelance 3D artist at day scripter/coder on Enduring Life at night. Lover of all things TorqueScript.
#2
09/17/2010 (11:09 am)
Ok, ye thats what i was afraid thank you
#3
Kind regards
Jonas
09/17/2010 (12:34 pm)
To save power instead of chancing the square size could i delete some blocks from the terrain block using the "Clear terrain" tool? or wouldn't that serve any power saving purpose ?Kind regards
Jonas
#4
09/18/2010 (12:07 am)
Uh...not sure what you mean by saving power. But just play around, make the changes, and if you don't like em, don't save the level.
#5
I'm not sure what you're trying to do, but one option could be exporting your terrain as a height map, scaling it in an art program, and then reimporting it with a new square size.
09/18/2010 (1:23 am)
Out of curiosity, what do you mean by the 'wrong square size' - What issue are you having with it? I'm not sure what you're trying to do, but one option could be exporting your terrain as a height map, scaling it in an art program, and then reimporting it with a new square size.
#6
The problem im having is i currently have a square size of 1 however in my setup i have to save power so i want a square size of 2 however the map badly enough is complete and very complex so im just checking around if there is a third alternative to just remaking the entire block.
@Clear terrain tool
What i mean is: with the clear terrain tool available within the editor i can remove "squares" one by one from my terrain block. The question is: will that save power or does the engine render the block as one?
This way i could save power via removing parts that the player cant see instead of chancing the square size that's my thoughts.
Kind regards
Jonas
09/18/2010 (8:17 am)
Hey Tim,The problem im having is i currently have a square size of 1 however in my setup i have to save power so i want a square size of 2 however the map badly enough is complete and very complex so im just checking around if there is a third alternative to just remaking the entire block.
@Clear terrain tool
What i mean is: with the clear terrain tool available within the editor i can remove "squares" one by one from my terrain block. The question is: will that save power or does the engine render the block as one?
This way i could save power via removing parts that the player cant see instead of chancing the square size that's my thoughts.
Kind regards
Jonas
#7
What would really help you would be to set the screenError number to a big size (try 100 for example), which will lower the terrain detail faster, giving you a nice performance increase.
Check if it helps with the metrics("fps gfx shadow"); command. This should lower the polycount quite a bit.
09/18/2010 (10:17 am)
I doubt that the clear terrain tool would help. I don't know exactly how it works, but the polys are still rendered in most cases.What would really help you would be to set the screenError number to a big size (try 100 for example), which will lower the terrain detail faster, giving you a nice performance increase.
Check if it helps with the metrics("fps gfx shadow"); command. This should lower the polycount quite a bit.
#8
Ok ye i fiddled around with screenError a while back ill give it another try and see if it helps thanks
Kind regards
Jonas
09/18/2010 (10:25 am)
Ok ye as i thought the clear terrain tool just render then inert it doesn't actually remove them technically.Ok ye i fiddled around with screenError a while back ill give it another try and see if it helps thanks
Kind regards
Jonas
#9
As suggested removing the terrain will only render then inert they will still draw power and be rendered.
Screen error helped but its still way to many polygons for steady preformance (2million from just terrain im starting to think something is wrong)
09/18/2010 (11:05 am)
A little update:As suggested removing the terrain will only render then inert they will still draw power and be rendered.
Screen error helped but its still way to many polygons for steady preformance (2million from just terrain im starting to think something is wrong)
#10
09/18/2010 (11:16 am)
If you're changing from a square size of 1, to a square size of 2, you have a perfect case to do what I suggested. - Export the terrain as a height map,
- Scale the image down 50% in ImageMagick / Photoshop / Gimp
- Import the new image with a square size of 2.
#11
09/18/2010 (11:38 am)
Ah ok, didn't view that as possible but sure i will give it a try later today and give results.
#12
You'll need something like:
09/18/2010 (12:41 pm)
For 16 bit height maps, I found that ImageMagick works the best... and it's free, which is a plus :)You'll need something like:
convert heightmap.png -resize 50% scaledheightmap.png
#13
A terrain does have the same amount of polys, regardless if its 1,2,3,4,5,6... square size.
If you dont need the size feeling when players traverse the terrain, stick to your 1 as its the most detailed feeling you gan get.
09/18/2010 (4:00 pm)
The current heightmap export dont export the proper colors, so after export and reimport the heights will be off. Its fixed in betas3. So you might need to adjust your waterblock height if you have one afterwards, and all placed objects height factor.A terrain does have the same amount of polys, regardless if its 1,2,3,4,5,6... square size.
If you dont need the size feeling when players traverse the terrain, stick to your 1 as its the most detailed feeling you gan get.
#14
Also i have one map with square size 2 and one with 1 the one with 1 have 2 million polygons without being filled with objects. The other one have 2million but have a live size city on it... am i missing something ?
Note: screen error is turned of in both tests
09/18/2010 (4:39 pm)
I dont understand, if the terrain take exactly the same amount regardless of square size why even have the option of square size? there is no power saving nor any benefit to having a larger size if that's true?Also i have one map with square size 2 and one with 1 the one with 1 have 2 million polygons without being filled with objects. The other one have 2million but have a live size city on it... am i missing something ?
Note: screen error is turned of in both tests
#15
For example: If you have a 512x512 terrain file, with a square size of 1, your terrain is exactly 512x512 game units.
If you take that same terrain, and make it square size 2, your 512x512 terrain is scaled to be 1024x0124 game units.
What I understood your request to be, is taking a map which is say, 512x512, with square size 1, and instead use a 256x256 with a square size of 2. Both of these produce a very similar terrain, but the 512x512x1 has more polys than the 256x256x2.
Does this make sense?
09/18/2010 (5:09 pm)
Square size does not modify the number of polys needed to render the terrain. All it does is tell T3D how to interpret the points in the terrain.For example: If you have a 512x512 terrain file, with a square size of 1, your terrain is exactly 512x512 game units.
If you take that same terrain, and make it square size 2, your 512x512 terrain is scaled to be 1024x0124 game units.
What I understood your request to be, is taking a map which is say, 512x512, with square size 1, and instead use a 256x256 with a square size of 2. Both of these produce a very similar terrain, but the 512x512x1 has more polys than the 256x256x2.
Does this make sense?
#16
09/18/2010 (5:46 pm)
Yes yes that is the idea, im sorry i forgot the size of the map and confused it with the square size itself.
#17
09/19/2010 (9:38 am)
Ok this issue is now solved thanks for everyone's input!
Torque 3D Owner Steve
YP productions