Billboards
by Grant Kessler · in Torque Game Engine · 07/04/2006 (6:31 am) · 8 replies
First off, ive searched for a good 2-3 hours on a forum or something that would help me in the direction of how to do this, but have found nothing, so if there is something in the forums, im sorry for this post.
I was wondering how you would make the player a 2d billboard. Im working on creating a 3d world, but i want some 2d images, including the player, weapons, armor, basically anything that actually comes into contact like that with the player, to be 2d. Anyone please? ^^,
I was wondering how you would make the player a 2d billboard. Im working on creating a 3d world, but i want some 2d images, including the player, weapons, armor, basically anything that actually comes into contact like that with the player, to be 2d. Anyone please? ^^,
About the author
#2
i have another question though, how would you go about changing the character 3d block to a 2d billboard?
:x
this is so confusing to me.
07/05/2006 (7:44 am)
Ok thank you so much aaron!i have another question though, how would you go about changing the character 3d block to a 2d billboard?
:x
this is so confusing to me.
#3
07/05/2006 (8:13 am)
I do that with trees, i use billboards and 3dshapes ,and use the distans detail check to switch between them.
#4
The general idea would be to bring up your 3D object in a 3D viewer or modeling program, arrange it how you wanted (from top, from left, right, front, isometric, etc.), and then take snapshots of it (print scrn or something similar). From those snapshots, you could use Photoshop or the Gimp to edit out the solid color background (make it transparent), touch up the image a bit and then save it as a .PNG image file (which suports transparency data).
If you have the Torque Show Tool, that would come in really handy for this. In that case, you could load up a Torque character's animations and step through them frame by frame, capturing screenshots as you go -- using the super-cool screenshot combo (Ctrl + P). Doing it that way will create and save the screenshots for you in the TST directory and automatically number them for you as well. If you're working with Torque's DTS format and you don't already have the Show Tool Pro, you should really consider getting it.
Anyway, I hope this helps.
Aaron E.
07/05/2006 (8:21 am)
When you say 3D block, are you talking about a 3-dimensional cube object or just any 3D object mesh? There are a number of similar ways to make a 2D billboard from a 3D object. The general idea would be to bring up your 3D object in a 3D viewer or modeling program, arrange it how you wanted (from top, from left, right, front, isometric, etc.), and then take snapshots of it (print scrn or something similar). From those snapshots, you could use Photoshop or the Gimp to edit out the solid color background (make it transparent), touch up the image a bit and then save it as a .PNG image file (which suports transparency data).
If you have the Torque Show Tool, that would come in really handy for this. In that case, you could load up a Torque character's animations and step through them frame by frame, capturing screenshots as you go -- using the super-cool screenshot combo (Ctrl + P). Doing it that way will create and save the screenshots for you in the TST directory and automatically number them for you as well. If you're working with Torque's DTS format and you don't already have the Show Tool Pro, you should really consider getting it.
Anyway, I hope this helps.
Aaron E.
#5
If so, I'm sorry about that.
07/05/2006 (8:23 am)
Oops. It looks like I might have misunderstood your question. If so, I'm sorry about that.
#6
but i was wondering if i have something like a 2d sprite for the player on the game, how do i make the player 2d instead of 3d (when i say 3d block i mean the automatic blue 3d block dude that torque gives you when you start from scratch in the editor). i dont see how i would change the player from 3d to 2d even with a billboard, xD watch it be something simple or common sense.
if anyone knows how, please share.
07/05/2006 (8:37 am)
Its ok, because i plan on making the towns 2d, so i need billboards for houses, trees, ect too.but i was wondering if i have something like a 2d sprite for the player on the game, how do i make the player 2d instead of 3d (when i say 3d block i mean the automatic blue 3d block dude that torque gives you when you start from scratch in the editor). i dont see how i would change the player from 3d to 2d even with a billboard, xD watch it be something simple or common sense.
if anyone knows how, please share.
#7
Ok. This is just a guess, but you will probably need to create a new "player" in your 3D modeling app using a geometric plane and apply the appropriate transparent texture to that plane. Give it a proper bounding box, one or more collision boxes, an eye node and a cam node and then export it all out to a DTS shape. Make sure that when you export it out, that you have billboards turned on (check your exporter's documentation).
Then go into starter.fps/data/shapes/player and change the name of player.dts to playerBACKUP.dts. Next place your new billboard player in the same folder and change the name (if necessary) to player.dts. Once you've done all that, you can start up Torque and load a mission and . . .
well, to be honest, TGE might crash if your model wasn't made/exported correctly, but check the console log for details to help you track down what's wrong. With a little trial and error, you should be able to get this going.
You might also want to change the location and distance of the camera in your scripts. And also eliminate first person mode altogether.
Again, these suggestions are a best guess as to how you could do it in TGE.
07/05/2006 (9:17 am)
Ah. I get it now. I'm sorry to be so dense. Ok. This is just a guess, but you will probably need to create a new "player" in your 3D modeling app using a geometric plane and apply the appropriate transparent texture to that plane. Give it a proper bounding box, one or more collision boxes, an eye node and a cam node and then export it all out to a DTS shape. Make sure that when you export it out, that you have billboards turned on (check your exporter's documentation).
Then go into starter.fps/data/shapes/player and change the name of player.dts to playerBACKUP.dts. Next place your new billboard player in the same folder and change the name (if necessary) to player.dts. Once you've done all that, you can start up Torque and load a mission and . . .
well, to be honest, TGE might crash if your model wasn't made/exported correctly, but check the console log for details to help you track down what's wrong. With a little trial and error, you should be able to get this going.
You might also want to change the location and distance of the camera in your scripts. And also eliminate first person mode altogether.
Again, these suggestions are a best guess as to how you could do it in TGE.
#8
07/06/2006 (5:56 am)
Thanks so much! i just got home from partyin for the 4th, ^^ gonna try it before work time.
Torque Owner Aaron E
Default Studio Name
You may need to do a little engine code research. Try for the fxFoliage code. It's currently used for grass and low poly, distant trees/objects but there might be something in the code that can help you. Also, look at some of the documentation on the various DTS exporters out there. Matt Summers has put together some nice docs in PDF format for trueSpace/gameSpace, which includes a section on creating DTS shape billboars. Other helpful docs might be available describing billboards in other 3D apps.
This info should help you get started.
Aaron E.