Game Development Community

Converting b3d trees (made in TreeMagik) to dts & re-skinning,textures

by Jasper van den Berg · in Technical Issues · 02/05/2009 (10:15 am) · 16 replies

Hi,

Have been searching for a good way to export my trees from TreeMagik, and convert them to a format for torque (.dts), and found a way to do it through a pipeline for 3ds max. So what I done was; exporting through TreeMagik to 3ds max, then exporting from 3ds max to .dts format and impoting that to Torque World Editor. Also moved the textures used on the tree to the same directory as the model is on.

But now when I load my tree (.dts) in Torque World Editor, all textures are correctly applied except the texture on the leaves; all the leave textures are displayed with a black background... How can I fix this? (The background of the leaves textures should be transparant ofcourse)

Thanks in advanced,

Skyfe.

#1
02/05/2009 (10:32 am)
Is this in TGE or TGEA?
#2
02/05/2009 (12:56 pm)
in TGE
#3
02/05/2009 (1:40 pm)
TGE makes it harder. Check out the Docs here:

tdn.garagegames.com/wiki/DTS/OldDoc/Introduction

Basically, You need to set the opacity channel on the material, and have PNG file with an alpha channel.
#4
02/05/2009 (1:46 pm)
> Basically, You need to set the opacity channel on the material, and have PNG file with an alpha channel.

imagemagick might help automate what Jaimi describes.
#5
02/05/2009 (11:18 pm)
Ok thank you both, will try that out through the tutorial
#6
02/05/2009 (11:54 pm)
Well, I've opened the PNG image with Photoshop but the background in photoshop was just transparant... how come it shows up as a white background on Torque?
#7
02/06/2009 (1:03 am)
hm, that's strange.
what if you try loading the PNG as say the image for a GuiBitmapCtrl ?
or try creating a new PNG from scratch in photoshop with transparency and using that as the texture ?

ie, i wonder if it's something about the model itself, not the texture.
#8
02/06/2009 (6:14 am)
Hi,

thanks for the reply, and yes you were right, when I load it as a GuiBitmapCtrl then it does show the image as transparant, with a transparant background.
But how can I fix this so that it also shows it transparant on the model?

Thanks in advanced.

EDIT: when I load the model in 3ds max, and then add the material, the background also shows white (instead of transparant) Edit: ah nvm, that happends on all models where I try to load the texture on in 3ds max (it's never transparant)it's only transparant on a webpage and on the GUI Editor :X
#9
02/06/2009 (8:38 am)
wow weird.
unfortunately i'm out of ideas for the moment.
what type of torque object is the model ?
TSStatic, TSShape, ?
#10
02/06/2009 (8:41 am)
oh - what are the dimensions of the image ?
if it's not a power of two in each direction that could produce what you're seeing. ie - working on GuiBitmapCtrls but not working on models.
#11
02/06/2009 (9:25 am)
It's a Static Shape, and just a 2D screen of leaves on little branches, really weird that it's not working on models but it does work on 2D screens as GUI and Website, on the browser. Anyone got an idea what's wrong?
#12
02/07/2009 (12:31 am)
btw, this is the PNG image (the leaves texture) that I'm using:

alpha channel

normal channel, also transparant background
#13
02/07/2009 (4:06 pm)
huh, i dunno. looks a-okay to me.
#14
02/07/2009 (10:11 pm)
@Jasper - Did you set the opacity channel check box on in the material in 3dsmax?
#15
02/08/2009 (12:30 am)
Hmm, how do I do that (where can I check the opacity channel box in 3ds max?)
#16
02/08/2009 (12:58 am)
Hmm, When I put the material into 3ds max as an Opacity Map, and then change the Mono Channel Output to Alpha, then the background IS transparant, but then the leaves are gray... (the image itself is black/white, but the background is transparant now), so how do I fix this? Or do I need to do it in another way? (adding the texture in 3ds max)