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

    Open source wrapper for Octane/Redshift/Arnold/Vray/Corona in Cinema 4D.

    General Talk
    programming learning-resource
    7
    23
    21.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DunhouD
      Dunhou @Dunhou
      last edited by

      Hi again,

      Also another Corona AOV example here .

      Finally preliminarily implemented using this library to approximate the operation of the renderer in Cinema 4D .

      The learning process was very enjoyable, hope you also have fun with it ✌

      Cheers~
      DunHou


      Result:

      3a357d30-a82d-4905-94ca-b914295cb296-image.png

      Code:

      import c4d
      import Renderer
      from Renderer import Corona
      
      def modify_corona_aov():
      
          # Get the doc host the aovs, in this case th active doc vp
          doc: c4d.documents.BaseDocument = c4d.documents.GetActiveDocument()
          vp: c4d.documents.BaseVideoPost = Renderer.GetVideoPost(doc, Renderer.ID_CORONA)
          # Set Corona AOVHelper instance
          aov_helper = Corona.AOV(vp)
      
          # turn on the mutipass
          aov_helper.enable_mutipass(True)
          
          # Add the DIFFUSE aov
          diff_aov = aov_helper.create_aov_shader(aov_type = Corona.CORONA_MULTIPASS_TYPE_ALBEDO)    
          aov_helper.add_aov(diff_aov)
      
          # Add some aovs
          aov_helper.add_aov(aov_helper.create_aov_shader(aov_type = Corona.CORONA_MULTIPASS_TYPE_EMISSION, aov_name = 'emmision aov'))
          aov_helper.add_aov(aov_helper.create_aov_shader(Corona.CORONA_MULTIPASS_TYPE_REFLECT))
          aov_helper.add_aov(aov_helper.create_aov_shader(Corona.CORONA_MULTIPASS_TYPE_REFRACT))
          aov_helper.add_aov(aov_helper.create_aov_shader(Corona.CORONA_MULTIPASS_TYPE_TRANSLUCENCY))
          aov_helper.add_aov(aov_helper.create_aov_shader(Corona.CORONA_MULTIPASS_TYPE_ZDEPTH))
      
          # Remove last aov: volume
          aov_helper.remove_last_aov()
      
          # Remove specified aov: wire
          aov_helper.remove_aov_type(aov_type = Corona.CORONA_MULTIPASS_TYPE_TRANSLUCENCY)
      
          # Print current aov info
          aov_helper.print_aov()
      
          Corona.AovManager()
      
      if __name__ == '__main__':
          Renderer.ClearConsole()
          modify_aorona_aov()
          c4d.EventAdd()
      

      https://boghma.com
      https://github.com/DunHouGo

      1 Reply Last reply Reply Quote 0
      • DunhouD
        Dunhou
        last edited by

        Hi community!

        New Updates here :

        • Fix some Octane and Corona functions (base on layer)
        • Add MaterialMaker and PBRPackage

        PBRPackage means a suite of pbr textures, like a stone texture pack form PolyHaven or Megascan, you can provide the folder and the name to get the slot they should be:

        • we have a texture pack named Rock Stone 01
        • this package had some textures in D:/myTextures ,like Rock Stone 01_albedo.jpg/Rock Stone 01_Normal.png/Rock Stone 01_disp.exr.
        • we can provide the folder like D:/myTextures and its name like Rock Stone 01
        • then we get textures in a dictionary
        data = {"diffuse": Rock Stone 01_albedo.jpg,
                      "normal": Rock Stone 01_Normal.jpg,
                      "displacement": Rock Stone 01_disp.jpg,
                      etc...
        }
        

        Material Maker can easily add pbr materials from a package, and also you can use it with individuals textures.

        But all of this build with this library, so only node materials on Redshift/Arnold/Vray, Octane and Corona is supported by thier own logics.

        Cheers~
        DunHou

        https://boghma.com
        https://github.com/DunHouGo

        1 Reply Last reply Reply Quote 0
        • DunhouD
          Dunhou
          last edited by

          Hi community!

          Add Basic CentiLeo Material support, also with ConvertPorts data, This a "new" GPU Renderer and in active development. I am very interested in it.

          Not add AOV due to still being in the early stages of development, waiting for this.

          Cheers~
          DunHou

          https://boghma.com
          https://github.com/DunHouGo

          1 Reply Last reply Reply Quote 1
          • First post
            Last post