Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Ronny Burkersroda, posted on January 08, 2005

Image Description, by Ronny Burkersroda

This image shows some frames of the morphing effect. It is used in a game prototype, which is developed by LightBrain GmbH (Hamburg, Germany). I provided the graphics engine and have written several 3D effects for that prototype.

The effect combines vertex tweening, alpha and texture blending basically and is enhanced by environment mapping and blooming in the version you can see. Before it is possible to morph between two objects the meshes have to be preprocessed to calculate the movement vector of every vertex. Then the meshes can be transformed by a vertex shader to render objects with similar looking shapes.

I described more details of the algorithm in the book ShaderX³, which also contains the DirectX 9 source code of the basic effect on CD.

If you want to see the effect in action you are able to download a video (around 15 MB) from my homepage:

Thank you and kind regards,
Ronny Burkersroda.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

January 09, 2005, 01:21 AM

WOW! That looks really cool man, nice work.


January 09, 2005, 05:49 AM

Woah, trippy! :)
How do you cope with objects with different numbers of vertices? Is that handled in the preprocessing you speak of?


January 09, 2005, 06:49 AM

Just out of interest as I don't have ShaderX^3, goes the algorithm like:

preprocess: find for every vertex of the destination mesh nearest vertex in source mesh and create a vertex buffer for the destination mesh containing these source vertex data

runtime: interpolate between source and destination vertex data in the vertex shader

Or is it somehow more sophisticated?

Rasmus Christian Kaae

January 09, 2005, 11:23 AM

That sounds like the typical linear interpolation :) From what I see on the image there are more to this. The morphing goes from source -> blobby structure -> destination.


January 09, 2005, 02:02 PM

yes ;) but it could still be linear interpolation with an intermediate blobby structure. Therefore my question if there is something tricky involved... Maybe the author or someone owning ShaderX^3 could give us a hint?


January 09, 2005, 04:42 PM


It is not more than a linear interpolation but there are two at the same time. The first is the source and the second the target mesh while one mesh is rendered with interpolated transparency over the other one.

In the prototype there are also two step objects, because it improves the visual quality dramatically. So the game first morphes between helicopter and first step object, then between first and second step object and at last between second step object and digger.

The preprocessing function tests every vertex of one mesh for an intersection with the other mesh. The vertex position is always used as ray position but the ray direction may vary. It can be the normal vector of the vertex or the direction between a center vector and the vertex position. This depends on the kind of objects and the effect you want to archive.


January 10, 2005, 12:11 AM


This thread contains 7 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.