View unanswered posts | View active topics It is currently Sat May 03, 2025 6:14 pm



Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
 Transparency help please 
Author Message
Rank 15
Rank 15

Joined: Sun Jun 28, 2015 8:36 am
Posts: 243
Well I'm struggling for a couple of hours to create a simple prop. I need a sphere that has only a transparency map in its material.

Maya renders OK, filemaker seems to ignore texture. I tried almost everything I've read (including cloth).

Can be done through Maya alone or does it require shaders declared in .ini? If so could you please help with a file?


Sun Sep 27, 2015 4:15 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
I think you have to declare the shader in ini file for filemaker.

Just try this :
Code:
shader "myShader"
{
}

if you have 4 textures layers (in game) on your object, add this between the brackets:
thickness = 0;
(clothes are rendered with 4 layers by default, I don't know how it works for objects)


don't forget to set your maya project to the "/source" folder.
your texture path in maya should then look like : scenes\textures\tex_folder\some_tex.png (and not c:\....)

when running filemaker, it will convert your original png to dds.
if you don't see the line "converting xxx xxx xxx" (or an error), something is wrong.
If I remember well, the dds is created in the source dir, not in destination, so you have to copy the dds in the corresponding folder (same hierarchy on destination) to test your scene or you'll have a missing texture.

ps : I'm not familiar with objects, I only created clothes until now.


Wed Sep 30, 2015 9:43 am
Profile
Rank 15
Rank 15

Joined: Sun Jun 28, 2015 8:36 am
Posts: 243
Thanks.
I solved later, not sure if it is the best way:

Code:
 shader "AA_name"
{
  color_w_type = ALPHAX; //this enabled transparency
    anis = true;
    thickness=0;
 }


I set up the filemaker to copy the textures to the game folder:
Code:
maya_auto_copy = COPY_DIR;

Compgen compress0
{   compress = true;}


I have to find some time to play with the texture file, currently filemaker is converting my 32bit PNG to a 2 color texture (no antialias), same does my PS (I think I got my PS plugin settings mixed up)


Wed Sep 30, 2015 11:24 am
Profile
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1930
The default for a shader is:

color_w_type = ALPHA; // If texture has 4 channels, e.g. PNG with four channels, channel 4 is alpha channel, 1-3 channel are rgb colors.
color_w_type = NONE; // If texture has 3 channels. Normal color texture

So by default no shader declaration in the .ini is needed for alpha usage.
(If the alpha channel was e.g. a specular component it would have been needed)

It is important that the texture has a format that the filemaker can use.
I use SuperPNG in PS to save the texture alpha channel correctly.
(TGA should also work I think)


Wed Sep 30, 2015 11:31 am
Profile
Rank 15
Rank 15

Joined: Sun Jun 28, 2015 8:36 am
Posts: 243
Thanks

I'm going to install superpng.

When finally worked with shader I also noticed I applied my texture to diffuse map in Maya.
Maya copied the texture to the transparency map. Probably this was what I also had to do in the first place. (first time I loaded as transparence only, filemaker ignored the texture)

So I didnt need to call shader at all. This means my Maya document was fucked up.


Wed Sep 30, 2015 5:55 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
On my mod sources files, I have noticed that maya sometimes copy the texture to the transparency map, sometimes not.
I always use the same default png to all my cloth (uv template), I don't know why sometimes it is copied or not to transparency.
But it had no effect in game


Thu Oct 01, 2015 8:49 am
Profile
Rank 15
Rank 15

Joined: Sun Jun 28, 2015 8:36 am
Posts: 243
laissemoirire wrote:
On my mod sources files, I have noticed that maya sometimes copy the texture to the transparency map, sometimes not.
I always use the same default png to all my cloth (uv template), I don't know why sometimes it is copied or not to transparency.
But it had no effect in game


The right one is used as transparency map alone. That one is ignored by filemaker.

The diffuse texture should look like the left one and will be loaded as 2 maps in Maya when applied to diffuse.

You can use formats that support transparency (png is the best but I think tiff and tga also work. Jpeg doesn't support transparency)

In PS I have a texture layer with applied layer mask. I just exported as png.

Attachment:
hair.jpg
hair.jpg [ 93.01 KiB | Viewed 24769 times ]


Thu Oct 01, 2015 12:27 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
I just said that sometimes maya autocopy color to transparency, sometimes not.
I always use png with alpha channel for material color attribute (because filemaker only use this).

ex :
I swear that I never chose a file for transparency on braMat. And one day, maya set the same file as the color.
I didn't care because I know that I'm not using "texture + tranparency" but "transparent texture"
Attachment:
maya.jpg
maya.jpg [ 51.87 KiB | Viewed 24759 times ]


Thu Oct 01, 2015 1:27 pm
Profile
Rank 15
Rank 15

Joined: Sun Jun 28, 2015 8:36 am
Posts: 243
Hmm. I created a new Lambert material and added a file to color. The file was imediately copied to transparency.
This doesn't happen when I load it in transparency, the color remains unchanged.

I'm using Maya 2009. I haven't tested this a lot. Thanks, I'll double check this when I'll use transparency in the future.


Thu Oct 01, 2015 1:48 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
loki wrote:
Hmm. I created a new Lambert material and added a file to color. The file was imediately copied to transparency.
This doesn't happen when I load it in transparency, the color remains unchanged.

I'm using Maya 2009. I haven't tested this a lot. Thanks, I'll double check this when I'll use transparency in the future.

Maya magic. ^^
but as I said, it's not important for the game. just be sure the good one is in "color" attribute.


Thu Oct 01, 2015 2:13 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 64 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group.
Designed by X-Moon Productions.