PDA

View Full Version : Displacement Map Help



lord
03-19-2003, 03:08 AM
Hi all,

can someone please help me with a problem I am having with displacement mapping.

I have an object which is essentially a tube/cylinder, it is the neck of a character which is also rigged.

I am wanting to create a gulping effect, to express the anticipation of something landing on my character.

I decided to use a displacement map which I hoped would create a bulge that I could animate running down the character's throat.

Simple enough.

The Displacement Map goes like this:

There are 2 layers,

The first layer is a gradient map which uses a weightmap to constrain the displacement only to the throat area using the Alpha blending mode.

The second layer is an image map, which is essentially a white image with a black line through the centre which is cylindrically mapped and scaled around the neck.

To animate the gulp I've created keyframes in the second layers Y position channel - so that the displaced bulge starts under the chin and slides down the throat.

The results I am getting are unpredictable and not really what I was expecting.

the displacement maps position does not appear to remain relative to the necks position when the character is being animated.
Is this because of the bones deforming the mesh first before the displacement map?
Is there a way then of specifying the displacement map to work before the bones? Can't see if there is.

Perhaps there is a whole nother solution to my problem altogether?

Any suggestions?

I'm about to loose the plot on this one.
:confused: :(
I hope there is a kind soul who can help me solve this problem.

Thankyou very very much in advance.

Cheers...

lord
03-20-2003, 07:56 PM
Anybody -

Please....

Rather desperate here

Heimhenge
03-22-2003, 10:20 AM
If the bones are displacing the mesh of the neck then it's no longer a true cylinder. Displacement maps displace in a direction normal to the surface polys, so that could be the problem.

You never really say what the problem is except that "it doesn't remain relative to the neck position." Does it slide to the side? Stick out too far? Become more like swallowing a handfull of grapes thatn a single bulge? It would depend on just which way the bones are distorting the mesh, I guess.

I know of no way to make the displacement map act before the bones do. I don't think it would be the normal "order of layers" thing here. But it does sound like the distorted mesh has something to do with it. Perhaps someone else can provide more insight here.

Skonk
03-22-2003, 11:39 AM
You would probably get better results if u used the "Normal Displacement" displacement filter, and then use the layered textures and weightmaps from within that. Displacement maps only work in 1 direction (i think) where as "normal displacement" as the name suggests works on the direction of the effected polygons normal.

James..

lord
03-22-2003, 06:58 PM
Hey thanks heaps for replying guys,

To clarify here's two images of my character's neck (odd looking neck I know, it's actually the handle of a garlic crusher)

On the left is the neck as I would like it to appear as it does at frame 0.

On the right is what happens further on when I have animated the character using bones, this is not how I would like the displacement to look, as you can see the displacement appears to have become inverted.

Incidentally the displacement in these examples are not animated at all. Just the bones are animated.

I'm also using endomorphs on the characters face.

SpankDaddy
I'll give the Normal Displacement a go, see if that makes a difference.

Cheers,

Lord

Danner
03-23-2003, 09:38 AM
Download the siggraph 2002 content in newteks FTP and look at Chuggs_effector.lws

lord
03-26-2003, 01:20 AM
Thanks to those who've made suggestions,
I've made temporary fix to the situation.
More of a sleight of hand really- by avoiding to much animation via the bones.

seems that if the object is being deformed by bones then it changes the geometry before the displacement map can have an effect, which is very frustrating.
So you end up having the map not "fixed" in place.

I found the same thing happened with the effector as well.

The only thing that seems to work is the Bump Displacement, the downside to which is that you can't set the subdivision order to last, which means you either need a detailed mesh to start with or your left with chunky displacement!

Very frustrating.

:confused: