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. Aaron
    3. Topics
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 23
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by Aaron

    • A

      Motion Blur, ExecutePasses in VideoPostData

      Cinema 4D SDK
      • c++ 2025 • • Aaron
      2
      0
      Votes
      2
      Posts
      75
      Views

      ferdinandF

      Hello @Aaron,

      Thank you for reaching out to us. Please follow our support procedures.

      You should consolidate your postings until we answer, i.e., update your last posting instead of creating new ones. I have consolidated your postings for you. You should also spend more time on making your problems reproducible for us. I know it can be easy to overlook in the heat of the battle but your question(s) are not as obvious to me as you probably think they are. As lined out in our support procedures, example code and/or scene data is usually required.

      I cannot answer every possible angle and interpretation this topic of yours could take, but I can state three things which come to mind when reading your two postings.

      What's the way to get several steps of motion blur transformation matrices for BaseObjects of the BaseDocument.

      That is simply not possible. A document has no notion of motion blur as it is a render effects implemented by a render engine, not something documents implement. Cinema's time system BaseTime allows for sub-frame accuracy, e.g., you could set a 10fps document to BaseTime(i, 30) and with that step with three sub-frames through the document. Simple things like position animations or other interpolated values will also work doing this. But simulations might yield different results than stepping with the natural frame rate through the document.

      And the most important thing is that there is absolutely no guarantee that this approach will result in 'matrices', i.e., transforms, that will match with what a render engine produces when you add some kind of sub-frame-based motion blur. Using this BaseTime approach is one way how the render engine could do it, but since render engines always have their own scene format, they could also do the calculation there, yielding different results than what Cinema's animation system would yield.

      When we want to add Motion Blur and call document->ExecutePasses(...) for some time then this POC is flushed and has no polygons or vertices, so it's not collected and can't be rendered

      It is too opaque for me what you are doing there to give a real answer, but:

      There is no guarantee that the caches of an object are built at any point except for when a render engine gets a scene state to render or inside GetVirtualsObjects when you manually build your dependent objcts. Usually, caches are built but depending on where you are, the cache of another object might not have been built or updated yet, resulting in either an empty cache or you looking at the cache output from the previous scene update. ExecutePasses has become a bit too popular tool recently. I guess that is partially my fault, because I have shown its usage in some examples. But executing the passes on a document is a very expensive operation and should only be carried out when absolutely necessary. I would absolutely not be surprised if something like liquids do not support stepping through a document with a frame rate lower than the documents frame rate. But without concrete data and example code I am just guessing.

      Cheers,
      Ferdinand

    • A

      BaseBitmap.Init("somefile.exr") crashes with multiple std::thread

      Cinema 4D SDK
      • 2025 c++ windows • • Aaron
      8
      0
      Votes
      8
      Posts
      187
      Views

      A

      @ferdinand said in BaseBitmap.Init("somefile.exr") crashes with multiple std::thread:

      omp #parallel

      Sorry for late reply, I am not advocating for std::threads, I understand your design explanation.
      The omp #parallel thing is OpenMP directive to launch parallel threads. It's an old but simple method.
      Actually I have made a solution by exploiting Cinema way of launching threads and it works fine.
      However, I hope it would be good to make BaseBitmap->Init a thread safe and independent call from other C4D threads and resources.
      I will collect an example for you with exr images soon.

      Cheers,
      Aaron

    • A

      How to access thinkin particles data channels correctly?

      Cinema 4D SDK
      • c++ 2024 • • Aaron
      3
      0
      Votes
      3
      Posts
      578
      Views

      ferdinandF

      Hey @Aaron,

      thank you for sharing your solution!

      Cheers,
      Ferdinand

    • A

      MoGraph color tag access

      Cinema 4D SDK
      • c++ • • Aaron
      4
      0
      Votes
      4
      Posts
      760
      Views

      M

      Hi @Aaron sorry I have to admit I totally overlooked your case.

      So Fracture Object is a bit special in how color is handled, and this is not as an usual mograph object, where there is Modata and an array of color. Instead each part is a different PolygonObject and the color is simply the color of the object (the one from the basic tab when you select a polygon object in the attribute manager). So with that said find bellow a code to read color.

      // Get the fracture object BaseObject* obj = doc->GetFirstObject(); if (!obj && obj->GetType() == 1036557) return false; // Retrieve the cache. The Cache of a fracture object consist of a null and a bunch of PolygonObject where // each PolygonObject represents a part of the fracture. BaseObject* rootObjCache = obj->GetCache(); if (!rootObjCache) return false; BaseObject* child = rootObjCache->GetDown(); Random randomGenerator = Random(); while (child) { // Read Color GeData data; child->GetParameter(DescID(ID_BASEOBJECT_COLOR), data, DESCFLAGS_GET::NONE); Vector color = data.GetVector(); ApplicationOutput("@"_s, color); // Write Color with new random value, note that we write the cache, meaning each new re-evaluation of the Fracture object will reset these changes Vector randomColor = Vector(randomGenerator.Get01(), randomGenerator.Get01(), randomGenerator.Get01()); child->SetParameter(DescLevel(ID_BASEOBJECT_COLOR), randomColor, DESCFLAGS_SET::NONE); // Get Next Polygon Object aka the next part from the fracture child = child->GetNext(); }

      Cheers,
      Maxime.

    • A

      Save Project with Assets not updating the maxon::Url of node textures in R26 and 2023

      Cinema 4D SDK
      • 2023 c++ maxon api • • Aaron
      9
      0
      Votes
      9
      Posts
      1.9k
      Views

      A

      Hi @Manuel I have checked the new update 2023.2.0 and the feature works just fine with custom bitmaps without any change from my side. Congrats with a very quick bugfix! This is very cool! 🙂
      Also it's great the half-year version 2023.2 doesn't need 3rd party plugin rebuild and recompile as in S24, S26. Thanks for this!

    • A

      C4D hangs when call BaseShader->Edit() for the message MSG_DESCRIPTION_CHECKUPDATE

      Cinema 4D SDK
      • r20 c++ windows • • Aaron
      5
      0
      Votes
      5
      Posts
      985
      Views

      M

      Since no news, I mark it as solved (closed), but feel free to open it again.

    • A

      Cinema 4D R20.059 bug with many RegisterShaderPlugin() calls

      Cinema 4D SDK
      • r20 windows c++ • • Aaron
      7
      0
      Votes
      7
      Posts
      3.0k
      Views

      A

      Hi Riccardo, I think the issue is solved because there is no any issue. Some not good methods of software distribution just confused us.
      Btw, what benefits different parameters of SetPluginPriority() give to us? For example the xdll has several plugins like materials, shader, tags and renderer. Even some icons with plugin ids. What priority is better to use in this case? I see https://developers.maxon.net/docs/cpp/2023_2/page_manual_module_functions.html
      For example, what is C4DPL_INIT_PRIORITY_ADVANCEDRENDER:

      Does it give higher thread priority during some PV rendering task? Or does it just load the plugin before other renderers and give the chance to lock system resources before others?