TerrainBlock to 16, screw up WaterBlocks?
by David Schwanke · in Technical Issues · 05/24/2004 (3:51 pm) · 12 replies
Trying to track down a peculiar problem in the game editor.
First off some info.
I'm working with the code for the 3DGPAiL book with a friend putting it up as they go through it. (I also own the book, though I am jumping around.)
First thing I did was try to resize the map by editing the TerrainBlock to block size 16 because we need as big a map as we can get (and we were told elsewhere here that 32 isnt quite enough detail.)
This is the old/original terrainblock gotten from a default tutorial map.
new TerrainBlock(Terrain) {
rotation = "1 0 0 0";
scale = "1 1 1";
detailTexture = "./detail1";
terrainFile = "./trackA.ter";
squareSize = "8";
bumpScale = "1";
bumpOffset = "0.01";
zeroBumpScale = "8";
position = "-1024 -1024 0";
locked = "true";
};
This is the new terrainblock which I edited up.
new TerrainBlock(Terrain) {
rotation = "1 0 0 0";
scale = "1 1 1";
detailTexture = "./detail1";
terrainFile = "./SMC-Track.ter";
squareSize = "16";
bumpScale = "1";
bumpOffset = "0.01";
zeroBumpScale = "16";
position = "-2048 -2048 0";
locked = "true";
};
I could have sworn I did the math right and the terrain file is just a copy of the trackA.ter terrain file.
My question though is, is it possible that I somehow screwed something up and the waterblocks that I am placing on this map are using the old terrainblock settings to decide where the edges of the water are?
thats what it looks like to me. They are up in the air and really curvy like they are going around terrain, but there is no terrain anywhere near the waterblocks.
Ive also noticed that if I move the water block the location does not update in the paramters listing in the inspector and if i apply new paramaters it resets the location. Kind of makes moving the waterblock by hand pointless. But I am not sure how that is related.
Just wondering if anyone has run into this before or if this is some stupid error on my part for changing the terrain blocks.
There is no documentation that I can find on the specifics of terrain blocks or waterblocks for me to really know if I am dong everything correctly. 100$s is kind of steep if I am not going to be using the C++ code.
First off some info.
I'm working with the code for the 3DGPAiL book with a friend putting it up as they go through it. (I also own the book, though I am jumping around.)
First thing I did was try to resize the map by editing the TerrainBlock to block size 16 because we need as big a map as we can get (and we were told elsewhere here that 32 isnt quite enough detail.)
This is the old/original terrainblock gotten from a default tutorial map.
new TerrainBlock(Terrain) {
rotation = "1 0 0 0";
scale = "1 1 1";
detailTexture = "./detail1";
terrainFile = "./trackA.ter";
squareSize = "8";
bumpScale = "1";
bumpOffset = "0.01";
zeroBumpScale = "8";
position = "-1024 -1024 0";
locked = "true";
};
This is the new terrainblock which I edited up.
new TerrainBlock(Terrain) {
rotation = "1 0 0 0";
scale = "1 1 1";
detailTexture = "./detail1";
terrainFile = "./SMC-Track.ter";
squareSize = "16";
bumpScale = "1";
bumpOffset = "0.01";
zeroBumpScale = "16";
position = "-2048 -2048 0";
locked = "true";
};
I could have sworn I did the math right and the terrain file is just a copy of the trackA.ter terrain file.
My question though is, is it possible that I somehow screwed something up and the waterblocks that I am placing on this map are using the old terrainblock settings to decide where the edges of the water are?
thats what it looks like to me. They are up in the air and really curvy like they are going around terrain, but there is no terrain anywhere near the waterblocks.
Ive also noticed that if I move the water block the location does not update in the paramters listing in the inspector and if i apply new paramaters it resets the location. Kind of makes moving the waterblock by hand pointless. But I am not sure how that is related.
Just wondering if anyone has run into this before or if this is some stupid error on my part for changing the terrain blocks.
There is no documentation that I can find on the specifics of terrain blocks or waterblocks for me to really know if I am dong everything correctly. 100$s is kind of steep if I am not going to be using the C++ code.
#2
Instead move the water, close the dropdown, containing all the object's variables. Then click apply. The object should stay in position.
05/24/2004 (4:18 pm)
Quote:one thing I found is if you manually change the object's postion/location, and click apply without closing the drop down lists, objects will reset themselves.
Ive also noticed that if I move the water block the location does not update in the paramters listing in the inspector and if i apply new paramaters it resets the location
Instead move the water, close the dropdown, containing all the object's variables. Then click apply. The object should stay in position.
#3
Unless you don't want any water you're stuck with that for the time being. I think I read with it set to 8 you're still get a 2KM square block of land, so it's not that bad.
05/24/2004 (7:36 pm)
What Xavier said. You have to keep the terrain size (don't remember the exact variable name) at 8 or you'll lose your shoreline animations. You're water will fall off in blocks where it hits the shore.Unless you don't want any water you're stuck with that for the time being. I think I read with it set to 8 you're still get a 2KM square block of land, so it's not that bad.
#4
There is also a fix for the waterblocks problem, but I'm not sure where it would be found. It's posted in the forums somewhere. Perhaps a search for waterblocks would find it.
05/24/2004 (9:01 pm)
What Anthony wrote, or if you click on the waterblock in the tree it also updates the coords. Then you can hit apply.There is also a fix for the waterblocks problem, but I'm not sure where it would be found. It's posted in the forums somewhere. Perhaps a search for waterblocks would find it.
#6
I offered Ben my patched files for inclusion in HEAD, but I guess he is more than busy these days.
05/25/2004 (12:39 am)
I can vouch for Desmonds fix. I changed from 8 to 4, had tons of holes and weird artifacts in the waterblock. Implementing the changes in the waterblock code made it all disappear.I offered Ben my patched files for inclusion in HEAD, but I guess he is more than busy these days.
#7
05/25/2004 (12:50 am)
Ben! No more sl33p for JoO!
#8
Sorry guys! Sometime soon, I'll get to this! :)
05/25/2004 (7:44 am)
I have this one in my todo list, thankfully. Just haven't had a free few hours to sit down and get it checked in... :(Sorry guys! Sometime soon, I'll get to this! :)
#9
05/26/2004 (5:23 pm)
I put this code in on rev1_2_2 and it doesn't seem to work for 16. Where the water should be looks like fog. What should the values be in the water block to work with a terrain block of 16?
#10
Snapshot
Only difference between that TerrainBlock and the one at the start of this thread is that this block has zeroBumpScale of 8 which Ive been told wont make a difference.
These are teh fields that I think are important from the waterblock:
position = "-2048 -2048 0";
rotation = "1 0 0 0";
scale = "4096 4096 200";
Everything else looks to me like it is just visual specifics that affect the look and behavior of the water itself.
05/26/2004 (6:03 pm)
Here is a picture of the problematic scene with blocksize 16 after eustacia put in the code.Snapshot
Only difference between that TerrainBlock and the one at the start of this thread is that this block has zeroBumpScale of 8 which Ive been told wont make a difference.
These are teh fields that I think are important from the waterblock:
position = "-2048 -2048 0";
rotation = "1 0 0 0";
scale = "4096 4096 200";
Everything else looks to me like it is just visual specifics that affect the look and behavior of the water itself.
#11
I havent checked a block size 16, but it works for 4 and 2 without any changes to the script datablocks
(BTW - cant see your picture - not authorized or something)
05/27/2004 (12:03 am)
You did implement the C++ changes to the engine, right? Not just the datablock changes. You need to go down to Desmonds hack approx halfway down.I havent checked a block size 16, but it works for 4 and 2 without any changes to the script datablocks
(BTW - cant see your picture - not authorized or something)
#12
I changed the permissions on that forum, you should be able to view the pic now.
05/27/2004 (4:42 am)
Yes I put in the engine changes from Desmonds hack. It compiled and ran fine. I double checked to see if I messed something up but it looked fine.I changed the permissions on that forum, you should be able to view the pic now.
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name
Regards,
Xavier.