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. rsodre
    • Profile
    • Following 0
    • Followers 0
    • Topics 54
    • Posts 186
    • Best 8
    • Controversial 0
    • Groups 0

    rsodre

    @rsodre

    11
    Reputation
    312
    Profile views
    186
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website studioavante.com Location São Paulo, Brazil

    rsodre Unfollow Follow

    Best posts made by rsodre

    • RE: Issues using GL Vertex Buffers

      Just found my problem, nothing to do with the drawing API...

      bd->SetDrawParam( DRAW_PARAMETER_SETZ, DRAW_Z_ALWAYS );
      

      It was setting the depth fragment on all the strands, occluding itself sometimes!

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: GetContour and GetVirtualObjects in one Plugin

      @pyr You can have both. GetVirtualObjects() is called first, and if you return nullptr GetContour() is called.

      But you need to register your object with OBJECT_GENERATOR | OBJECT_ISSPLINE.

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Error building R25 macOS - TypeTraitExpr

      Thanks for all the tips @ferdinand

      The solution was Catalina + XCode 12.4

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Description... missing member "ID"

      In R20, it changed to id[0]._descId

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • Rendering deformed Spline with Hair material

      Hi,

      I've always rendered my splines with Hair materials. After adding some custom modifiers, I simply cannot render anything anymore. Again, let's dive into old forum topics and start making tests to try and learn how things work.

      At first I learned that the relationship between GetContour() and GetVirtualObjects() has always been a hot topic, not mentioned anywhere in the docs. I discovered that by sending nullptr to GetVirtualObjects(), it will eventually try GetContour(). Because I have OBJECT_GENERATOR and OBJECT_ISSPLINE defined, to generate either a poly or a spline, based on parameters chosen by the user.

      About spline and deformers, here's what I discovered...

      • SplineObject returned by GetContour(): OK (rendered by Hair material)
      • SplineObject returned by GetVirtualObjects(): NOK (cannot be rendered by Hair material)
      • SplineObject returned by GetContour() + C4D Deformer (Twist): NOK
      • SplineObject returned by GetVirtualObjects() + C4D Deformer (Twist): NOK
      • SplineObject returned by GetContour() + custom Deformer: NOK
      • SplineObject returned by GetVirtualObjects() + custom Deformer: NOK
      • Native spline object (Circle) + C4D Deformer (Twist): NOK
      • Native spline object (Circle) + custom Deformer: NOK
      • C4D Hair + C4D Deformer (Twist): Can render, but not deformed
      • C4D Hair with the Deformers flag enabled + C4D Deformer (Twist): OK!!

      So... looks like the Hair material does not render modified splines. Why? Is that a limitation or a bug?

      But the C4D native hair has a Deformers flag that enables rendering of the deformed splines. How can it do it? I need that too!

      EDIT: Some curious findings about C4D Hair object...

      • When it has a deformer inside, instead of not rendering at all, it renders undeformed splines.
      • There's an option in the Hair object (Generate, Type) that when set to Spline, will not render hair (deformed or not).
      • There's actually nothing in the Hair Object cache looking at c4dsdk's Active Object Properties, unless we set it to Generate Splines. If it's not caching splines, then what?
      posted in Cinema 4D SDK c++
      rsodreR
      rsodre
    • RE: Project Tool freeze after win10 update

      @r_gigante , some details of what happened here, that looks like a dependency issue on kernel_app_64bit.exe...

      When you just start kernel_app_64bit.exe from External\Maxon\Cinema4D\ProjectTool\cinema4d_r20_project_tool_20180906 on the agent, you get an error "missing libmmd.dll"
      And Dependency walker shows that indeed the .exe depends on that dll and it cannot be found
      It looks like this dll was installed by someone on the agent, but the 1809 update removed it (Win10 updates are known for removing applications they consider "incompatible")
      I opened kernel_app_64bit.exe in a dependency walker on my machine and found that I get that libmmd.dll from some common Intel installation, probably of some drivers
      Then I wondered how Maxon expected the tool to run when it depends on a .dll that is not commonly included in Windows, and indeed I found that the dll is placed in resource\libs\win64 under the .exe
      But for some reason the .exe won't pick the .dll from that directory, and the fact that it happens to run on some systems is that they already have the dll installed by another app

      I now copied libmmd.dll from resource\libs\win64 to the directory of the .exe and it ran fine from Windows Explorer, let see if the TC build will work. The TC build succeeded

      I think MAXON should check why kernel_app_64bit.exe doesn't pick the dll from resource\libs\win64
      Now we have to move .dll to the directory of the .exe in our Svn repository as well (which is not how it is distributed by Maxon), to make fresh installs work too

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Catch other object's delete/undo

      @m_adam , AddEventNotification was exactly what I needed. I created a notification to NOTIFY_EVENT_UNDO, and then add my object to it. Now if I delete anything from my object after a polygon is deleted, it will be restored with Undo.

      Thanks!

      case MSG_NOTIFY_EVENT:
      {
      	CHECK_BREAK( data != nullptr );
      	const auto eventData = static_cast<NotifyEventData*>( data );
      	if( eventData->eventid == NOTIFY_EVENT_UNDO )
      	{
      		NotifyEventMsg* notifyMessage = static_cast<NotifyEventMsg*>( eventData->event_data );
      		CHECK_BREAK( notifyMessage != nullptr );
      		if( notifyMessage->msg_id == Int32( UNDOTYPE_DELETE ) )
      		{
      			eventData->doc->AddUndo( UNDOTYPE_CHANGE, Get() );
      		}
      	}
      	break;
      }
      
      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Python Volume access

      @m_adam got it! it's working now.

      The final code for my float sdf exporter is here.

      posted in Cinema 4D SDK
      rsodreR
      rsodre

    Latest posts made by rsodre

    • RE: Error building R25 macOS - TypeTraitExpr

      Thanks for all the tips @ferdinand

      The solution was Catalina + XCode 12.4

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Error building R25 macOS - TypeTraitExpr

      Ok, didn't know about that, will try.

      But on Catalina, projects are building with XCode 11.
      Installing XCode 12.4 right now to be able to make them universal....

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Error building R25 macOS - TypeTraitExpr

      @ferdinand said in Error building R25 macOS - TypeTraitExpr:

      Are you sure you are building with the legacy build system?

      if you mean to ask if I'm using the maxon_api, I'm not. My plugin contains camera effects, post-processing, and tags.

      You said this an old project, can you go back in your version control and see if the old version does build?

      no, it doesn't.
      but neither the cinema4dsdk project builds

      Have your tried replacing your frameworks with a 'fresh' batch from an R25.0 sdk.zip, in case you somehow 'tarnished' your current ones?

      yes, my R25.015 environment was failing, then I created a new one with R25.121, and see the same errors happening, on my plugin and on the cinema4dsdk sample project

      It could be the OS.
      This is the only difference from the last time I had to build it, in 2021, I stuck to Catalina for a long time, only upgraded recently.

      Anyway, my old macbook is requiring an upgrade for a long time. Will try Catalina on it...

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • Error building R25 macOS - TypeTraitExpr

      Hello,

      I added a little feature to my plugin, built it for R23 (which works on R24) and 2023, but am am unable to build the frameworks for R25.

      The same plugin was built successfully for R23 with XCode 12
      My R25 project is the same project sitting on my desktop since my last successful build. No new frameworks or anything.
      I tried regenerating sources and projects, all the same error.
      I always build the cinema4dsdk project as a baseline to make sure everything is working, and it also gives the same error.

      my setup...

      macOS 13.5.2
      XCode 12 / 13
      R25.015 / R25.121

      In file included from /Users/roger/Dev/C4D/SDK/C4DSDK/R25.121/frameworks/core.framework/source/maxon/weakref.cpp:2:
      In file included from ../source/maxon/weakrefservices.h:4:
      In file included from ../source/maxon/interfacebase.h:6:
      ../source/maxon/datatypebase.h:1828:57: error: cannot yet mangle expression type TypeTraitExpr
              template <typename T> Result<typename std::conditional<STD_IS_REPLACEMENT(same, T, Data) || (GetCollectionKind<T>::value == COLLECTION_KIND::ARRAY), T, typename ByValueParam<T>::type>::type> Get() const
                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /Users/roger/Dev/C4D/SDK/C4DSDK/R25.121/frameworks/core.framework/source/maxon/weakref.cpp:1:
      In file included from ../source/maxon/weakref.h:4:
      In file included from ../source/maxon/atomictypes.h:4:
      In file included from ../source/maxon/private_atomic_core.h:8:
      In file included from ../source/maxon/apibase.h:67:
      ../source/maxon/utilities/compilerdetection.h:303:70: note: expanded from macro 'STD_IS_REPLACEMENT'
              #define STD_IS_REPLACEMENT(name, ...)                                   STD_IS_REPLACEMENT_HELPER(__is_##name, __VA_ARGS__)
                                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      <scratch space>:140:1: note: expanded from here
      __is_same
      ^
      

      Screenshot 2023-10-30 at 11.20.48.png

      posted in Cinema 4D SDK r25 c++ macos
      rsodreR
      rsodre
    • RE: CreateRay

      Ok, but if RS can call it, when and how does it?
      Call just once... makes no sense, because the effect calls once per pixel at least, on every frame.
      Why would RS call it in a different context?

      What do you mean not fully functional?
      Is it partially functional?
      How so?

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: CreateRay

      Hey @Manuel ,

      Do you mean RedShift is compatible with C4D lens effects?
      Can I really use CreateRay() with RedShift?

      I have a lens plugin that works well on the standard renderer but not on the RS camera.
      Is there anything extra to do to enable it on RS?

      Thanl you,
      Roger

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: Bounding box transform

      Thanks @ferdinand, I think that clarifies my issue. I'll what I can do here.

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • Bounding box transform

      Hello,

      Is there any way to multiply the bounding box of an ObjectData::GetDimension() with an arbitrary transform?

      I get that the bounding box is always multiplied by the object's global matrix, but our workflow allows us to display a modifier at an earlier stage, where it should have a different global matrix. I can fix the object's display with BaseDraw, but it the bounding box ignores it.

      An an example, I corrected this object object display on BaseDraw to move it to the upper plane, but the bounding box is still attached to the bottom plane.

      Screen Shot 2021-05-13 at 19.04.45.png

      Thanks,
      Roger

      posted in Cinema 4D SDK c++
      rsodreR
      rsodre
    • RE: UVW coordinates in ShaderData.Output()

      @m_magalhaes Ok, is it going to be fixed on the bug report or is that a limitation we have to live with?

      posted in Cinema 4D SDK
      rsodreR
      rsodre
    • RE: UVW coordinates in ShaderData.Output()

      @m_magalhaes Difference between the viewport uvs and render uvs.

      This is the render, it is correct now, with uvs from 0..2:
      Screen Shot 2021-03-04 at 16.45.59.png

      But the material rendered at viewport does has normalized uvs (0...1):
      Screen Shot 2021-03-04 at 16.46.24.png

      posted in Cinema 4D SDK
      rsodreR
      rsodre