Question re building a level from 3d "tiles"
by Phil Shenk · in Torque Game Engine · 01/30/2005 (9:12 am) · 4 replies
Hi, I'm not using Torque right now, but I'm looking at it. I'd like to find an engine that can do some specific things, so I'm looking for insight whether or not Torque can do them.
All this is for either a more "iso" style game like Diablo or Baulders Gate Dark Alliance, or a sidescroller like Abuse.
1) I'd like to take a library of 3d pieces, like static meshes in Unreal (I guess they are dts objects in Torque?) and build a level at runtime out of those pieces. Kind of like 2D tilemap games, but with 3D "tiles". I don't want to pre-layout the pieces, but rather read in level data (positions) and assemble the pieces using that data. Ultimately the plan would be to randomize those pieces and create levels that way.
2) It would be great if these objects could be shadowed and receive dynamic lights. I don't mind if they are lightmapped offline, although this makes making them tileable more problematic. It would be a bonus if they could either be dynamically lit, or lightmapped on level-load.
3) Obviously, they would have to be collisonable. I'd be fine with using low poly hulls for the collision.
4) My preference is is to use meshes that I can build and texture in Max, but if dts objects can't do this, then maybe bsp chunks will work? Can bsps be instanced? Moved around, loaded on the fly, etc?
Thanks, any help is greatly appreciated.
All this is for either a more "iso" style game like Diablo or Baulders Gate Dark Alliance, or a sidescroller like Abuse.
1) I'd like to take a library of 3d pieces, like static meshes in Unreal (I guess they are dts objects in Torque?) and build a level at runtime out of those pieces. Kind of like 2D tilemap games, but with 3D "tiles". I don't want to pre-layout the pieces, but rather read in level data (positions) and assemble the pieces using that data. Ultimately the plan would be to randomize those pieces and create levels that way.
2) It would be great if these objects could be shadowed and receive dynamic lights. I don't mind if they are lightmapped offline, although this makes making them tileable more problematic. It would be a bonus if they could either be dynamically lit, or lightmapped on level-load.
3) Obviously, they would have to be collisonable. I'd be fine with using low poly hulls for the collision.
4) My preference is is to use meshes that I can build and texture in Max, but if dts objects can't do this, then maybe bsp chunks will work? Can bsps be instanced? Moved around, loaded on the fly, etc?
Thanks, any help is greatly appreciated.
About the author
#2
What are the collision limitations? Since I'm doing pretty simple movement, i.e. walking around walls in an iso situation, or jumping around on platforms in a sidescroller situation, would a simpler collision hull be the way to go? (a hull per .dts shape I mean).
I wasn't really thinking I'd use height-mapped terrain for anything... just straight-out geo pieces. How does the culling work for shapes? I assume that maybe a camera frustrum cull would work... thinking aloud here.
And on the subject of lighting, and add-ons, have you used the... um, what's it called... the lighting pack or something like that? This looke like it might have some functionality to imrove lighting on .dts shapes, but I'm unfamiliar with the terminolgy... It said that it allows .dts shapes to cast shadows onto interiors and terrain ( I assume interiors == bsp and terrain == heightmapped terrain object), but I wonder does it let dts shapes cast shadows onto themselves and other .dts shapes? That is ultimately what I'd be looking for I think.
What about the Torque shader engine... does this help any of this stuff?
Sorry for the barrage of questions, but I'm pretty curious about the nitty-gritty of it. I'm a novice programmer, but I've done a lot of development so I know how things can be done and get in. I'm not up to writting my own lightmapper though :)
01/30/2005 (11:09 am)
I see, that's helpful. So, how does the lighting on .dts shapes work? Can they be lightmapped at runtime, and how long does this typically take? If so, I assume that the shapes will have a second set of UV's (packed UV's generated in Max, for example). If the .dts shapes are instanced throughout the level, I assume that we can generate different lightmaps for each instance? If I were to have to make the lightmaps in Max (which would make tiling harder) are there material/shaders that allow me to blend the lightmap with the diffuse?What are the collision limitations? Since I'm doing pretty simple movement, i.e. walking around walls in an iso situation, or jumping around on platforms in a sidescroller situation, would a simpler collision hull be the way to go? (a hull per .dts shape I mean).
I wasn't really thinking I'd use height-mapped terrain for anything... just straight-out geo pieces. How does the culling work for shapes? I assume that maybe a camera frustrum cull would work... thinking aloud here.
And on the subject of lighting, and add-ons, have you used the... um, what's it called... the lighting pack or something like that? This looke like it might have some functionality to imrove lighting on .dts shapes, but I'm unfamiliar with the terminolgy... It said that it allows .dts shapes to cast shadows onto interiors and terrain ( I assume interiors == bsp and terrain == heightmapped terrain object), but I wonder does it let dts shapes cast shadows onto themselves and other .dts shapes? That is ultimately what I'd be looking for I think.
What about the Torque shader engine... does this help any of this stuff?
Sorry for the barrage of questions, but I'm pretty curious about the nitty-gritty of it. I'm a novice programmer, but I've done a lot of development so I know how things can be done and get in. I'm not up to writting my own lightmapper though :)
#3
Regarding your specific questions, I'm not a lighting expert, but AFAIK, TGE + lighting pack accomplishes most of not all of what you want except for .dts shapes casting shadows on themselves.
The collision aspect you are talking about is basically exactly what .dts shapes are set up for (simple collision hull, you can currently have up to 9 in a single .dts).
.dts shapes don't actually use lightmaps as far as I am aware, which is one of the reasons they are able to be inserted and modified dynamically.
As I said, T2D does sound like your best bet for the collection of features you are looking for. It's in heavy internal beta at the moment, but you can find out a bunch of information in recent .plan writeups from Josh Williams and Melv May--click on the .plan link to the right, as well as the News link to scroll through recent items that may be of interest.
01/30/2005 (11:23 am)
Actually, now that you break things out more (specifically real iso and also side-scroller), it would make the most sense for you to go with Torque2D (soon to be released), instead of a 3-D option.Regarding your specific questions, I'm not a lighting expert, but AFAIK, TGE + lighting pack accomplishes most of not all of what you want except for .dts shapes casting shadows on themselves.
The collision aspect you are talking about is basically exactly what .dts shapes are set up for (simple collision hull, you can currently have up to 9 in a single .dts).
.dts shapes don't actually use lightmaps as far as I am aware, which is one of the reasons they are able to be inserted and modified dynamically.
As I said, T2D does sound like your best bet for the collection of features you are looking for. It's in heavy internal beta at the moment, but you can find out a bunch of information in recent .plan writeups from Josh Williams and Melv May--click on the .plan link to the right, as well as the News link to scroll through recent items that may be of interest.
#4
However, the main thing I was hoping to get out of using 3D is dynamic lighting on the backgrounds. If a character is walking around holding a torch or shooting laser bolts, it's cool to see that light interacting with the background. Animation flexibility is another big plus for 3D... less overhead in rendering sprites from tons of directions, and all that. If T2D provides gouraud shading on tiles and sprites, then at least that's something.
I guess I should start a new thread called "lighting on .dts objects".
01/30/2005 (11:45 am)
Re torque 2D... yes, I am pretty excited to see what that provides. I've been playing around with the Allegro library writing some C++ classes to wrap up a sprite handler and scrolling layered background functionality, but T2D looks like it will provide a lot more of that kind of stuff out of the box. And it looks like it will provide polygon collision.. yay! I wasn't looking forward to figuring *that* out on my own.However, the main thing I was hoping to get out of using 3D is dynamic lighting on the backgrounds. If a character is walking around holding a torch or shooting laser bolts, it's cool to see that light interacting with the background. Animation flexibility is another big plus for 3D... less overhead in rendering sprites from tons of directions, and all that. If T2D provides gouraud shading on tiles and sprites, then at least that's something.
I guess I should start a new thread called "lighting on .dts objects".
Torque 3D Owner Stephen Zepp
It sounds like you want functionality that is implemented in the RTS-SK (Real Time Strategy Starter Kit), which can be purchased after you are a licensed TGE owner--and I highly suggest that you consider this pack as a big head start on the functionality you want. For example, it demonstrates the exact capability you need: allowing players (or code) to dynamically place buildings/structures during game play.
As an FYI, my project is doing pretty much exactly what you describe, and we've done it via the RTS-SK and a "library" of .dts shapes.