x


crossfade between 2 models

i have 2 models showing one avatar in different poses. how do i crossfade between these model to indicate that my avatar changes? thanks a lot, flexrails

more ▼

asked Nov 17 '09 at 10:09 PM

flexrails gravatar image

flexrails
706 29 35 55

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It sounds like you're looking for mesh morphing, which is something that does not come out of the box. If your mesh is modest in size, you could however script this manually using the Mesh class. basically make sure that both poses have the same amount of vertices, and slowly move each vertex from the position it has in pose1 to the position it has in pose2.

If your avatar would have bones instead, this would become a lot easier.

more ▼

answered Nov 17 '09 at 10:19 PM

Lucas Meijer 1 gravatar image

Lucas Meijer 1 ♦♦
8k 19 43 85

interesting thoughts. thanks. i think i go with 2 separate models crossfading them rather than morphing.

Nov 17 '09 at 11:21 PM flexrails
(comments are locked)
10|3000 characters needed characters left

One more way to do it (not sure if it suits you):

  • put a material that can change its transparency (transparent\vertexlit, for example) on both avatars
  • make sure the second avatar's Rendered is disabled
  • fade out the first pose (by slowly changing alpha from 1.0 to 0.0 via changing renderer.material.color.a)
  • enable Renderer on the second avatar (also disable it on the first one as there's no need for it now)
  • fade in the new pose (slowly change alpha on the second avatar from 0 to 1)

I hope it helps ;).

more ▼

answered Nov 17 '09 at 11:08 PM

gnoblin gravatar image

gnoblin
194 4 4 4

that's what i have in mind. is it possible to do the fadein/fadeout in parallel?

Nov 17 '09 at 11:19 PM flexrails

You can do the fadein/out in parallel, that shouldn't be a problem. One thing that I feel is missing in the answer: You'd usually set the different avatars up with a common game object parent. That parent would then control the different avatars (fadein/out).

Dec 10 '09 at 05:03 PM jashan
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x584
x84

asked: Nov 17 '09 at 10:09 PM

Seen: 2313 times

Last Updated: Dec 10 '09 at 04:55 PM