PDA

View Full Version : Tension Based Displacement



Chris Jones
11-07-2012, 03:57 AM
Anybody had any luck getting a mesh to displace in areas of stress/compression (ie for wrinkles and such) on a UV mapped object? The DP Tension node works for bumps, but I'm finding it's adding mysterious blocky artifacts when used for displacement. Stress maps also do bumps, but seem to disregard normal vectors when used for displacement.

Thanx.

(c:

dpont
11-07-2012, 04:16 AM
Anybody had any luck getting a mesh to displace in areas of stress/compression (ie for wrinkles and such) on a UV mapped object? The DP Tension node works for bumps, but I'm finding it's adding mysterious blocky artifacts when used for displacement. Stress maps also do bumps, but seem to disregard normal vectors when used for displacement.

Thanx.

(c:

Tension node is not a shader, so I don't think that it adds artefacts by itself,
since it just analyses the geometry, it is important to detail your entire scene setup
for understanding this issue.

Denis.

RebelHill
11-07-2012, 04:51 AM
seem to disregard normal vectors when used for displacement.

How are u going about using it... ideally your displacement map is what ought be regarding the normal (direction), stress node output should simply be used to add/multiply the scalar component (length).

Chris Jones
11-07-2012, 05:15 AM
Tension node is not a shader, so I don't think that it adds artefacts by itself,
since it just analyses the geometry, it is important to detail your entire scene setup
for understanding this issue.

Denis.
Hi Denis - is this to say the tension node can do displacement under normal circumstances? If so I'll poke around some more and try to pinpoint the problem before I go into details.


How are u going about using it... ideally your displacement map is what ought be regarding the normal (direction), stress node output should simply be used to add/multiply the scalar component (length).
I've tried so many different things I don't rightly remember...! At this point I mainly wanted to check whether I'm barking up the wrong tree by trying to use Tension or StressMap for this - if they're known to work with displacements though I'll have another crack at it and let you know what I did exactly.

Thanks guys,

(c:

RebelHill
11-07-2012, 05:36 AM
here... scale the bone to see the effect. This is done both way, by default, in the surface ed, using bump displace. Done this way it just uses the geo/subD normal by default and animates fine, but is non interactive. Toggle bump off and disp nodes on, and u have the vector defined method, and it is interactive.

Chris Jones
11-07-2012, 05:49 PM
Thanks for the examples - I had mine wired differently, but am getting the same effect. If you put another bone in there and ramp up the SubPatch level you can see what I'm on about. It's more evident when Subdiv order is set to After Motion (which is where I need it to be). It's not cooperating with subdiv surfaces by the looks of it...

109026

(c:

RebelHill
11-07-2012, 05:52 PM
No good... subdivision has to be before displacement... ie after bones, to use these effects. Thats your problem, and there's no way round it.

Chris Jones
11-07-2012, 06:04 PM
It happens whatever the subdiv order. I've also just found that it doesn't even have to be subdivs - if you freeze the object, the problem is still there. Seems that it doesn't like 3-way poles..?

dpont
11-08-2012, 08:18 AM
It happens whatever the subdiv order. I've also just found that it doesn't even have to be subdivs - if you freeze the object, the problem is still there. Seems that it doesn't like 3-way poles..?

This more a limitation caused by the high Subd level,
so a frozen model is obviously better to use,
or no good result over 9/10 Levels,
in both surfacing or displacement context.

Denis.

Chris Jones
11-08-2012, 05:33 PM
Hmm... are you sure? I can still see blocky ridges at very low SubD levels, just not as defined obviously. And it's still there in a frozen model, but not as pronounced. Also, it looks like it's not restricted to 3-way poles after all; if you freeze the object in the example and subpatch it again, you get zig-zagging ridges in my 2-bone version of the scene, as if half of the polys have been smooth shifted. It's quite evident even at a SubD level of 3.

None of this occurs when textures are applied directly as a displacement though.

dpont
11-09-2012, 12:35 AM
...None of this occurs when textures are applied directly as a displacement though.

Again, it is not texture mapping neither a shader,
(despite its weird location in DPKit folder)
each time you add or remove geometry, tension node
gets different results, accumulating edge measurements
giving a local bilateral tension, the actual formula
is indeed not smooth with a high subdivided model.
Tension doesn't measure displacement distance
but averages all edge tensions around a point.

Tension node may reveal appropriate stressed area
for mapping on a well balanced model, not in this case.

Denis.

Chris Jones
11-09-2012, 01:19 AM
Not sure I fully understand, but I shall take your word for it. :)

What would constitute a well balanced model?

dpont
11-09-2012, 02:34 AM
Not sure I fully understand, but I shall take your word for it. :)

What would constitute a well balanced model?

You have no power about the 'balancement' of the
subdivision for such shape in Lightwave, I mean
the order of subpatches for adjacent cage polygons
and the order of vertices when LW is creating sub-polygons,
the limitation is intrinsect to the node when it is going to average
edge tension,
you just expect too much from this simple,
and fast algorithm.

Curvature node is more complex but for averaging surrounding
edge angles and slower, I'm not not sure that it could be usefull for
displacement.

Denis.

Chris Jones
11-09-2012, 04:25 AM
Ok, sounds like I'm not going to win the battle with Tension then... thanks for the clarification Denis. I don't think I can get what I'm after with Curvature, but that looks like it might come in handy for other things...

So... anybody know of any other ways to selectively affect displacements? Any reports of success with StressMaps?

dpont
11-09-2012, 09:50 AM
So... anybody know of any other ways to selectively affect displacements? Any reports of success with StressMaps?

With an 'area' mode instead of edge,
result is far better..

109044

Denis.

dpont
11-09-2012, 11:12 AM
Small animated Tension with Area mode, displacement and color,

109045

Denis.

Chris Jones
11-10-2012, 12:52 AM
I can still see creases, but this does look like an improvement. What is this Area mode... is it newly added?

dpont
11-10-2012, 01:34 AM
I can still see creases, but this does look like an improvement. What is this Area mode... is it newly added?

In the animation?
I add torsion to the upper bone,
so there are logical negative tensions
beside positive tensions,
this can be filtered with the other outputs
in the node,
that's not an improvement, just
a different method which looks more
homogeneous, no issue with subD.
Try it yourself.

Denis.

Chris Jones
11-11-2012, 10:31 PM
Actually, perhaps it's just the usual creases inherent in smooth-shaded SubD objects that I'm seeing.

I'd be interested in trying this technique on a more complex object, but unfortunately you lost me at "torsion".. :o Does this work with morphs and other deformations?

dpont
11-12-2012, 12:42 AM
Actually, perhaps it's just the usual creases inherent in smooth-shaded SubD objects that I'm seeing.

I'd be interested in trying this technique on a more complex object, but unfortunately you lost me at "torsion".. :o Does this work with morphs and other deformations?

I just meaned that I added other rotations to the upper bone
in the scene which was posted here.

Tension node works with the transformed/deformed
mesh, whatever the origin, bones displacement etc..
but respecting Layout subd/displacement order choices
so in my animation displacement gets tension of bones,
colored gradient gets tension of bones+displacement.

The measured tension is objective is both Edge or Area method,
but more geometrically homogeneous in second case,
if the result is still not what you expect,
it can be modified by a gradient.

If you want to test this Area method, just download the last DPKit.

Denis.

Chris Jones
11-12-2012, 07:02 PM
Ah, so it is newly added..! Seems to work - I'm getting a good deal of instability, but that could be due to insufficient ram, or something else. Also the amount of displacement increases when set to Area, but that's easily fixed.

I may have found an alternative way to get what I'm after, if only I can work out how to use the morph map node... but I'll make a new thread about that. I might post the results of where this is all heading once I get all the bugs ironed out.

Thanks for your help with this Denis. :thumbsup:

RebelHill
11-13-2012, 04:36 AM
Hmmm... something in my brain is already fielding a guess at what I think youre thinking about the morf node... Basically, all it does is deliver out a morf... Plug it into disp, set to 100% and its the same as if you had drug the morf slider. Really it just lets you apply morfs based on node flows. If ur thinking along the line I think you're thinking, then I suspect you may run into the object space only morf problem... though now Im wondering if perhaps a tangent space conversion can be done in nodal... hmm.