On 29/07/2018 at 09:16, xxxxxxxx wrote:
Cinema 4D Version: R19.053
Platform: Windows ;
Language(s) : C++ ; XPRESSO ; PYTHON ;
I have been experimenting with Thinking Particles a lot lately.
Mostly generating cloud like shapes.
I know that there is the PyroCluster material etc.
But I want to make my own cloud render integration, to fit the whole plugin that I am creating.
I am thinking of trying to implement some kind of ray marching algorithm for the rendering.
Which I know how to do, but there are some c4d related questions I have.
My main concern right now is: Would that even be possible in a VideoPost Plugin?
Or in some kind of other plugin? Like only a metrial for example?
I have done some VideoPost plugins (and materials) a while back, but they were not as complicated as this would be.
I do have a few more questions, but for now, I just want to know if it would even be possible to implement a ray marching algorithm in a VideoPost, or material, or generally in c4d.
thanks in advance,
On 30/07/2018 at 07:19, xxxxxxxx wrote:
Hi Neon, thanks for writing us.
With regard to your question, the right and most promising approach is to start working on a VideoPostData which will provide you with all the bells and whistles for writing your atmospheric rendering engine and deliver the appropriate ray-marching algorithm.
That said, it's also pretty likely, that you'll have to write your materials but definitively this is something coming later on as you'll progress in your project.
Looking forward your next question, give best.
On 31/07/2018 at 04:02, xxxxxxxx wrote:
thank you for your reply!
I have looked into the CPP SDK and the example VideoPosts and I have several questions now:
1. Does it matter if I do this in Execute or in ExecutePixel, what exactly is CalcVolumetric?
2. How do I know that the particles are at the current pixel?
3. And how do I get the assigned material and it's data?
4. Since I am working with Thinking Particles would I have to use the particle geometry object for that?
I know that these are quite a few questions, but as I said, I only did very basic VideoPosts (basically changing the existing examples) and I want to get a better understanding of how they work.
On 08/08/2018 at 09:50, xxxxxxxx wrote:
Hi Florian, thanks for following up.
With regard to your question I prefer to answer per-point
- Does it matter if I do this in Execute or in ExecutePixel
Actually you should use ExecutePixel for the ultimate goal of specifying the pixel color. The VideoPostData::Execute() is actually the method used as "entry point" to get notified about all the steps the Cinema performs during a rendering process.
1.b what exactly is CalcVolumetric?
To which method are you referring to VideoPostData::CalcVolumetric or MaterialData::CalcVollumetric? The first actually deliver the computation on volumetric VideoPostData-derived FX-post effects. The latter is responsible for computing the volumetric effects in materials.
- How do I know that the particles are at the current pixel?
Accessing the VolumeData from the PixelPost being passed in ExecutePixel, you should be able to retrieve the particles that are visible in the current frame. That said, I think that being acknowledged if a particle is visible in a specific pixel is a matter of your engine design rather than on Cinema APIs.
- And how do I get the assigned material and it's data?
Just retrieve, as usual, the material from the geometry assigned to the emitter.
- Since I am working with Thinking Particles would I have to use the particle geometry object for that?
Hoping the notes above can help you to find your way for the atmospheric rendering engine, please bear with us if within the next week we might get delayed in answering due to the imminent release of R20 and the usual vacation period.
On 09/08/2018 at 06:01, xxxxxxxx wrote:
thank you very much for the pointers!
they certainly help me understand VideoPosts better, and how I implement it.