PDA

View Full Version : how to render 2 objects that are placed in the same position.


ogiejao
08-10-2010, 06:03 AM
I want to render 2 objects that are placed in exactly the same position in Maya.
I imported those from other 3d cg soft, and rendered it, but I could not render it properly in Maya.More precisely, those objects consists of human body mesh and tattoo mesh which has same topology of human body and is on the surface of human body.
Of course there is no problem about imported objects.Because those were rendered properly regardless of the position. And I exported those files that is modified in Maya into original 3d cf soft, then those objects were no longer rendered properly, so Maya must do something wrong to those objects.

I don't know why Maya cant do what the other cg soft can do.
I guess this has something to do with normal.
Can you tell me how to solve this problem?
Thank you.

kiryha
08-10-2010, 08:32 AM
Can you post some images that describe problem? May be viewport screenshot and render from maya and other soft.

ogiejao
08-10-2010, 12:08 PM
I can not post a image of the character, but this is the same situation.
Same size primitive shears in the exactly same position.
Those two are placed in X 0 Y 0 X 0, and all vertices is placed in a same position.
One shear is assigned with default lambert, and the other is assigned with red color blinn maeterial. I want to render the other shear properly without interfering with the other oddly like this image.

I always scale down the other object to render if I have to in Maya.
Like one object is fully color textured but the other is textured with a transparent map, partially visible.But scaling every objects is time consuming,So if It works without scaling,I wanna know how..

http://forums.cgsociety.org/attachment.php?attachmentid=155483&stc=1

robitabu
08-10-2010, 12:23 PM
Overlapping polygons are tricky to be rendered, the renderer doesn't have a way to know which mesh is to be considered on top of the other, result being quite not predictable.

I'd use layered shaders, quick and easy :-)

kuschel33
08-10-2010, 12:58 PM
Render both seperate and combine them in post...

ogiejao
08-10-2010, 01:07 PM
robitabu

I know layer shader, but I can not use it in the 3d cg application that I use right now.
I should say, It's a 3d cg game engine much restricted than Maya.

kuschel33
i separate and combine and render respectively, but nothing changes.

robitabu
08-10-2010, 01:31 PM
robitabu
I know layer shader, but I can not use it in the 3d cg application that I use right now.
I should say, It's a 3d cg game engine much restricted than Maya.


Ok, I guess that's quite a limitation ... tell me about it, why are you going to rendere this very 3d model in Maya, what's your point? How does it fit in your pipeline? Maybe I could help if I knew more about that.

First workaround could be using layered shader on a single mesh in Maya in order to get a nice rendering, then breaking up the layered shader and reassing every single material to distinct geometries in order to import them back into your custom 3d software in a format it likes ... I'm just guessing here, unless you'll be more specific about your needs.

ogiejao
08-10-2010, 01:49 PM
Ok, I guess that's quite a limitation ... tell me about it, why are you going to rendere this very 3d model in Maya, what's your point? How does it fit in your pipeline? Maybe I could help if I knew more about that.

First workaround could be using layered shader on a single mesh in Maya in order to get a nice rendering, then breaking up the layered shader and reassing every single material to distinct geometries in order to import them back into your custom 3d software in a format it likes ... I'm just guessing here, unless you'll be more specific about your needs.

I extracted some data from game and need to tweak some original meshes in Maya , and export it into the game again. But something goes wrong.

This game can only use one material per one mesh, so I need to use 2 meshes.
One is fully color textuered,character body and the other is partially visible, tattoo mesh.
So I can not assign material to distinct faces. And this game can not use other maps.

chafouin
08-10-2010, 03:59 PM
Then your tatoo mesh will use an alpha test shader no?
Anyway, if your two meshes are too close together, you will run into Z fighting (like what you have now in you render). So your tatoo mesh should have a little offset.

robitabu
08-10-2010, 05:12 PM
This game can only use one material per one mesh, so I need to use 2 meshes.
One is fully color textuered,character body and the other is partially visible, tattoo mesh.
So I can not assign material to distinct faces. And this game can not use other maps.

As I understand it's up to the game engine to choose which mesh is considered to be realtime rendered on top, and the game itself makes use of two different meshes. Ok, Maya doesn't work this way, and I don't know of a renderer that does such a trick, it's a very specific situation.

ANyway, my previous suggestion could help in this scenario, work with one mesh and a layered shader inside Maya; after tweaking it as you like, break the layer into different shader applied onto different meshes in order to satisfy you 3d game engine requirements.

ogiejao
08-10-2010, 05:43 PM
dot87
Tattoo mesh uses material with tga file that have an alpha channel.
Maybe I have to make an offset for those meshes in game engine.

robitabu
You must be right. I have to tweak meshes in the game engine.
I thought if this game engine can display those meses, Maya can do it too, but seems not.


Thank you for all people who advised me.

chafouin
08-10-2010, 10:17 PM
Tattoo mesh uses material with tga file that have an alpha channel.
Maybe I have to make an offset for those meshes in game engine.


You have to. In a game engine, the z buffer is smaller than when you render in maya. And this is the z buffer that decide which object is render in front of another (well there can be some exceptions, but let's keep it simple :) ) So if you run into trouble in maya, you will certainly have the same problem in-game. Except if your mesh is a "decal" and works as a projection on the mesh below it (but it would still need to be on top of the mesh so the projection works properly). For example, in many games, decal are used for bullet holes, blood stains.

Kel Solaar
08-10-2010, 11:39 PM
If your objects are at the same position and their vertices match, how do you expect one being hit by a ray or z sorted before the other ?

ogiejao
08-11-2010, 03:20 PM
dot87
Kel Solaar

I must learn Maya a lot more.
Thank you for your advice.

CGTalk Moderation
08-11-2010, 03:20 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.