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. hSchoenberger
    3. Topics
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 16
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by hSchoenberger

    • H

      c4d.documents.RenderDocument does not apply OCIO Viewtransform

      Bugs
      • 2025 python • • hSchoenberger
      15
      0
      Votes
      15
      Posts
      2.1k
      Views

      ferdinandF

      Hey @hSchoenberger,

      as I said, what we provided is mostly a workaround, we'll have to streamline things. I cannot talk much about the details, since I do not yet know myself how we will solve this.

      Please open new topics for new questions in the future, especially bug reports should remain clean.

      Our render pipeline, and that includes commissioning third party renders, converges into a singular point. There are currently four entry points into that pipeline:

      The built-in commands such as "Render to Picture Viewer", "Render View", "Render Region", etc. For them this pipeline has been built initially. Also headless Cinema 4D instances such as the command line or c4dpy use this mechanism when invoked for a rendering. The c4d.document.BatchRender, uses mostly the same route as (1), but the drawback compared to RenderDocument is that you must always operate with files on disk. I.e., you cannot just change a document im memory and then render it, you must first save it to disk, and also your output will provided on disk and not as bitmaps in memory. As stated before, this is the way I recommend. You should not have to apply an OCIO hacks here, we are at least not aware of any issues. The .net Renderer, a.k.a, Team Render, similar to (2) functionally, just more complicated. And other than for (2), not all third party renderers do support Team Render. RenderDocument differs from these three in that it does not take the full length of our render pipeline, but just a subsection of it. RenderDocument is used internally to render icons and preview images and was never intended to be the 'programmatic rendering interface' it unfortunately has been marketed as and is used as by many third parties. The advantage of RenderDocument is that you can easily operate in memory only without any disk activity.

      Whenever I was asked in the past, I always told people that using RenderDocument as a render pipeline endpoint is not such a good idea because that is not what it is designed for. Mainly because there are also other short-comings due to it not taking the full route in the render pipeline (animations for example or the render data handling).

      With OCIO this worsened, as we have intertwined the render pipeline, the Picture Viewer, and saving output to disk even more, i.e., things RenderDocument is naturally left out of. I simply do not know yet how we will fix this, as this is largely not my code. But for me it is clear that this must be simplified in Python. This could either happen in the form of fixing RenderDocument regrading its Picture Viewer and BaseBitmap.Save, i.e., BitmapSaver interactions, or by giving the BatchRender more RenderDocument like qualities.

      The solution to this will not be super simple, and it will likely not arrive within 2025. For now there is a somewhat functional workaround for RenderDocument and you can always use the BatchRender.

      Cheers,
      Ferdinand

    • H

      Get information about renderer plugin via Python

      General Talk
      • 2024 python 2023 • • hSchoenberger
      6
      0
      Votes
      6
      Posts
      1.3k
      Views

      ferdinandF

      Hello @hSchoenberger,

      Sorry, but this is a C4D SDK question!
      It is NOT about the Octane SDK.

      "How can I list all installed renderer plugins in C4D with their version?"

      Although you have put your sentence into quotes, that was not what you asked, your questions were:

      Is there any way to get some information about renderer plugins?
      I want to get the version of the Octane plugin.

      So how I can loop through all plugins loaded and get some information from the plugins like the version?

      And I answered that: There is no public interface with which you could get the version of a plugin. And when plugins provide version information on their own, you must ask their vendors about that. You can access the flags a plugin has been registered with BasePlugin.GetInfo, the disk-level is in-accessible for you.

      You can detect installed render engines by looping over all video post data plugins and check if they have PLUGINFLAG_VIDEOPOST_ISRENDERER set (this assumes that the to be detected render engine sets this flag on registration - which is usually unavoidable as you otherwise cannot hook in the render system of Cinema 4D, but there might be 'rogue' render engines out there which side step things).

      import c4d doc: c4d.documents.BaseDocument # The currently active document. op: c4d.BaseObject | None # The primary selected object in `doc`. Can be `None`. def main() -> None: """Called by Cinema 4D when the script is being executed. """ plugin: c4d.plugins.BasePlugin for plugin in c4d.plugins.FilterPluginList(c4d.PLUGINTYPE_VIDEOPOST, True): if (plugin.GetInfo() & c4d.PLUGINFLAG_VIDEOPOST_ISRENDERER): print (plugin.GetName()) if __name__ == '__main__': main() # Example output for a vanilla installation. Physical Redshift Viewport Renderer

      Cheers,
      Ferdinand

    • H

      C4D R21 does not run on macOS within deamon any more

      General Talk
      • • • hSchoenberger
      7
      0
      Votes
      7
      Posts
      2.1k
      Views

      H

      Any update?