Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    Storing permanent data in channel shader?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 276 Views
    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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 04/02/2009 at 16:37, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.6+ 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hello,

      I have a channel shader and I would like it to store some custom data that is not freed over the whole rendering (means allocated in InitRender on first rendered frame and then only freed on destruction, not in FreeRender).

      This is no problem, but I would like to be able to read & write this custom data in the Output() function. Doing so somehow results in the custom data being corrupted and not containing the values I have set during Output() call.

      So my question is, is this possible at all or does the channel shader pipeline doesn´t allow permanent class members?
      Or is it only the writing of the data in the Output function making it not work (reading shouldn´t be the problem), due to maybe MP Threading of the function or whatever other reason?

      Thanks in advance for any info
      Best

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 05/02/2009 at 08:11, xxxxxxxx wrote:

        Wouldn't that be problematic anyway, for instance you have the material preview and stuff interfering. I think best way would be probably to store the data in a videopost.

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 05/02/2009 at 08:18, xxxxxxxx wrote:

          There is a quite big pipeline involved which makes sure that the custom data is only allocated when it indeed needs to be, so this shouldn´t pose a problem, but I´ll try the videopost way. This sounds much more logical.

          Thank you!

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