Navigation

    • Register
    • Login
    • Search
    • Categories
    1. Home
    2. chuanzhen
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    chuanzhen

    @chuanzhen

    rigger

    1
    Reputation
    25
    Posts
    114
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location 北京

    chuanzhen Follow

    Posts made by chuanzhen

    • RE: PoseMorph Tag question

      @m_adam Thanks for your help and look forward to the improvement of python doc☺

      posted in Cinema 4D Development
      chuanzhen
    • PoseMorph Tag question

      Hi
      I want to print PoseMorphTag Values(like point relative position),but seem to have some problems。
      code:

      def main():
          m_tag = op.GetTag(c4d.Tposemorph)
          mor = m_tag.GetMorph(1)
          node = mor.GetFirst()
          cnt = node.GetPointCount()
          print cnt
          for i in xrange(cnt):
              print i,":",node.GetPoint(i)
      

      0_1549855694156_question.png

      I want to get point(index: 167 or >12),but i don't know how to get?

      Thanks for anyone help!

      posted in Cinema 4D Development
      chuanzhen
    • RE: How to get the activated objects in the IN/EXCLUDE GUI?

      @mp5gosu Thanks, I will keep exploring that creating my own CustomGui. The greatest pleasure is the process of finding answers.☺

      posted in Cinema 4D Development
      chuanzhen
    • RE: How to get the activated objects in the IN/EXCLUDE GUI?

      @m_adam Thanks,although the problem has not been resolved, but got a good answer.

      Thanks also for the help provided by @mp5gosu ☺

      posted in Cinema 4D Development
      chuanzhen
    • RE: How to get the activated objects in the IN/EXCLUDE GUI?

      @m_adam Thanks,I still have a question about c4d how to implement the "Select Object(s)/Remove" command in IN/ExcludeGUI,this confuses me!

      posted in Cinema 4D Development
      chuanzhen
    • How to get the activated objects in the IN/EXCLUDE GUI?

      I searched a lot in the forum and still couldn't find the answer. But in c4d, the right-clicked the activated object in the gui can select or remove the activated object . Obviously it should have a way to get the activated object.

      Thanks for any help.

      0_1546922705214_未标题-1.png

      posted in Cinema 4D Development
      chuanzhen
    • RE: Some questions about PSD correction

      @m_adam Thank you for your team's reply.
      I will share my exploration in this post in the future.☺

      posted in Cinema 4D Development
      chuanzhen
    • RE: Some questions about PSD correction

      @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😉 )

      posted in Cinema 4D Development
      chuanzhen
    • RE: Some questions about PSD correction

      @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)

      def main():
      
          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()
      
          doc.AddUndo(c4d.UNDOTYPE_CHANGE,obj)
      
          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:
      
                      continue
      
                  m += weight * jmg * jsmi
      
              plist[pid] = ~m * plist[pid]
      
          plist = [~objmg*pos for pos in plist]
      
          obj.SetAllPoints(plist)
      
          obj.Message(c4d.MSG_UPDATE)
      
          c4d.EventAdd()
      posted in Cinema 4D Development
      chuanzhen
    • Some questions about PSD correction

      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.

        1. (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>

        2. (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 ?

        1. Although the correct relative distortion can be obtained by using script, the intermediate transition result is not as good as PSD correction (contrast results are shown in the figure).

      picture:

      0_1542635579440_PSD_output.png

      posted in Cinema 4D Development
      chuanzhen