Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. rgi
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    rgi

    @rgi

    0
    Reputation
    5
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    rgi Unfollow Follow

    Latest posts made by rgi

    • Need help making this script

      Hi, I am trying to make a python script for Cinema4D to help me with my repetitive task. I have a lot of models to optimize the same way. Look at the leaf in the picture:

      5b0afac8-7693-4fa4-828d-2022f8e98a5f-image.png

      I want to optimize the leaf by reducing the number of vertices on the circumference. I was doing it manually for a while but I realized there is a way to automate the task.

      What I have in mind is iterating each edge of the circumference and deselecting each point that has a high angle with it's neighbours. If the angles are low with neighbours, the point would stay selected so I can delete it, thus reducing vertices that are not needed to keep the general shape and uvs of the leaf.

      So the script should work with a preselected loop, doing dot product on each neighbouring edges and compare them to a treshold value, then deselect them accordingly.

      The result should look something like this:

      f794d5f9-4295-40ef-bd56-31e64b1dfb5d-image.png

      I know the results won't be always perfect with an automated solution, but efficiency is more important than looks here.

      I've been trying to make this script for a while with no sucess. Python has not been good to me..
      The most I've managed is a script that discards every second selected vertex randomly..

      Could someone make this script for me? I'd be willing to pay some money for this.

      posted in Cinema 4D SDK
      R
      rgi