Game Development Community

Terrain-sculpting

by Mitovo · in Torque Game Engine · 04/01/2004 (7:07 pm) · 14 replies

Hey all..

I just spent some time working on learning how to "sculpt" the terrain in Torque for specific results, rather than just whatever the random generators create. In this case, I created a path "winding" its way up to a raised area of land... I figured out a way to do it, but it's rather cumbersome and I don't think it's necessarily the most efficient use of the tools to do it..
So I thought I'd post a message to see if any others have any tips to share to that end. I got the results I have so far by some mix of "add dirt", "excavate", "flatten" and "smooth".

I've attached a WIP shot I took inside the editor. It's nothing amazing, but I just wanted to see how much control you can have over the terrain with the given tools... Aside from the occasional "jaggies" where a vertical surface meets a horizontal one, which can be remedied with a few passes of a "smooth" brush, it works pretty well.

wolfsongint.com/terrain_work.jpg
Any suggestions or feedback on this?

Thanks!
Mike

#1
04/02/2004 (7:07 am)
If the output looks good, you're doing it right. ;)
#2
04/02/2004 (8:15 am)
Hmm.. Fair enough. lol.

Thanks.. :-)
#3
04/02/2004 (3:09 pm)
Lately I have found using 3dsmax to generate a hieghtmap to be very productive. I create a mesh with the desired shape for the terrain, apply a linear gradient material to it, then render a top down view.
#4
04/02/2004 (9:15 pm)
Martin,

You know, that is an excellent idea. The only problem is, I don't believe LW can render "flat" like that from an orthographic view like MAX can (something I've needed and missed a few times now). The only way to fake it is by messing with the FOV settings which is a pain. I did see a plugin that would do that for you but.. well, perhaps I can figure something out. Great idea though. And you certainly have more fine control over things in a modeler than you do in Torque.

The only thing I wonder about is, and I know this has been mentioned elsewhere, but I don't remember this detail.. is 1 grid unit in a 3D modeler equivalent to 1 grid unit in Torque *regardless* of what scale you're working in in the modeler? So, if I have my grid set to 1 grid square equalling, say, 1'.. is that still going to be scaled up to 1 meter in Torque?

Thanks for the suggestion!

Mike
#5
04/03/2004 (7:22 pm)
Think of it like so....

A torque hieghtmap is 256 x 256. When you render the map you should try for getting the whole terrain object (without cropping or empty borders, it can be difficult).

This map will specify the topography of One terrain block (which is tiled).

Now the size of the terrain features will be highley dependant upon your terrainBlock's "squareSize" setting. A larger squareSize will make for a larger terrain, etc.

If accuracy is really important (you are using USGS surveys and want accurate proportions) take a look at this page:

holodeck.st.usm.edu/vrcomputing/scenebuilding/chapter03.shtml

However, if you just need a good proportion guid, I would suggest that you make a flat terrain with some different sized boxes on it, then you can take it in-game and compare the sizes at various squareSize settings. It may not be highly accurate, but it's a lot easier to follow then the link above :)
#6
04/03/2004 (7:46 pm)
Martin,

Hey.. Great link! I hadn't seen that one before.

I'm using that grid texture as a basis, now, for my "landscape template" file... That is so much easier to work with than a solid green mass.. heh. And the rest of hte info is helpful, too.. Should definitely come in handy..

Yeah, that whole mission and "terrain area" thing is wierd.. It's almost as if the Mission Area and "Terrain Area" boundaries are moving in parallax to you.. I don't get that.. it's wierd, and I'd like to know what's going on there.. But hey.. if it works, I'm not gonna question it :-)

Thanks again!
Mike
#7
01/17/2005 (11:54 pm)
>The only problem is, I don't believe LW can render "flat" like that from an orthographic view like MAX can (something I've needed and missed a few times now).

I haven't used Lightwave, but one way to approach rendering a heightfield could be ....

- convert your geometry to polygons if it isn't already
- apply a planar UV projection from either the front or side
- apply a gradient texture that goes from the darkest greyscale valule at bottom to your lightest desired greyscale val at top
- render the textured model from above w/o specularity

I don't know how you'd go about it in LW, but it would be straightforward in Maya (my main app).

Hope that helps

- Adrian
#8
01/25/2005 (10:53 am)
Can someone give me a rundown of HOW to have a heightmap AFFECT the terrain??

I am trying to create a flat terrain surface... I know that somehow I need a .ter file... how are those generated using a heightmap??

THANKS!
#10
01/30/2005 (4:12 pm)
I am trying to understand the relationship between:

a) a heightfield
b) a PNG image
c) a .ter file

I understand that in essence each is a 256x256 matrix with height data, however I cannot seem to be able to import new terrains into Torque.

I would like to start simple. For example, I created a 256x256 grayscale image in Illustrator and then using the "save for web" function, I saved it as a PNG-8 with 256 colors. I then renamed the resulting file (heightfield.png) to heightfield.ter. When I try to import heightfield.ter into Torque, nothing happens. I assume that if the .ter file is not properly formatted, Torque just abandons the attempt.

Can anyone point me in the right direction with a step-by-step process for creating a new .ter file?

Thanks.
#11
01/30/2005 (4:53 pm)
I suggest you read the link provided above, it goes until complete detail about exactly what you want.

BuildITcve is simply an application written with TGE, and all of the information I see in the tutorial is stock TGE functionality.
#12
01/30/2005 (4:58 pm)
I already read the link posted above a couple of times. if anyone has a different perspective or some insight to lend, it would be appreciated.
#13
01/30/2005 (5:18 pm)
Did you try to run the exercise they describe? It shows specifically how to take a heightmap greyscale image, import it into TGE, and then save a mission/terrain file from it.

Quote:Can anyone point me in the right direction with a step-by-step process for creating a new .ter file?

As I said above, that's exactly what the tutorial does.
#14
01/30/2005 (8:57 pm)
Ok. sorry. you're right. the info i needed was in there. thanks.