Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Alpha/Transparancy problem with meshes  (Read 477 times)
Ywa*NL
Community Member
*
Posts: 15


« on: October 06, 2008, 09:48:56 AM »

Hi everyone,

I've got a problem with alpha/transparancy. I've already asked for a solution on IRC. But they couldn't help me Sad .

I think it's the best if I just paste the link to the IRC conversation so you guys know the exact problem and the things I've already tried to solve it.

Here's the link: http://pastebin.com/ffba1e00

Any help is welcome.

Thanks in advance.

Regards,
Ywa
Logged
rootsage
Customers
Community Member
*****
Posts: 372

Gamer Enthusiast


WWW
« Reply #1 on: October 06, 2008, 12:28:02 PM »

I believe you'll need to add an alpha channel to your textures, using something like Photoshop, and then use:

Code:
Scene.SetAutoTransColor(CONST_TV_COLORKEY.TV_COLORKEY_USE_ALPHA_CHANNEL);

This is, at least, how I do it.
Logged

while( !( succeed = try()) );
------
10 print "Is this recursive?"
20 goto 10
Ywa*NL
Community Member
*
Posts: 15


« Reply #2 on: October 07, 2008, 09:00:23 AM »

That doesn't help. And how do I add an alpha channel to my textures? Save it as DDS?
Logged
ZaPPZion
Community Member
*
Posts: 341


« Reply #3 on: October 07, 2008, 10:31:40 AM »

you need photoshop or gimp or something like that for it. You can add an alpha layer in there, then save it as either *.tga, *.png or *.dds
I know that these 3 will support alpha channel stuff.
Logged
phether
Customers
Community Member
*****
Posts: 420


« Reply #4 on: October 07, 2008, 01:16:34 PM »

If I read correclty you are using JPGs.
JPGS do not support an ALPHA channel.
As such you have to specify a specific color for the engine to treat as transparent (not the recommended way of doing it, a better way is to use a textur format that supports an ALPHA channel)

The TrueVision3D engine lets you specify what color (as indicate by other posters) to use for your 'auto-transparent' color.
Again, I highly recommend learning to use a decent 'paint' program (i.e. Photoshop) and use a format that supports ALPHA channels and create the transparency you want right in the texture.
PNG are my preference because I also like to use the same textures in a non-3d environment and it doesn't deal with DDS or TGA well.


There are a few more options to using Photoshop, but could take a bit more work.

For example:
Microsoft DirectX Texture Tool will let you create a DDS file from another texture file. You can also load a (greyscale) Mask file to merge with your DDS file to create it's alpha channel.  You will have to read the documentation on how to do this though, it has been to long since I have last used teh DX Texture Tool.

cheers,
paul
Logged

Birds of a phether...
Code with pride not ego!
Zaknafein
Customers
Community Member
*****
Posts: 2670


WWW
« Reply #5 on: October 07, 2008, 07:16:50 PM »

Woah, long time no read, phether. Nice to see you're still around.
I've nothing to add the the above posts, just wanted to say hi.  Grin
Logged

zaknafein.
>> the instruction limit : my blog & samples repository! <<
jviper
Community Member
*
Posts: 1365

Discipline in training


« Reply #6 on: October 07, 2008, 08:25:54 PM »

I have one more peice of information that I have been given about this problem that may or may not have been mentioned here: He has a problem exporting models to TVM format from 3DS MAX when he is using Windows Vista. The exporter to TVM from MilkShape how ever works but apparently does not support .dds textures (you can either confirm or deny this as I have never used MilkShape for my modelling).

I will ask this however: Does 3DS MAX support .dds texture format? If so will the dds format still be supported through the 3DS MAX Exporter to TVM? If so, then my ovious suggestion would be to use .dds when you are modelling in 3DS MAX so that when you export, dds will be used.
Logged

JAbstract.....Don't just imagine, make it happen!
DarekRuman
Community Member
*
Posts: 101

game developer


WWW
« Reply #7 on: October 08, 2008, 06:52:27 AM »

Hi everyone,

I've got a problem with alpha/transparancy. I've already asked for a solution on IRC. But they couldn't help me Sad .

Hey, did you set SetBlendingMode(TV_BLEND_ALPHA,-1); to your mesh? Without it - even if you have transparent texture - mesh will not use alpha. Works for me - and i'm using dds format
Logged

www.reddotgames.pl
tv6.3 tv6.5 developer
pabloescobar
Customers
Community Member
*****
Posts: 95


WWW
« Reply #8 on: October 08, 2008, 08:20:48 AM »

I will ask this however: Does 3DS MAX support .dds texture format? If so will the dds format still be supported through the 3DS MAX Exporter to TVM? If so, then my ovious suggestion would be to use .dds when you are modelling in 3DS MAX so that when you export, dds will be used.
Yes, 3ds max have full support to dds format.
Logged

-----------------------------
http://criswork.blogspot.com
Ywa*NL
Community Member
*
Posts: 15


« Reply #9 on: October 08, 2008, 11:17:30 AM »

I'll try all those things you mentioned guys. Thanks.

Btw... It's better to use the 3DS -> TVM converter from TV3D then using Milkshape 3D Smiley .

Although I still got the question. Why doesn't it work to just simply add a texture as diffuse in 3dsmax and the alpha texture as "Alpha" (Like this)?
Logged
pabloescobar
Customers
Community Member
*****
Posts: 95


WWW
« Reply #10 on: October 08, 2008, 12:16:45 PM »

You really should read this http://wiki.truevision3d.com/tutorialsarticlesandexamples/using_dds about DDS format. If you really want use other texture format (like TGA, that u r using in SS), then the way to add alpha is this:

Code:
tex = TextureFactory->LoadTexture("c:\\thepath\\vn1.jpg");
texaplha = TextureFactory->LoadAlphaTexture("c:\\thepath\\vn1a.tga");
texwithalpha = TextureFactory->AddAlphaChannel(tex, texalpha, "mynew_texture_with_alpha");
And your last chance to use DDS format...  Tongue

Code:
TextureFactory->SaveTexture(texwithalpha, "c:\\thepath\vn1.dds", TV_IMAGE_DXT5);
Logged

-----------------------------
http://criswork.blogspot.com
Ywa*NL
Community Member
*
Posts: 15


« Reply #11 on: October 09, 2008, 05:01:32 AM »

I've got a DDS now with the alpha channel.

But how do I load the DDS good in 3ds? When I load it as diffuse color it doesn't got alpha. And when I add the same DDS as alpha and diffuse there's alpha. But not good (it uses to normal texture as alpha I think). How to solve this?

Thanks in advance!
Logged
pabloescobar
Customers
Community Member
*****
Posts: 95


WWW
« Reply #12 on: October 09, 2008, 05:08:36 AM »

Just set the same DDS texture in diffuse and opacity channels in 3ds max material editor, just like the picture bellow.


http://img258.imageshack.us/img258/5962/screenshot122pn5.jpg
Logged

-----------------------------
http://criswork.blogspot.com
Ywa*NL
Community Member
*
Posts: 15


« Reply #13 on: October 09, 2008, 05:27:08 AM »

It works now Cheesy .

Thanks guys and especially pabloescobar Smiley .
Logged
pabloescobar
Customers
Community Member
*****
Posts: 95


WWW
« Reply #14 on: October 09, 2008, 09:25:48 AM »

ur welcome...  Wink

ps: actually you dont need set the opacity channel to export as TVM/TVA, the diffuse is enought. The opacity channel is only to watch the alpha effect in 3DS Max.  Smiley
Logged

-----------------------------
http://criswork.blogspot.com
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks