Game Development Community

Just curious.

by Chris Sklenarik · in Torque Game Engine · 09/24/2004 (9:32 am) · 13 replies

FYI, I am waiting for my copy of the book everyone suggests others to read.

I am curious if I can just model everything including the terrain in MAX, then just export it to Torque? The terrain builder in TGE is nice and all, but I have more specific desires for the terrain such as caves and cliffs which so far I haven't seen eny evidence of the terrain editor being capable of. I have read a great deal of the documentation, and have printed off well over 300 pages of stuff I felt was more useful for me while I was working in game and reading the test at the same time.

I am not trying to build a game or anything, but just have a bit of fun playing around in TGE creating cool looking scenes in real time. The one I am working on now is a magical forest like area, very large and full of vegitation. Trees, shrubbs, grass, etc...

So long story short, can I do everything in MAX? If so, what would be the best thing to do with all the stuff that is in my premade-torque game? The terrain, sun, sky, etc... Is there a stripped down game I can start with so I can have a clean slate to work with? And if you have a hard time understanding what I am trying to say... tell me, I am bad at explainations ;)

TIA guys!

#1
09/24/2004 (10:25 am)
Heya Chris,

The best way to go here would be to use TGE's terrain editor for the normal parts of your terrain, and then use DIF objects for caves. You can create DIF objects from .map files (which are created in programs like Quark), using the map2dif utility. There are lots of tutorials on that part.

From there, you can integrate the DIF objects with your terrain. Again, there are tutorials on this stuff (EGTGE, Tourniquet, etc). With that, you should be able to create nice looking caves built straight into your terrain and you'll get *vastly* better performance than if you created everything in Max and exported as DTS objects.
#2
09/24/2004 (10:46 am)
Why is it that I would get better performance that way? I never worked with dif's or anything, MAX is about the extent of my knowledge I suppose.
#3
09/24/2004 (2:24 pm)
I would assume it's the way TGE is made, using different objects for different situations. It would help the engine run more smoothly as it was written to use thoes object in that way, as mentioned above DIF for potalized interiors, DTS is mentioned in the ducementation as being good for statics, players, items etc... and TGE has one of the best terrain systems I've ever seen why use anything else.

I do understand how going from one program to another can be I guess scary if you don;t know how anything works I'm still very new to Torque myself but if you look back I'm sure you can remember a time when you were new to 3DSMAX but now you're using it no problem. Same with any new tool really.

As for DIF, I suggest looking into iether Quark or Worldcraft or any other Quake based map editor (qeradiant?) hmm maybe tread. There is a lot of tutorials and documentation on using them in conjunction with TGE.

Not sure if any of this helps but I'm bored and thought I'd try out posting a reply.
#4
09/24/2004 (5:08 pm)
DTS objects are more complex as they support skeletal animation and have a separate collision box.

DIF objects are static and use the model itself as the collision box, so there is less data for the engine to process.

QuArK has the least restrictive license (Worldcraft and the Radiant tools cannot be used for commercial projects).
#5
09/24/2004 (9:42 pm)
Ah yes that's right, I completly forgot about that part. $5000 if you want to use Radiant in a commercial product, I won't even begin to imagine how much Worldcraft costs. So yes QuArk seems to be the best route if your $$$ limited or smart. Wonder about Tread3D http://www.planetquake.com/tread/
#6
09/25/2004 (8:59 am)
Back to the terrain....
I keep having to restart typing this post out becuase I am having a hard time explaining these crazy thoughts in my jumbled head! haha

I understand the *limit on the terrain size is about 2 miles, or 4sq. miles? After that it's just tiled out as I have noticed. It seems to do a good job tiling and that since it is 4sq miles, it is a bit hard to actually notice this tiling effect. I have a couple questions reguarding this. I am a workaround type of guy, if someone tells me I can't do something with whatever I have, I set out to prove them wrong... and I am damned good at doing so if I may say so.

1) Working _around_ the 4sq. mile limit. Can I build a world beyond this? For example, working on the other tiled areas, changing how I put objects and such so that it is even harder to notice the tiling, so that in effect I Have 8sq. miles to work with.
(One tile that is 4sq. miles, plus one mile out on each side)

2) My level would be lush with vegitation, so trees would be everywhere, grass, plants, etc.... I know that TGE has LOD, but I have never worked with that myself, not yet anyways. Let's say you were far out in a corner of the map, as far out as you can. While you cannot actually _see_ every tree in the map, every tree and polygon is in that direction. Will TGE try to render all of this(causing a fill rate issue) or is TGE more intellegent, in that it will render only what can actually be seen?

How does that work?
#7
09/25/2004 (11:14 am)
Ben Garney from GG has been working on a forest addin for Torque as well as updates to the Terrain. To quote from the profile linked above:
Quote:
Believe you me, this new terrain is going to kick some ass - but I think I'll save that discussion for another day.

As far as the forest goes here is a picture of what Ben has been working on:
www.pblabs.com/forest/screenshot_005-00006.jpg
#8
09/25/2004 (1:19 pm)
Although I have not personally tried doing so, it is supposedly possible to change the size of the terrain by adjusting the value of the squareSize property in your mission file(s).

The default value is 8, which gives you a terrain a little over 1 mile by 1 mile (1 square mile). A value of 16 changes the size to 2 by 2 (4 square miles) and a value of 32 changes the size to 4 by 4 miles (16 square miles).

The 3D Game Programming All In One book explains this in more detail, including how to adjust the terrain position. It has also been mentioned in these forums, and (I think) in EGTGE.
#9
09/25/2004 (1:22 pm)
Actually, the terrain is only that size according to the default scale, which is not hardcoded.
You can certainly use another scale if you want, and use that scale throughout your assets pipeline.
#10
09/25/2004 (3:43 pm)
I've gone through much of the Documentation and EGTGE, and printed out several hundred pages from both to help me read more during breaks at school. I also read about changing the terrain values, but that it cuases issues, and issues I don't want to mess with ;) Maybe it's fixed now though? Terrain size isn't a big thing to me, I think I can pull off what I want to do with 4sq. miles, my original plan was 25 lol.
#11
09/25/2004 (5:21 pm)
From what little I've read on the subject, you're less likely to have problems if squareSize is set to 2, 4, 8, 16 or 32 and ensure that there are no objects already defined in the mission.

Alternatively, you could try creating all your objects (including the player) at a reduced scale. With squareSize at the default value of 8, scaling everything else to 50% (including velocities) would make it seem as if the terrain was 2 by 2 instead of 1 by 1.
#12
09/25/2004 (5:58 pm)
I thought of that, and you just reminded me of a question I wanted to ask a while back. The terrain textures would have to be shrunk as well to look right instead of being large and blurred. Is it relatively easy to shrink the terrain textures? I am having a hard time finding resources I want/need, I would guess this is talked about somewhere.
#13
09/25/2004 (6:59 pm)
Terrain textures have to be 256 by 256 pixels, regardless of any other settings.

I think the majority of posts about terrains are here or in the "Getting Started" forum. The search feature can be more than a little finicky at times, but I've found it seems to work best in advanced mode with a cutoff date entered.

Apparently the terrain system in TSE is a lot more flexible, so you might want to consider concentrating on another area and upgrading to TSE once it's more complete and you're more familiar with TGE.

One other point worth mentioning is that as you aren't creating a fast action game, you could have the player/camera move at a much slower speed. It takes about 15 minutes to walk a mile, and if your world is going to be as detailed and varied as you indicated, there would be plenty to hold the user's attention, so the map would seem bigger.