Get texture coordinates from shader nodes

Get texture coordinates from shader nodes

josephenry
Participant Participant
2,521 Views
2 Replies
Message 1 of 3

Get texture coordinates from shader nodes

josephenry
Participant
Participant

Hi,

 

Let's suppose that I have a terrain and I want to shade it based on the height of each vertex. (for example by mixing two layers of materials with a mask)

 

In Blender, I would do something like this :

 

Capture d’écran de 2020-10-08 15-59-45.png

 

I just extract the Z component of the Object texture coordinates (0 is at the center of the bounding box of the object) and plug it into the material output. Simple as that, which give me this :

 

Capture d’écran de 2020-10-08 16-01-56.png

 

Now I searched on internet but didn't find a way to get the geometry information inside Maya using Arnold as the renderer.

 

Could someone point guide me into the right direction?

Accepted solutions (1)
2,522 Views
2 Replies
Replies (2)
Message 2 of 3

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

You can simply use

a) a planar texture mapping or projection from the side, or

b) the samplerInfo node Point Obj or Point World Output.

https://forums.autodesk.com/t5/maya-shading-lighting-and/shader-that-changes-color-based-on-height-f...

 

Here a test for procedural terrain in Maya (using the mentioned techniques).

bg_proc_terraintest_small.gif

 

0 Likes
Message 3 of 3

josephenry
Participant
Participant

NIce, thank you for your answer, I am going to try this! 🙂

0 Likes