Game Development Community

[Beta 4]Billboards show up as "no material"

by Mike Rowley · in Torque 3D Professional · 07/19/2009 (10:32 am) · 13 replies

I added a shape replicator to my game, and used the browse button to choose my tree.dts.
When looking at it in the game, I get the "no materials" material on it instead of my shape and billboard.
Here's a screenie to show you.

The image file is a 128 x 128 png file and works in tge and tgea.
3dcentral.net/myPic/t3dBeta/betaRace/bush1_Billboard.png
I made a material.cs file for it to see if that would work:

new Material(bush1_Billboard)
{
   diffuseMap[0] = "bush1_Billboard";
   translucent = true;
   translucentBlendOp = LerpAlpha;
   translucentZWrite = true;
   alphaRef = 20;  // anything below this number is not visible and is not written to zbuffer
};
But that didn't fix the problem. Anyone have any ideas how I can fix this?

#1
07/19/2009 (11:45 am)
First thing to check, do you have the billboard texture in the folder with the dts? Is it the right texture that you exported?

Try setting the material up like this, using "mapto" and the folder location of the texture. Though it should show up anyhow.
new Material(treex1_bb)
{
   mapTo = "treex1_bb";
   translucent = 0;
   translucentBlendOp = none;
   translucentZWrite = 0;
   alphaRef = 180;  
   diffuseMap[0] = "art/shapes/foliage/treex1_bb";
   alphaTest = "1";
   materialCategory = "Uncategorized";
};

Have a look in the Material Editor to see if it's listed as a thumbnail.
#2
07/19/2009 (4:21 pm)
The first part is yes. The trees/bushes are from a pack I purchased and the folder is intact. It works fine in tge and tgea.

I'll try the different style of mapping and see if that works.

Well, decided to find out before I posted this.

Changing the material.cs didn't work. Removing the material.cs didn't work. I'm stumped.

Edit to add:
Even using Ben Garneys forest pack trees I still have this problem.
Here is a current screen showing the trees.
I have nothing left to try.
Trees without billboard images attached work fine.
#3
07/19/2009 (5:47 pm)
Are you sure that you've got the right name for the texture? Sounds daft I know. It sounds more like your model can't find the correct texture file to display.

My billboards work fine. Are you sure you haven't left "something" in the old TGEA folder? Or changed it's name at any point?

edit:

Open the dts file in a text editor, scroll down to the bottom and past all of the gobbledigook it should list the assets that the model needs starting with Exp-Catch-Root. It'll also name the textures that it works with. Is the name of your texture in there? Or is it different?
#4
07/19/2009 (6:44 pm)
The dts models check out with the textures in the folder. They are all calling for the correct textures. The thing that really gets me is I can't even get billboards to show up with eather of the replicators. (foliage and object) It's an odd one. They also don't show up independantly.
#5
07/21/2009 (12:50 am)
Mike , have you checked out if the so setup folder with model, textures and material.cs works in other versions of t3d?
#6
07/21/2009 (4:15 am)
Yes I have. Billboards aren't working at all. (including ground cover) which leads me to believe it's something on my end.
#7
07/21/2009 (6:40 am)
That's strange,because i have no problems with billboards in T3D.
You definitely miss something.
#8
07/21/2009 (11:00 am)
No problems with billboards here either. This "shrub.dts" goes back several years and a couple of versions of TGE ago:
i167.photobucket.com/albums/u143/heretek/torque/screenshot_005-00000-2-1.png

I saw mention of the trees in Ben Garney's Forest Pack -- those trees are a poor example to base a comparison on since they were specially designed for use in the Forest Pack.

There was a funny little bug with billboards that got fixed and did cause a couple of TGE/TGEa working objects with billboards to no longer display and/or crash the game. Maybe your object would have been one of those... but I thought that was fixed a beta version or two ago.
#9
07/21/2009 (3:17 pm)
I just tried the tree folder from tge 1.5.2/examples/starter.fps and they are working, but all black leaves, so it must be something to do with the tree models I was working with. I hate learning curves. :-D
#10
07/22/2009 (4:29 am)
I finally figured out what the problem was here. :slapsHead: I've had this problem before and after a long time of talking, asking questions, and filing bug reports, was told what the problem was. It was a simple as.....no normals on the dts shape. If I make the trees emit light, they show up properly. now to find that demo version of 3dsmax I downloaded ages ago so I can fix this
Thanks for all your help guys. It has really been appreciated. :-)
#11
07/22/2009 (8:20 am)
and remember. Putting "BB::" in front of the mesh names makes it a billboard. So first export it successfully without "BB::". If succeeded put "BB::" and it should be OK.
#12
07/22/2009 (3:08 pm)
Picasso, I didn't make the tree models. They are from various packs and stock torque. I just use what I can. :-)
They are named: tree_BB.png etc...
#13
07/23/2009 (12:15 pm)
no, you misunderstood me. I just wanted to say that any object (no matter if it is just a plane or compleh convex/concave object) it could be exported as a billboard too. I use 3ds max. In max put "BB::" in front of the mesh name and export. It will be a billboard then.