Register Latest Topics
 
 
 


Reply
  Author   Comment   Page 1 of 4      1   2   3   4   Next
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #1 
Any way to get the direction of mesh stretch/compression? Would like to use it to drive anisotropy direction of specular (to cheat something like this: http://gl.ict.usc.edu/Research/SkinStretch/).
0
pshipkov

SOuP Jedi
Registered:
Posts: 4,702
Reply with quote  #2 
You can calculate this using existing SOuP nodes.
But i agree it will be better if supported out-of-the-box in the tensionMap node.
Will add it in the next update.
0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #3 
That's great news! Not to be cheeky, but any idea when the next update will be out? Just need to decide what route to take for our current show.

Thanks!

/Dan
0
pshipkov

SOuP Jedi
Registered:
Posts: 4,702
Reply with quote  #4 
What is your Maya version and OS ?
0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #5 
M2016 on Linux
0
pshipkov

SOuP Jedi
Registered:
Posts: 4,702
Reply with quote  #6 
I will try to come up with something over the weekend.
0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #7 
Nice, I'll give it a whirl as soon as it's ready :)
0
pshipkov

SOuP Jedi
Registered:
Posts: 4,702
Reply with quote  #8 
Try the attached build.

There are two new attributes on the tensionMap node:
"direction" in the AE
and "outDirectionPP" - a vector array attribute visible in the node editor. The direction vectors are normalized.

Actually there is a third new attribute - "remap".
By default it is turned off which means that the ramps will not be applied to remap the tension values, thus they will not be normalized in the value range of the ramps.
This changes the old behavior of the node. If you want to get back to what you had before - turn that attribute on.
This is a performance oriented change.
Looking up ramps is expensive and quite noticeable when done for lots of points.

 
Attached Files
zip SOuP.so.zip (2.16 MB, 10 views)

0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #9 
Excellent - I'll try and persuade our sysadmin to install it first thing tomorrow. Very keen to try it out!
0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #10 
So I've had a play with the new outDirectionPP. Would it be possible, for use in shading networks, to get the output as a scalarPP rotation in UV space?
0
pshipkov

SOuP Jedi
Registered:
Posts: 4,702
Reply with quote  #11 
Can you explain better what do you have in mind ?
0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #12 
I use mesh tension for shading purposes mostly (driving displacement maps, bloodflow, specular glossiness etc.).

For the specular anisotropy of my skin shader, I can get the amount of anisotropy from the stretch of the mesh (tensionMap.outRgbaPP) but I need a second value, which is the direction of the anisotropy. This is where a single rotation value in UV space would be perfect. This is what VRay and Arnold expects.

From the Arnold docs:
"The rotation value changes the orientation of the anisotropic reflectance in UV space. At 0.0, there is no rotation, while at 1.0 the effect is rotated by 180 degrees."

I have no idea how to make this conversion from vector to rotation in UV space mathematically, but that's where I hope you can help? :)

So if this is at all possible, perhaps outDirectionUvPP could be added in addition to outDirectionPP?
0
pshipkov

SOuP Jedi
Registered:
Posts: 4,702
Reply with quote  #13 
Check the attached scene.

 
Attached Files
ma tensionMap.ma (83.10 KB, 25 views)

0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #14 
Cheers for the sample scene. I tried hooking your network up to a deforming plane, but can't quite make sense of the output. I've attached the revised scene. Have I missed something?

https://www.dropbox.com/s/lsap36n3a28x2v3/tensionMap2.ma?dl=0
0
Dan Andersen

First taste
Registered:
Posts: 19
Reply with quote  #15 
To clarify: I don't understand why the points get flooded with 0/1 when the plane is deformed in the x-axis, while there is a range of values (as I would expect) when deformed in z.

I did a quick test where I used stretch/compression to drive anisotropy amount and your setup to drive anisotropy direction and apart from the issue above it seems to work, as far as I can tell (it's y in screenspace that's working and x that's not):

soupSpecAni.gif 

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation: