vertex morphing

Hi all,

I searched the forum and got a few unsatisfying results, so I will ask again in this thread.
I want to interpolate between different meshes. To complicate the situation, I want to morph between two meshes, then take this new mesh and morph it to another one. Think of an example like this.

-I morph mesh A to mesh B and stop when reaching 50% influence of each mesh.
-Use this new generated mesh and morph it to another mesh. stop at some point and so on…

Is this possible with Panda3D built-in functionality or do I have to write something new? I use blender with the chicken exporter

Panda supports a certain kind of vertex morphing that is often called “blend shapes” in animation packages. I know it works from Maya, and it might work from Blender (though I don’t know about that for sure).

When you have blend shapes enabled, you can specify the percentage blend of each of your different target shapes, and the final result is the weighted net of all of them.

David

Thx for your answer. that sounds good. Is there any further information available? maybe some links? thx in advance

Try searching the forums for “blend shapes”. People talk about these from time to time.

David

Thx. I have another question that appeared in this project but don’t want to open a new thread for every little question.

I want to interpolate between two textures. doing this synchronious leads to very bad framerate because the interpolation between two images is not that fast :wink:
I descided to put the time consuming calculations in a Thread using the Panda3D threading package. This hasn’t solved my problem yet. Some tasks are not executed whne the time-consuming thread is running. Using Thread-considerYield() is not applicable since one function-call that I cant split takes about 200 milli seconds. In this time it seems, that no frames are rendered. I searched for setting a lower priority for my image-blending-thraed but that don’t seems to be possible in Python.

thx in advance for every reply.

In Panda’s default compilation mode, as provided at this server, threading is cooperative. This means that threads will not yield the timeslice implicitly; they will only yield when considerYield() is called (or in other cases such as mutex blocking and such).

This is a convenience for developers, because it means you have to worry a lot less about deadlocks and race conditions, the normal demons of multiprogramming. On the other hand, it also means that you do not get the performance you might hope for if you cannot split a long-running function.

So, the short answer is: if you can’t find a way to insert a considerYield() call into that function, then you will have to accept a possible 200 ms freeze across all threads when it is running.

Or, you can compile Panda from source without the SIMPLE_THREADS flag, which will allow it to use true threading. This will get you the performance you expect–as long as you use only C++ threads–but you will have to be very responsible with your critical sections.

Note that even if you compile Panda using true threads, the Python interpreter itself will still impose a global lock on all Python threads, so that you will still have the same problem with parallel threads written in Python.

David