question

Nicolas Brunet avatar image
Nicolas Brunet asked

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?


arnolddisplacement3ds max#vector
3dsmax-19i6rfp8we.png (545.5 KiB)
m8eebj1mop.png (546.1 KiB)
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered

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


qwe.png (23.0 KiB)
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Nicolas Brunet avatar image
Nicolas Brunet answered

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!


2 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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.


0 Likes 0 ·

Mischief managed!

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.