Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Rendering Thinking-Particles

 Post Reply Post Reply
Author
Message
NEON View Drop Down
Member
Member


Joined: 2015 Jul 23
Location: Austria
Online Status: Offline
Posts: 70
Post Options Post Options   Quote NEON Quote  Post ReplyReply Direct Link To This Post Topic: Rendering Thinking-Particles
    Posted: 2018 Jul 29 at 9:16am

User Information:

Cinema 4D Version:   R19.053 
Platform:   Windows  ;   
Language(s):     C++  ;  XPRESSO  ;  PYTHON  ; 

---------

Hello PluginCafe,

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,
Kind regards,
Florian
Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 261
Post Options Post Options   Quote knickknack Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Jul 30 at 7:19am
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.
Riccardo
MAXON Computer GmbH
SDK Support Team
Back to Top
NEON View Drop Down
Member
Member


Joined: 2015 Jul 23
Location: Austria
Online Status: Offline
Posts: 70
Post Options Post Options   Quote NEON Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Jul 31 at 4:02am
Hello Riccardo,
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.

kind regards,
Florian

Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 261
Post Options Post Options   Quote knickknack Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Aug 08 at 9:50am
Hi Florian, thanks for following up.

With regard to your question I prefer to answer per-point
1. 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.
2. 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.
3. 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.
4. Since I am working with Thinking Particles would I have to use the particle geometry object for that?
Yes.

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.

Best, Riccardo
MAXON Computer GmbH
SDK Support Team
Back to Top
NEON View Drop Down
Member
Member


Joined: 2015 Jul 23
Location: Austria
Online Status: Offline
Posts: 70
Post Options Post Options   Quote NEON Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Aug 09 at 6:01am
Hello Riccardo,
thank you very much for the pointers! 

they certainly help me understand VideoPosts better, and how I implement it.

kind regards,
-Florian
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.