Transparent objects
by Eran Caspi · in Game Design and Creative Issues · 10/15/2005 (12:37 pm) · 24 replies
Hello
Im trying to do a fence, I did a 2 polys in Milkshape for the square shape
and I have put the fence texture on that but when I try to
import it to the game the object is almost invisible the only reason I saw it
is becuase I put it there (and there is the collision mesh :D)
The question is what am I doing wrong?!
In Milkshape the object is fine, The only 2 files I have is the object DTS
and the texture (in PSP I made the fence background invisible)
Here is the image of the object, I can't see it really in the image :\

but here I shot it so you could see that there is an object in there

and here is the object in Milkshape

Im trying to do a fence, I did a 2 polys in Milkshape for the square shape
and I have put the fence texture on that but when I try to
import it to the game the object is almost invisible the only reason I saw it
is becuase I put it there (and there is the collision mesh :D)
The question is what am I doing wrong?!
In Milkshape the object is fine, The only 2 files I have is the object DTS
and the texture (in PSP I made the fence background invisible)
Here is the image of the object, I can't see it really in the image :\

but here I shot it so you could see that there is an object in there

and here is the object in Milkshape

#2
1. yes, it is 2 triangles, Milkshape can't use quad
only triangles.
2. It is not double side and Im looking at the front
but just in case I checked both sides, both are the same.
(I know what side is the front becuase if Im going from the back
side I don't collide the object).
3. I don't have another file for the alpha map, when I exported the image
I told Painshop to make the white (the background was white) color transparent.
I also have to play with the slider, if it's 100% then I see the fence with the white background
and if I move it a bit the white background is gone but so is the object (in TGE of course).
10/15/2005 (1:46 pm)
Thank you for the fast reply1. yes, it is 2 triangles, Milkshape can't use quad
only triangles.
2. It is not double side and Im looking at the front
but just in case I checked both sides, both are the same.
(I know what side is the front becuase if Im going from the back
side I don't collide the object).
3. I don't have another file for the alpha map, when I exported the image
I told Painshop to make the white (the background was white) color transparent.
I also have to play with the slider, if it's 100% then I see the fence with the white background
and if I move it a bit the white background is gone but so is the object (in TGE of course).
#3
make an alpha channel in the texture in photoshop (do you understand what that means?). make the alpha channel a black and white version of your image, with the areas you do not want to render being colored black.
Try that.
10/15/2005 (2:35 pm)
Ok, try this.make an alpha channel in the texture in photoshop (do you understand what that means?). make the alpha channel a black and white version of your image, with the areas you do not want to render being colored black.
Try that.
#4
make an alpha channel in the texture in photoshop (do you understand what that means?). make the alpha channel a black and white version of your image, with the areas you do not want to render being colored black.
Try that.
10/15/2005 (2:36 pm)
Ok, try this.make an alpha channel in the texture in photoshop (do you understand what that means?). make the alpha channel a black and white version of your image, with the areas you do not want to render being colored black.
Try that.
#5
here is the texture

This blue background problem is wierd, I saw it once but nevermind
if you will open the image in PS you will see the transparent parts
and here is the alpha map

Now what? :)
10/15/2005 (4:30 pm)
I use Paintshop Pro 8 any way here is the texture

This blue background problem is wierd, I saw it once but nevermind
if you will open the image in PS you will see the transparent parts
and here is the alpha map

Now what? :)
#6
Ok, I copied the texture into Photoshop, but the alpha channel you posted wont even let me copy if for some reason...VERY strange.
Any way I will make and alpha channel that matches and email it to you if you will provide and email address.
10/16/2005 (12:08 am)
Sorry for the delay in getting back to you. I was away at a boxing match.Ok, I copied the texture into Photoshop, but the alpha channel you posted wont even let me copy if for some reason...VERY strange.
Any way I will make and alpha channel that matches and email it to you if you will provide and email address.
#7
a reply so don't worry about it :)
I don't mind giving you my email but I need to know
how to do it myself since I have more objects like that and I don't
want to ask you or anyone else to do it for me each time.
Here is the *.PSD file, you can see the layers and everything else
take a look and tell me if you see the problem.
10/16/2005 (2:28 am)
7:30 hours is pretty fast for me sometimes I wait more then 24 hours fora reply so don't worry about it :)
I don't mind giving you my email but I need to know
how to do it myself since I have more objects like that and I don't
want to ask you or anyone else to do it for me each time.
Here is the *.PSD file, you can see the layers and everything else
take a look and tell me if you see the problem.
#8
Toby.
10/16/2005 (3:17 am)
Typically, I've found that if you can't see the model, but you've exported it normally, it has something to do with the LOD. Check in ShowTools and force a certain LOD on it.. and you should see it.Toby.
#9
Lets look at your texture. the PSD File looks like this-
It has..
A top layer is labeled as "Alpha"
A middle layer is labeled as "Fence"
A bottom and empty layer labeled as "Raster 1"
Start by copying the "alpha" layer and then go into "channels" and create another "channel layer" (at which pont you will have 5 channel layers, #1 "RGB", #2 "RED", #3 "GREEN", #4 "BLUE", and the new and empty layer #5 "alpha 1")
Paste the copied "alpha 1" from your top layer into this new channel layer. Now you have an alpha channel in your image.
Now go back to the layers and remove/flatten all the layers to show only the "Fence layer".
Save the file as a .PNG (I suggest this, because it is the file format I use for all of my transparent textures...in fact all of my textures used in Torque.
Try using that and see what happens.
As Toby mentioned, it is possible that the item is not showing up due to level of detail setting, but I am assuming you made the item large enough to actually see, examined it closely in game and do not currently have any LOD (level of detail) stuff set, so the engine is doing its default LOD stuff.
So I don't think it is an LOD issue, but I could be wrong.
Last, if this fix doesn't work, texture the fence in a regular (non alpha texture) and check it in game (see if the object shows up) to make sure that it is in fact a texture/alpha problem that is the source of your trouble.
Hope this helps.
10/16/2005 (9:07 am)
I understand. no problem.Lets look at your texture. the PSD File looks like this-
It has..
A top layer is labeled as "Alpha"
A middle layer is labeled as "Fence"
A bottom and empty layer labeled as "Raster 1"
Start by copying the "alpha" layer and then go into "channels" and create another "channel layer" (at which pont you will have 5 channel layers, #1 "RGB", #2 "RED", #3 "GREEN", #4 "BLUE", and the new and empty layer #5 "alpha 1")
Paste the copied "alpha 1" from your top layer into this new channel layer. Now you have an alpha channel in your image.
Now go back to the layers and remove/flatten all the layers to show only the "Fence layer".
Save the file as a .PNG (I suggest this, because it is the file format I use for all of my transparent textures...in fact all of my textures used in Torque.
Try using that and see what happens.
As Toby mentioned, it is possible that the item is not showing up due to level of detail setting, but I am assuming you made the item large enough to actually see, examined it closely in game and do not currently have any LOD (level of detail) stuff set, so the engine is doing its default LOD stuff.
So I don't think it is an LOD issue, but I could be wrong.
Last, if this fix doesn't work, texture the fence in a regular (non alpha texture) and check it in game (see if the object shows up) to make sure that it is in fact a texture/alpha problem that is the source of your trouble.
Hope this helps.
#10
Which is the most important part :\
Do you mean I should copy the alpha layer untill Ill have 5 layers
(RGB, Green, Red ,Blue ,Alpha 1 (same as alpha?!))
and is the RGB layer is just like the alpha layer?
10/16/2005 (2:51 pm)
I tryied but I don't understand what you are sayin in those lineQuote:Start copying the "alpha" layer and then going into "channels and creating another "channel layer" (at which pint you will have 5, 1 "RGB", 1 "RED", 1 "GREEN", 1 "BLUE", and the new and empty one "alpha 1")
Paste the copied "alpha one from you top layer into this new channel layer. Now you have an alpha channel in your image.
Which is the most important part :\
Do you mean I should copy the alpha layer untill Ill have 5 layers
(RGB, Green, Red ,Blue ,Alpha 1 (same as alpha?!))
and is the RGB layer is just like the alpha layer?
#11
10/16/2005 (3:31 pm)
....WOW...guess thats what happens when I type without any sleep....sorry, check it again, I edited my post so it ....SHOULD make sense now.
#12
to do that in PSP8.
Could you please do this texture for me and send me the PSD file
so I could see how this can be done in PSP?
my email is ccaspi@gmail.com.
10/16/2005 (4:38 pm)
Now I understand but I still need to figure out howto do that in PSP8.
Could you please do this texture for me and send me the PSD file
so I could see how this can be done in PSP?
my email is ccaspi@gmail.com.
#13
Thank you Todd for the png and psd file but there is no change
I tried to use the texture you send me for the object
and it's still invisible
@Toby
Sorry for not posting a reply sooner, anyway
I don't have the ShowTools so I can't use it.
10/17/2005 (12:56 pm)
@ ToddThank you Todd for the png and psd file but there is no change
I tried to use the texture you send me for the object
and it's still invisible
@Toby
Sorry for not posting a reply sooner, anyway
I don't have the ShowTools so I can't use it.
#16
- import fence.3ds in Milkshape
- select the fence.png, assign it, now I can see the transparent texture in Milkshape
- export Torque DTS plus, select 'Material01: Tran', edit
- check 'Translucent' flag (maybe you missed that?)
- export into 'fence' folder in shapes
- put into Torque
voila!
10/19/2005 (11:59 am)
What I did:- import fence.3ds in Milkshape
- select the fence.png, assign it, now I can see the transparent texture in Milkshape
- export Torque DTS plus, select 'Material01: Tran', edit
- check 'Translucent' flag (maybe you missed that?)
- export into 'fence' folder in shapes
- put into Torque
voila!
#17
What did you edit in the material01: tran or something?
and how did you check the 'Translucent' flag?
10/19/2005 (2:51 pm)
Quote:
- import fence.3ds in Milkshape I did
- select the fence.png, assign it, now I can see the transparent texture in Milkshape I did
- export Torque DTS plus, select 'Material01: Tran', edit Huh?!
- check 'Translucent' flag (maybe you missed that?) 2xHuh?!
- export into 'fence' folder in shapes
- put into Torque
What did you edit in the material01: tran or something?
and how did you check the 'Translucent' flag?
#19
Im using this one, it's the one that came with Milkshape3D

I didn't know there is another exporter, can you give me a link
to this exporter please?
10/19/2005 (3:09 pm)
Well noIm using this one, it's the one that came with Milkshape3D

I didn't know there is another exporter, can you give me a link
to this exporter please?
Torque 3D Owner Todd Pickens
1- is it tripled aka not a quad, but 2 triangles?
2- is it double sided, if not are you looking at it from the wrong side.
3- what does your alpha channel look like? What is your transparency setting.
In my case, it gets the transparency from the alpha channel of the .png texture, but in the LightWave, I have to set the transparency slider to 50% before it kicks in.
Hope that helps.