Viewport 2.0 Bump node

Viewport 2.0 Bump node

Anonymous
Not applicable
1,001 Views
7 Replies
Message 1 of 8

Viewport 2.0 Bump node

Anonymous
Not applicable

Hi!

I am making a VP2.0 surface shader and a seperate bump node. If I use Maya's Bump2d node the output is connected to the shader's Nw property correctly. But if I use my own bump node, it is only connected to the destination property not the Nw.

I read a lot about this method, and in my shader I defined the bumpAttribute() function correctly. As the Maya documentation writes the connection to the Nw property is only made if I connect a bump node to the shader, so I'm guessing that I have to tell somehow at the C++/Python code that the given node is a bump node. I tried to use the utility/general/bump classification, it didn't work either.

Do you have any ideas what am I missing?

 

Thx,

Ferenc

0 Likes
1,002 Views
7 Replies
Replies (7)
Message 2 of 8

cheng_xi_li
Autodesk Support
Autodesk Support

Hi ferenc,

 

Can you send me a sample so I could take a look at it?

 

Yours,

Li

0 Likes
Message 3 of 8

Anonymous
Not applicable

Hi li!

Thanks for helping!

 

I attached the whole node: the basic, the override and the xml.

Unfortunately, we can't use Maya's default bumping node, because in the end we have to blend more normal maps.

 

Thanks again,

Ferenc

0 Likes
Message 4 of 8

cheng_xi_li
Autodesk Support
Autodesk Support

Hi cluedo11,

 

I'll work on it now.

 

In the meantime, if you could attach a sample of both nodes you mentioned and a sample scene would be better. I could have a full test environment to look at.

 

Yours,

Li

0 Likes
Message 5 of 8

Anonymous
Not applicable

Hi Li!

 

(Sorry for changing the accounts!)

So I created a simple test scene (maya ascii), there are two planes, one with a bump2d and one with our NormalMap shader, both connected into a different lambert shader (both connected to normalCamera attribute).

As you can see in the scene, the bump2d works fine, but with the NormalMap shader there is no bumping on the surface.

Also there is the mll and the png file as the map.

 

Thanks again!

Ferenc

0 Likes
Message 6 of 8

cheng_xi_li
Autodesk Support
Autodesk Support

Hi ferenc,

 

I've discussed this with our engineers. The bad news is there is no custom bump node available for Maya right now. Sorry about that.

 

If you want to acheive the goal, I think there will be two possible options:

 

1. Write your own surface shader. 

 

2. Use MPxVertexBufferMutator to modify the vertexBuffer of certain semantic. I think this way will effect on all maya shaders which use the semantic.  There is a sample in our devkit: vertexBufferMutator and hwPhongShader. You can check it out.

 

Yours,

Li

0 Likes
Message 7 of 8

Anonymous
Not applicable

Hi Li,

Actually we are using our own surface shader, I just didn't put it in the sample scene for keeping it simple.

The main problem, that it has a seperate normal_map attribute (plus a Nw attribute, where Maya connects it's normals).

I exported the full fragment graph and I realised that if I connect the bump2d node to the normal_map attribute Maya autimatically connects it to the Nw parameter and calculates the light with that map. But if I use our own NormalMap node it doesn't do this connection, so Maya uses it's own normals, not the connected map.

Is there anything I have to do in the surface shader to connect the NormalMap perfectly?

 

Thanks again,

Ferenc

0 Likes
Message 8 of 8

cheng_xi_li
Autodesk Support
Autodesk Support

Hi ferenc,

 

I am afraid you can only modify the normal map inside your own surface shader in that case. It's a part of geometry, the only chances to modify it is using a global MPxVertexBufferMutator or in your custom shader now.

 

Yours,

Li

0 Likes