Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MAXtoA: Vector map = Mental Ray 3D displacement shader equivalent?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
1k0
Contributor
391 Views, 4 Replies

MAXtoA: Vector map = Mental Ray 3D displacement shader equivalent?

Hi everybody,

I'm trying to achieve short fur effect with displacement + orientation of the generated displacement with a vector map in 3Ds max and Arnold Vector map, as I did in the past with Mental Ray and its 3D displacement shader
The issue I'm encountering is the direction from the vector map seems to act like if there is already an offset in the angle.

I must do something wrong but I don't understand what yet:
When the vector map is plugged to the Displacement map slot in Arnold properties in the object:

(Top view)
3dsmax-19i6rfp8we.png- with a vector bitmap plugged in the tangent, the displacement is following the direction of the bitmap, with an offset in the angle, the displaced geometry should follow the straight lines

(Top view)
m8eebj1mop.png- without any bitmap plugged in the tangent slot, the geometry is displaced but already following an angle.
In both example I used the vector bitmap as albedo

Can you explain me what I'm doing wrong?
May be this is absolutely not the way to perform this kind of effect in Arnold?


Labels (4)
4 REPLIES 4
Message 2 of 5
madsd
in reply to: 1k0

This is a classic.

If you notice the vectors point in a 45 deg angle upwards, its because x y and z are pulled along the start of the vector, not the middle.
So you need to move the vector set into the correct midpoint sitting in 0,0,0. ( your midpoint sits in vector(0.5,0.5,0.5)

I havent really investigated your practical space but it sounds like you just need to move it into the correct space. Signed -1 to 1.
You also need to make sure that your input guide sits in -1 to 1. since a data set that sits in 0-1 has no concept of going into negative directions. you need positive and negatives to describe a circle with a center in 0,0,0 if you can sorta see that for the inner eye.

Not sure, but you can try download my Volume Displacement OSL node here, as that moves it into the correct space, the Arnold vector map also has a SIGN switch which does the same.

https://github.com/gkmotu/OSL-Shaders/blob/master/VolumeDisplacement.osl


You can also manual it out.

You start a range by defining the bottom, so you start with a value node set to -1
and so something like this, to transform the 0-1 range into -1 to 1.

-1+In*2

qwe.png


Here is another example closely related, an OSL flowmap I wrote.
It also move the RG painted data from 0-1 space into -1 to 1 and that is then why it is possible to make the water go in all 4 directions as seen in the intruction gif here.

https://github.com/gkmotu/OSL-Shaders/blob/master/Flowmap.gif

Message 3 of 5
1k0
Contributor
in reply to: 1k0

Hi Mads,

I knew it had something to do with vector initial pos, I was mumbling in my sleep trying to figure out solutions and when I woke up I saw your message, all was clear!

I quickly edited an OSL map with the information from your post and plugged it between my vector bitmap and the vector map shader, now everything works great.

3dsmax-zmzp5kvlgb.png
3dsmax-pthpgu8tur.png
Thank you very much!

Message 4 of 5
madsd
in reply to: 1k0

Super.
Could you flag my answer as accepted if it's working, this way it's more clear for other people that runs into the same case in the future.


Message 5 of 5
1k0
Contributor
in reply to: madsd

Mischief managed!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report