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
    • Register
    • Login

    VolumeData::AttachVolumeDataFake() in latest C4D 2024 API

    Cinema 4D SDK
    2024 c++
    2
    3
    435
    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.
    • fwilleke80F
      fwilleke80
      last edited by fwilleke80

      Hi,
      I noticed that, with the last C4D 2024 update, VolumeData::AttachVolumeDataFake() has two new parameters: Int32 fakeCurrentThreadIdx and Int32 fakeThreadCount. These are not documented, and not shown in the code snippet.

      Are these to fix the known issues with sampling a BaseShader from multiple threads (https://developers.maxon.net/forum/topic/12521/sample-a-shader-in-3d-space/15?_=1702535567135)? Will they allow me to sample multi-threaded again? What if I don't want to rewrite that code and decide to just continue sampling my shader single-threaded, do I just have to pass 0 as fakeCurrentThreadIdx and 1 as fakeThreadCount?

      Cheers,
      Frank

      www.frankwilleke.de
      Only asking personal code questions here.

      M 1 Reply Last reply Reply Quote 0
      • M
        m_adam @fwilleke80
        last edited by m_adam

        Hi frank, thanks for reporting, documentation will be adjusted.

        • fakeCurrentThreadIdx: Previously this value was stored in renderdata.RDATA_VDFAKE_CURRENTTHREAD. Now the parameter is passed directly for speedup.
        • fakeThreadCount: Previously this value was stored in renderdata.RDATA_VDFAKE_THREADCOUNT. Now the parameter is passed directly for speedup.

        So it's only for speedup reason it does not fix your issue with TexData.

        @fwilleke80 said in VolumeData::AttachVolumeDataFake() in latest C4D 2024 API:

        What if I don't want to rewrite that code and decide to just continue sampling my shader single-threaded, do I just have to pass 0 as fakeCurrentThreadIdx and 1 as fakeThreadCount?

        Correct.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • fwilleke80F
          fwilleke80
          last edited by

          Super, thank you!

          www.frankwilleke.de
          Only asking personal code questions here.

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