RayObject void* userdata, how to use it? [SOLVED]

On 28/04/2015 at 06:40, xxxxxxxx wrote:

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

as the title says, in the documentation it is written "Only to be used by plugin renderers." , well I have a plugin renderer and I wanna know how to use this void* userdata from RayObject.

On 29/04/2015 at 06:03, xxxxxxxx wrote:

I assume it means you can point to any data you want. It's probably a helper variable so you can pass data of your own that you want to use in your renderer and where you only have access to the RayObject or similar situations.  But I have no experience with this, just my guess (maybe validate if that pointer is ever filled to be sure).

On 29/04/2015 at 08:08, xxxxxxxx wrote:


as Katachi said it is a pointer that you can use (but don't need to use) in your own rendering pipeline. If there is a certain dataset you want to associate with a certain RayObject you can use that pointer. This way you can access that data later, either in the VideoPost or in some other elements of  the rendering pipeline that have access to the VolumeData and RayObjects like materials or shaders.

Best wishes,

On 29/04/2015 at 12:37, xxxxxxxx wrote:

thanks Samir and Sebastian