Possible Bug: Terrain Center Offset? - RESOLVED
by Greg G · in Torque 3D Professional · 05/25/2010 (12:08 pm) · 9 replies
Not sure if this is a bug or not...
When I try to create a new terrain block its center appears to be offset. If I set its position to 000 it moves to some random location in the world. All my other props that I center at 000 appear in a different location.
Does anyone know what's going on here?
When I try to create a new terrain block its center appears to be offset. If I set its position to 000 it moves to some random location in the world. All my other props that I center at 000 appear in a different location.
Does anyone know what's going on here?
#2
Yeah actually every new terrain block I create appears to be farther off from 000. Can anyone else confirm this?
05/25/2010 (1:18 pm)
Yeah I just noticed that with one of my terrain blocks. Its one of the corners, but another one is flying off into space its no where near 000.Yeah actually every new terrain block I create appears to be farther off from 000. Can anyone else confirm this?
#3
Check your settings for object spawn/placement (crtl D) F11 -> Object -> Drop Location.
Actually, once you've spawned it, with it still selected, select your drop location and then do drop placement.
05/25/2010 (1:43 pm)
Are you creating "at origin", "at centroid" or any o fthe other settings ---actually origin should be 0 0 0 ...Check your settings for object spawn/placement (crtl D) F11 -> Object -> Drop Location.
Actually, once you've spawned it, with it still selected, select your drop location and then do drop placement.
#4
If you use the import height map option it creates the terrain with the center at one of its corners. Which makes sense, and I can center it at 000 no problem.
If I create using the "create blank terrain option" the resulting terrain block has its center offset really far from any part of the terrain block.
The fact that the two methods are yielding different results means its gotta be a bug.
05/25/2010 (1:50 pm)
The issue is related to the way the terrain gets created. If you use the import height map option it creates the terrain with the center at one of its corners. Which makes sense, and I can center it at 000 no problem.
If I create using the "create blank terrain option" the resulting terrain block has its center offset really far from any part of the terrain block.
The fact that the two methods are yielding different results means its gotta be a bug.
#5
If I create a new 256x256 terrain block its center is off by -256 -256 -237.781 from the center of the block. So it looks like the hieght it is whats off. The X & Y appears to be in the right location.
05/25/2010 (1:58 pm)
@Steve, Drop settings made no difference. When the terrain gets created it its position isn't updated if I move it I can see how much its offset by.If I create a new 256x256 terrain block its center is off by -256 -256 -237.781 from the center of the block. So it looks like the hieght it is whats off. The X & Y appears to be in the right location.
#6
At least that's what I'm seeing when I create my terrain using the import height map option. I have no idea whats going on when I create a new blank terrain. Its flat, yet its center is way offset.
Its really annoying because I am trying to use the set height tool on two terrain blocks to blend then together and because the center is off its setting the heights different.
EDIT: Looks like the the terrain hieght is always gonna be offset from 0 by an ammount specified in the heightmap. the default height of a new terrain block is 512. Not sure why this is you would think it would be 100, anways torque obviosly isn't built to make buffering multiple terrain blocks together easy. :(
05/25/2010 (2:12 pm)
Ohh, if I create all my terrains with a black height map then the center is EXACTLY where it should be. Different terrains get different centers because the colors in the height data are different.At least that's what I'm seeing when I create my terrain using the import height map option. I have no idea whats going on when I create a new blank terrain. Its flat, yet its center is way offset.
Its really annoying because I am trying to use the set height tool on two terrain blocks to blend then together and because the center is off its setting the heights different.
EDIT: Looks like the the terrain hieght is always gonna be offset from 0 by an ammount specified in the heightmap. the default height of a new terrain block is 512. Not sure why this is you would think it would be 100, anways torque obviosly isn't built to make buffering multiple terrain blocks together easy. :(
#7
05/28/2010 (12:57 pm)
bug logged Key: TQA-159
#8
The center of the terrain bounding box (where the gizmo renders if the world editor is in bounds center mode) is centered in the terrain block, so depends on the terrain dimensions and maximum height.
A new blank terrain created in the world editor has a uniform height of 512. This is a better default height than 0 since it means you can create valleys without having to raise the terrain first (since height values must be > 0). Unfortunately this means the terrain origin (bottom left corner) is 512 units below the visible terrain! Positioning a new, flat 256x256 terrain block at 0,0,0 would put its bounds center at 128,128,256, and the 'ground' would appear to be at +512.
If you wanted to position the "bounds center" at 0,0,0, you would need to set the terrain block position to -128,-128,-256.
If you wanted to position the "ground center" (ie. the center of the visible terrain block) at 0,0,0, you would need to set the terrain block position to -128,-128,-512.
06/15/2010 (9:36 pm)
I've just been looking at this one, and I don't think this is actually a bug, but rather a misunderstanding about how terrain blocks are positioned in the world. The terrain origin (the position field you manipulate in the inspector) is always the bottom left corner of the block (since terrain local x,y,height coordinates are always positive).The center of the terrain bounding box (where the gizmo renders if the world editor is in bounds center mode) is centered in the terrain block, so depends on the terrain dimensions and maximum height.
A new blank terrain created in the world editor has a uniform height of 512. This is a better default height than 0 since it means you can create valleys without having to raise the terrain first (since height values must be > 0). Unfortunately this means the terrain origin (bottom left corner) is 512 units below the visible terrain! Positioning a new, flat 256x256 terrain block at 0,0,0 would put its bounds center at 128,128,256, and the 'ground' would appear to be at +512.
If you wanted to position the "bounds center" at 0,0,0, you would need to set the terrain block position to -128,-128,-256.
If you wanted to position the "ground center" (ie. the center of the visible terrain block) at 0,0,0, you would need to set the terrain block position to -128,-128,-512.
#9
08/02/2010 (4:40 pm)
Confirmed as Fixed in 1.1 Beta2
Torque Owner Ryan Mick
Red Witch Entertainment