Recently I was trying to use RBF to drive pose morph. At the stage of the integration process ,I encountered some problems.
Question 1: When using PSD correction to convert to relative pose morph, the result is not correct.
(psd ---->relative use script): In the picture,using script to convert to relative pose morph, in the final skeleton pose, can get the final desired result. Script algorithm: expected result = skin + engraving = skin (original + pose morph) algorithm from j.p.lewis <Pose Space Deformation Notes>
(psd ---->relative use help doc): Use the help document function converted to a relative pose morph using PSD correction,in the final skeleton pose,can not get the final desired result
Question 2: What's the algorithm of PSD correction ?
we discussed your thread quite a while this morning. Unfortunately we are not completely sure, if this is an API/development related question or if it's rather a user side issue which you would need to ask to our user support.
On the other hand you mention a script. Could you maybe show us some code of the script causing the actual problem? And while asking this, is it correct to assume you are looking for a Python solution?
And I should prepare you, that we will most likely not disclose any internal information of algorithms used inside of Cinema 4D. But lets see, maybe that's not needed to solve your problem.
Lastly I already want to thank you for taking the time of making such a nice image describing the issue. I assume this will help tremendously as soon as we can see the code side, too.
@a_block Thank you for your reply!
This problem stems from the fact that when I tried to convert PSD to relative, I couldn't get the final result equivalent to PSD, so I started my journey of exploring PSD.
After reading a lot of articles about PSD, I tried to implement an algorithm I can understand in C4D. I thought I solved this problem, but I didn't. I found that the PSD of C4D is different. (C4D has better. The intermediate state + the correct result, but can not be correctly converted to relative), so this caused my interest, I want to further understand, so I sent this post.
It is understandable that any commercial software will not easily leak algorithms.
Here is the code: (currently a simple test phase, the calculation results are correct as in the picture)
obj = doc.GetActiveObject() #select after sculpt mesh
tag = obj.GetTag(c4d.Tweights)
objmg = obj.GetMg()
plist = [objmg * pos for pos in obj.GetAllPoints()]
cnt = len(plist)
jcnt = tag.GetJointCount()
for pid in xrange(cnt):
m = 0 * c4d.Matrix()
for j in xrange(jcnt):
rs = tag.GetJointRestState(j)
jsmi = rs["m_bMi"]
joint = tag.GetJoint(j)
jmg = joint.GetMg()
weight = tag.GetWeight(j,pid)
if not weight:
m += weight * jmg * jsmi
plist[pid] = ~m * plist[pid]
plist = [~objmg*pos for pos in plist]
Hi @chuanzhen, just to inform you, your topic is currently in discussion with the development team.
In any case, the algorithm will not be disclosed, only the conversion from PSD to Relative is involved.
@m_adam Understand your practices and thank you for your patience.
（Maybe I express unclearly before, so the translation may seem a bit reckless. I just want to get some guidelines instead of asking for the algorithm directly. I respect the labor results of maxon or everyone
It's ok, I have got your feedback,continue my exploration ）
Hi @chuanzhen, the development team just came back to me.
There is currently no way to get a vertex position of a PSD morph from a 3rd party developer.
This also means there is no way to convert PSD to relative.
@m_adam Thank you for your team's reply.
I will share my exploration in this post in the future.