View unanswered posts | View active topics It is currently Sat Apr 27, 2024 11:13 pm



Reply to topic  [ 8 posts ] 
 same file on different materials 
Author Message
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
Dear XPAdmin,
I wanted to insert my buttons textures in the same file as my main mesh.
That way, if I want to propose multiple outfits at runtime (dungeon), I could also retexture the buttons. (buttons and cloth share the same file).

But, filemaker complains :
Cannot convert maya file './dress/sources/scenes/character6_cloth/body.ma' : Failed to connectAttr "bra_tex.oc" "braButtonMat.c": File 'bra_tex' already has material, in file './dress/sources/scenes/character6_cloth/body.ma' at line 66604, in file 'start.ini' at line 36

Of course my file is used by multiple materials !
because if you use the same material, I have a weird thing happening, buttons become big spheres!
probably because the body.ini file has different parameters for cloth / buttons and I don't know what they mean. I just duplicate the default ones.

shader "braMat"
{
view_offset = 0.015;
norm_offset = 0.001;

cull_face = false;

anis = true;
}

shader "braButtonMat"
{
view_offset = 0.03;
norm_offset = 0.0;
}


What I'm doing wrong ?
is there a way to do what I want to do ?
please :cry:


Fri Feb 27, 2015 8:25 pm
Profile
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1865
Please send me the .ma and .ini file you are using so I can look into what exactly you want to do.


Sat Feb 28, 2015 11:41 am
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
xpadmin wrote:
Please send me the .ma and .ini file you are using so I can look into what exactly you want to do.


I'll add an other file in 2 minutes...


Attachments:
File comment: different materials using the same texture file
character6_cloth.zip [1015.13 KiB]
Downloaded 567 times
Sat Feb 28, 2015 11:57 am
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
this time bra and button use the same material


Attachments:
character6_cloth2.zip [1015.11 KiB]
Downloaded 599 times
Sat Feb 28, 2015 12:23 pm
Profile
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1865
Ah, I understand what you are trying to do.

Because the texture is connected to both materials the filemaker gets confused.

Easiest way to solve this is by opening the 'hypershade', disconnect the texture from one material and create an new texture for the disconnected material like this:

Attachment:
hyper1.jpg
hyper1.jpg [ 346.19 KiB | Viewed 13849 times ]


This way there are two textures with the same file.

(Internally XSP will optimize this and only open the texture once)

Let me know if that works for you.


Sat Feb 28, 2015 12:24 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
okay many thanks, I will try this.

-------------------------
Plus, understanding how maya works is confusing =)
no easy way to remove a material from an object, the only method I found was to reassign to object the "default" lambert1
no easy way to remove to remove a texture from a material. In fact, once you attached something to a material (click on the checker) I don't understand how to remove it.
online help is quite confusing, everybody do things with different but so complicated ways...
I don't remember having so many headache using max, many years ago.

but I'll learn


Sat Feb 28, 2015 12:36 pm
Profile
Site Admin
Site Admin

Joined: Thu Feb 07, 2013 11:16 am
Posts: 1865
I always use the hypershade to delete a link (window->rendering editors->hypershade).

Manually creating links is indeed very annoying Maya, so I almost never do that.
But using the hypershade and the attribute editor most link related things are easy.

In the hypershade window, select one or more shaders and then clink on the >> to expand them (under 'graph', see image).
This way you can easily see all connected parts to a shader.

Then I click on the attribute editor (with material selected) and assign a new color texture to it.
By clicking on the color to add a new file.

Add the file to the shader like this (click on red square):

Attachment:
hyper2.jpg
hyper2.jpg [ 466.3 KiB | Viewed 13840 times ]


After that select the 'file' as render node and click on it.
Then fill in the filename.

Select the shader and expand it using the >> in the hypershader window to see if the links are now correct.

Hope this helps.

Also look for tutorials on this.


Sat Feb 28, 2015 12:48 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Sat Jan 03, 2015 1:05 am
Posts: 323
Location: france
ok, now it works !
thanks you.

this week I'll do more testing, be prepared to have some questions :roll:


Sat Feb 28, 2015 2:41 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 171 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.