squareSize - >.<
by Aldavidson · in Torque 3D Professional · 06/21/2009 (1:41 pm) · 2 replies
Hey guys,
would be greatfull for some clarifcation here, as im struggling to get my head round this.
What does squareSize actually represent? I'm trying to figure out what value i should use in my level.
Basicly i have a 2048x2048 texture, and i want my terrain to basicly be 1024units wide and 1024 units long.
How do i know what values to use? Sorry if this is a retarded question, it just seems a little bit unclear to me.
would be greatfull for some clarifcation here, as im struggling to get my head round this.
What does squareSize actually represent? I'm trying to figure out what value i should use in my level.
Basicly i have a 2048x2048 texture, and i want my terrain to basicly be 1024units wide and 1024 units long.
How do i know what values to use? Sorry if this is a retarded question, it just seems a little bit unclear to me.
#2
Smaller squaresizes mean more dense squares = more detailed terrains = smaller terrains.
1 pixel of heightmap = 1 square. Let's say your model scale is 1 world unit to 1 metre (cos it's easier to work things out then).
A x1024 heightmap at squaresize 8 means 1 pixel of heightmap = 8 world units. That's 1024x8= 8192m of map breadth and width.
A x1024 heightmap at squaresize 1 means 1 pixel of heightmap = 1 world units. That's 1024x8= 1024m of map breadth and width.
The latter is 8 times smaller in metres, 8 times denser in squaresize, and thus 8 times more detailed terrain.
If you want to use a x2048 texture and have the terrain 1024 long/wide, then you need squaresize set to 0.5 which is very detailed.
06/21/2009 (2:37 pm)
Squaresize is the size of the squares in world units (usually/often metres) which make up the terrain. So a squaresize of 8 = 1 terrain square to 8 world units = 8m squares if you are using that ratio/scale.Smaller squaresizes mean more dense squares = more detailed terrains = smaller terrains.
1 pixel of heightmap = 1 square. Let's say your model scale is 1 world unit to 1 metre (cos it's easier to work things out then).
A x1024 heightmap at squaresize 8 means 1 pixel of heightmap = 8 world units. That's 1024x8= 8192m of map breadth and width.
A x1024 heightmap at squaresize 1 means 1 pixel of heightmap = 1 world units. That's 1024x8= 1024m of map breadth and width.
The latter is 8 times smaller in metres, 8 times denser in squaresize, and thus 8 times more detailed terrain.
If you want to use a x2048 texture and have the terrain 1024 long/wide, then you need squaresize set to 0.5 which is very detailed.
Associate Kyle Carter
So if you have a 256x256 heightfield and a squaresize of 8 you will have a world size of 2048.
If you look at the terrain in wireframe mode you will see it is a grid. Squaresize is the size of one square of that grid.