Dan Andersen Show full post »
pshipkov
I see.

Check the attached file - i am displaying the mesh tangent, tension_direction vectors and the angle between them (normalized - 0-1 range).

Notice how when you move on X there is an angle change between the tangent and tension_direction vectors. That is because i use the tangent as a base to calculate the angle.
But when i move on Z - then the tangents and direction vectors are collinear - that's why the angle value is 0 or 1.

It eludes me right now what the math logic should be to alter anisotropy rotation on per-point basis outside the shader code.
Will need to think and research this a little.
If you have any hints, or ideas, or if you know online resources or examples of this kind of stuff - please don't hesitate. :)
Quote 0 0
Dan Andersen
Hmmm yes, I see the problem - thanks for the scene and explanation. I'll also keep digging and let you know if I find anything useful :)
Quote 0 0
David l
This is an interesting problem...

One hack I've been playing around with is looking up UVs on the restshape with the deformed points... This gives you the possibility to calculate the uv deltas and an angle from that.

There's two limitations on this approach, possibly more :)

- It doesn't work at the UV seams.
- It may not produce stable result on a complex production model, can't say really.


Got it working on a sphere, messy example file attached, maybe this can spark some ideas Peter? :)

stretch_tension.jpg 

//
David
Quote 0 0
pshipkov
Dang. You nailed it. Thanks Dave. :)
I am going to try it on a complex geometry tonight.
Quote 0 0
David l
You're welcome, looking forward to hear your results :)
Quote 0 0
pshipkov
This seems to be holding well - tried it on a high-res head with bunch of blend shapes for facial expressions.
Quote 0 0
David l
Good to hear Peter :)

Do you think you will implement a stretchuv feature in the tension node, or do you feel this is too case specific?
Quote 0 0
Dan Andersen
Awesome that we now have a working set up! I'm also curious if this functionality could be added to the tensionMap node, or if I should run with David's network?

Big thanks to both of you :)

Cheers,
Dan
Quote 0 0
pshipkov
If you need it now go for David's setup, otherwise I will try to add it in the tension node at some point soon.
Quote 0 0
Dan Andersen
Cool. We won't go into full production on this for another week or two so if the update's out by then I'll jump on it - if not, I'll borrow David's set up :)

/Dan
Quote 0 0
arichter

I also started to work on the microstructure deformation paper like Dan. And I was thinking to use SOup for it but I can't get the tension direction.

a) How does the tension map and direction exactly work?
(I am still not sure if the data is comparable to the one I would need to implement the paper)

b) What would be the best way to outsource the direction data as a colored texture like the tension map?

Thank you very much!

Best, Alex


tension_old.png 

Quote 0 0
pshipkov
1. Did you look at the example file at the beginning of this thread ? Let me know if you did and don't understanding it. Are you looking for a vector or a scalar per point ?

2. Regardless of the data type generated, the easiest solution is to use the "point" node for the calculations (or network of nodes in conjunction with the point one) and assign the results as point colors. Then write them on disk as image sequence using the vertexColorsToTexture tool located under the second SOuP shelf button.
Quote 1 0
arichter
1) Could you share the definitions you use for the tension and the direction? Since we would like to process these data further it would be very helpful if we know how these data is computed.

I did open the test scene but I wasn't sure if there is any direction relevance in it maybe I just didn't understand it.

2) Thanks! Are we talking about the "direction" attribute inside the Tension-Node? I wasn't sure which data type it is and how to convert it.
Would be cool if you could use "Out Direction" and apply it on a mesh directly or switch in tension visualisation from tension to tension direction. Maybe it is already as easy as that and I am just not very familiar with the data node flow in Maya.
Quote 0 0
arichter
Tension Direction:
I enabled the 'direction' attribute and used the 'Out Direction PP' to pipe it into 'point'-node into 'In Normal PP'(?). I added the current state to attachements.
Where are my thoughts misleading? Click image for larger version - Name: nodetree.PNG, Views: 9, Size: 219.60 KB
Quote 0 0
pshipkov
Of course there is direction relevance in the example scene. :)

The data you are looking for is located at:
point1.outWeightPP - the angle of offset between neutral and deformed points in UV space - you probably won't need this one.
point1.outNormalPP - displacement vector calculated in UV space and mapped to tangent/binormal in 3d space. This magnitude of this vector is the amount of displacement and its direction is ... well the direction of displacement.

The underlying network extracts data from neutral and deformed points.
The arrayExpression node calculates the stretch axis.
The point node calculates angle of offset and displacement vector.

Quote 1 0

Add a Website Forum to your website.