Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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. myosis
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 14
    • Best 1
    • Controversial 0
    • Groups 0

    myosis

    @myosis

    2
    Reputation
    126
    Profile views
    14
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    myosis Unfollow Follow

    Best posts made by myosis

    • Render to texture transfer for C4D

      Finally had time to release the plugin.
      I started this project a long time ago, and its still not perfect but i'm using it with almost every project.
      I'm not a scripting wonder, it took me way more time then I wanted, therefor it's for sell, and not for free.
      Store
      Available for: R18, R19, R20, R21.

      Bake renders to textures
      Bake the render output directly onto a new mesh, or the same mesh.
      Because we are working with a boundary, anything that falls within will be baked.
      This even allows you to bake a displacement, or hairs as a texture.
      Full tutorial can be watched in this post or here on YouTube:


      Its a rather boring video sorry..
      In this (3 minute) video make a bake from start to finish, and go over the pro's and con's.

      Functionalities are:

      • Bake HDRI’s.
      • Bake Hires to low res.
      • Bake Hires onto itself (Can be done with no limitations).
      • Bake Hires onto itself with new UV map.
      • Low-res to new low-res with new UV layout.
      • Displacement, hairs, textures.
      • You get the point..

      Limitations are:

      • Not good with 90 degree corners.
      • Low poly mesh has to be simple and smooth.
      • Some hand clean up is necessary. (complex meshes)

      Small bug:

      • The undo function (Ctrl+Z) doesn't work properly. So please work in a new scene when baking.

      Hi-res to low-res
      alt text
      Even when the render does not use UV’s, you can simply transfer the data over to a new map.

      Redshift to texture
      alt text
      You can do the same for any Redshift renders by baking them first onto itself with ‘Redshift bakeset’ and to a new model / new uv layout with ‘render to texture’.

      alt text
      You do need to convert it to pollies and use a non hair material, but it works great! Creating alphas is also not a problem. This scene and tutorial video will be included in the download.

      Transfer texture to new model
      alt text
      An extreme example is to go from a cube to a sphere, obviously this would look very weird but it's possible. Therefore you can bake literally anything as a HDRI.

      Anything to a HDRI
      alt text
      When you bake using a sphere as a boundary you can turn anything into an hdri.

      Let me know what you think.

      Thanks,
      Myosis

      PS:
      For those who signed up a year ago, a discount code is on its way.

      posted in General Talk
      M
      myosis

    Latest posts made by myosis

    • Help Needed: Filtering Selected Edges by Length

      (Using: Cinema 4D 2025.1.1)

      Hi there,

      My Issue: I'm developing a Python script in Cinema 4D 2025.1.1 to filter the current edge selection based on a minimum length threshold. The goal is to keep only edges that are equal to or longer than the specified length.

      Problem: While using the c4d.utils.Neighbor
      class, several essential methods required for accurate edge mapping are missing in my environment, resulting in AttributeError. Specifically, the following methods are unavailable:

      • GetEdgeID(polyIndex, localEdgeIndex)
      • GetEdgeInfo(edgeID, pointsArray, polysArray)
      • GetEdgePolygonPoints(polyIndex, localEdgeIndex)
      • GetEdgePoints(edgeID)

      Only GetPolyInfo(polyIndex) and GetEdgePolys(a, b) are accessible, leading to duplicate edge references and inaccurate filtering.

      Holy Grail: I need the following Neighbor class methods to achieve precise edge filtering:

      • GetEdgeID(polyIndex, localEdgeIndex)
      • Purpose: Maps a polygon's local edge to Cinema 4D's global edge ID.
      • GetEdgePolygonPoints(polyIndex, localEdgeIndex)
      • Purpose: Retrieves the two point indices defining the edge.

      These methods are crucial for eliminating indexing mismatches and ensuring each selected edge is measured accurately in global space.
      Diagnostic Script: Below is a script that tests all kinds of Neighbor methods to identify which ones are available in my Cinema 4D 2025.1.1 environment.

      import c4d
      from c4d import gui, utils
      
      def TestNeighborMethods():
          doc = c4d.documents.GetActiveDocument()
          obj = doc.GetActiveObject()
      
          if not obj or not obj.IsInstanceOf(c4d.Opolygon):
              gui.MessageDialog("Please select a Polygon Object first.")
              return
      
          neighbor = utils.Neighbor()
          if not neighbor.Init(obj):
              gui.MessageDialog("Failed to initialize Neighbor.")
              return
      
          polyCount = obj.GetPolygonCount()
      
          print("========================================================")
          print("Testing Neighbor methods on the selected object...")
          print(f"Object: {obj.GetName() or 'Unnamed'}, Polygons: {polyCount}")
          print("--------------------------------------------------------")
      
          # List of Neighbor methods to test
          methods = [
              ("GetPolyInfo", lambda: neighbor.GetPolyInfo(0)),
              ("GetEdgeID", lambda: neighbor.GetEdgeID(0, 0)),
              ("GetEdgeInfo", lambda: neighbor.GetEdgeInfo(0, [-1, -1], [-1, -1])),
              ("GetEdgePolygonPoints", lambda: neighbor.GetEdgePolygonPoints(0, 0)),
              ("GetEdgePoints", lambda: neighbor.GetEdgePoints(0)),
              ("GetEdgePolys", lambda: neighbor.GetEdgePolys(0, 1))
          ]
      
          for name, func in methods:
              try:
                  result = func()
                  print(f"{name}: Succeeded. Returned: {result}")
              except AttributeError as e:
                  print(f"{name}: [FAILED] AttributeError: {e}")
              except Exception as ex:
                  print(f"{name}: [FAILED] {ex}")
      
          print("========================================================\n")
      
      def main():
          TestNeighborMethods()
      
      if __name__ == "__main__":
          main()
      
      

      Request: Given that only GetPolyInfo() and GetEdgePolys(a, b) are available, how can I accurately map global edge IDs to their corresponding point indices to achieve precise edge filtering? Are there alternative methods or workarounds to obtain the necessary mappings without the missing Neighbor methods?

      Thank You! Any insights or solutions from the community on accessing the necessary Neighbor methods or alternative approaches to achieve accurate edge filtering would be greatly appreciated!

      posted in Cinema 4D SDK windows python 2025
      M
      myosis
    • RE: How to access ‘Freeze View function’ with Python ?

      After a few years I'm still looking to access these numbers.
      If anyone knows how to set a custom X and Y number, please let me know.
      🙂

      posted in General Talk
      M
      myosis
    • Render to texture transfer for C4D

      Finally had time to release the plugin.
      I started this project a long time ago, and its still not perfect but i'm using it with almost every project.
      I'm not a scripting wonder, it took me way more time then I wanted, therefor it's for sell, and not for free.
      Store
      Available for: R18, R19, R20, R21.

      Bake renders to textures
      Bake the render output directly onto a new mesh, or the same mesh.
      Because we are working with a boundary, anything that falls within will be baked.
      This even allows you to bake a displacement, or hairs as a texture.
      Full tutorial can be watched in this post or here on YouTube:


      Its a rather boring video sorry..
      In this (3 minute) video make a bake from start to finish, and go over the pro's and con's.

      Functionalities are:

      • Bake HDRI’s.
      • Bake Hires to low res.
      • Bake Hires onto itself (Can be done with no limitations).
      • Bake Hires onto itself with new UV map.
      • Low-res to new low-res with new UV layout.
      • Displacement, hairs, textures.
      • You get the point..

      Limitations are:

      • Not good with 90 degree corners.
      • Low poly mesh has to be simple and smooth.
      • Some hand clean up is necessary. (complex meshes)

      Small bug:

      • The undo function (Ctrl+Z) doesn't work properly. So please work in a new scene when baking.

      Hi-res to low-res
      alt text
      Even when the render does not use UV’s, you can simply transfer the data over to a new map.

      Redshift to texture
      alt text
      You can do the same for any Redshift renders by baking them first onto itself with ‘Redshift bakeset’ and to a new model / new uv layout with ‘render to texture’.

      alt text
      You do need to convert it to pollies and use a non hair material, but it works great! Creating alphas is also not a problem. This scene and tutorial video will be included in the download.

      Transfer texture to new model
      alt text
      An extreme example is to go from a cube to a sphere, obviously this would look very weird but it's possible. Therefore you can bake literally anything as a HDRI.

      Anything to a HDRI
      alt text
      When you bake using a sphere as a boundary you can turn anything into an hdri.

      Let me know what you think.

      Thanks,
      Myosis

      PS:
      For those who signed up a year ago, a discount code is on its way.

      posted in General Talk
      M
      myosis
    • Hide Layers

      I would like to hide a layer from the layers manager.
      Much like NBit does with objects, tags, and materials.
      I’ve looked around in the Documentation but there doesn’t seem to be a existing function for it.
      Anyone know if it’s possible?

      posted in Cinema 4D SDK
      M
      myosis
    • RE: Grayed out or disabled X button

      @mp5gosu
      This sounds like the solution I was looking for 😅
      Thanks a lot!

      Ps, yes im a noob...

      posted in Cinema 4D SDK
      M
      myosis
    • RE: Grayed out or disabled X button

      Ah too bad. I need it to be a separate window, so the user can relocate it's position.
      I want to preform some actions upon closing (removing certain objects).
      But I can't seem to link that to the OS window X button, can I ?

      @mp5gosu Thanks for clarifying.
      @r_gigante And thanks for the link there is a lot of useful stuff on there.

      posted in Cinema 4D SDK
      M
      myosis
    • RE: Grayed out or disabled X button

      @mp5gosu said in Grayed out or disabled X button:

      AddGadget()

      Thanks for your reply!
      I still struggle to hide it, do I use it like this:

      import c4d
      from c4d import gui
      
      class TestDialog(gui.GeDialog):
          
          def __init__(self):
              self.AddGadget(c4d.DIALOG_NOMENUBAR, 0) 
          
          def CreateLayout(self):
              self.AddButton(1014, c4d.BFH_SCALEFIT, 100, 17, 'Close')
              return True
          def Command(self, id, msg):
              if id == 1014:
                  #CLOSE BUTTON
                  self.Close()
                  
              return c4d.gui.GeDialog.Command(self, id, msg) 
          def AskClose(self):
              return False
          
      if __name__=='__main__':
          dialog = TestDialog()
          dialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC,)
          c4d.EventAdd()
      
      posted in Cinema 4D SDK
      M
      myosis
    • Grayed out or disabled X button

      Hi,
      I'm a bit lost, maybe someone can help me out.
      Here a simple modal example:

      import c4d
      from c4d import gui
      
      class TestDialog(gui.GeDialog):
          def CreateLayout(self):
              self.AddButton(1014, c4d.BFH_SCALEFIT, 100, 17, 'Close')
              return True
          def Command(self, id, msg):
              if id == 1014:
                  #CLOSE BUTTON
                  self.Close()
                  
              return c4d.gui.GeDialog.Command(self, id, msg) 
          def AskClose(self):
              return False
          
      if __name__=='__main__':
          dialog = TestDialog()
          dialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC,)
          c4d.EventAdd()
      

      I want a dialog box with a grayed out or disable X button.
      I can change it to a different dlgtype, but those are not really what I need.

      Can I overwrite the “DLG_TYPE_MODAL” ?

      alt text

      posted in Cinema 4D SDK
      M
      myosis
    • RE: How to access ‘Freeze View function’ with Python ?

      @m_adam said in How to access ‘Freeze View function’ with Python ?:

      WorldContainer with the ID 25085

      So there are no WorldContainers for Y and X, ?
      And this is since R19 ?
      5454.JPG

      Above is R18, This is no longer possible ?

      Cheers,
      Tim

      posted in General Talk
      M
      myosis
    • RE: How to access ‘Freeze View function’ with Python ?

      This one:
      12.JPG

      posted in General Talk
      M
      myosis