Simple particle system with python tag?
On 08/11/2014 at 02:02, xxxxxxxx wrote:
I've spent the last while trying to implement this, and still having problems and confused about how to go about it.
Lets say I want some random cubes appearing and disappearing over a period of time - each one has their own birth, lifetime, death etc. The cubes get inserted and removed from the scene accordingly.
From what I gather from this thread https://plugincafe.maxon.net/topic/7689/9710_create-userdata-solved&PID=42280#42280 ... I shouldn't be inserting objects periodically / randomly (from a python tag script) into the scene at all?
Regardless, I've been working away without too much problems with a particle system in this way, except for a strange problem with external rendering. If I want to render a still frame - the external renderer executes my script every frame from 0 up to the current frame. I don't know how to get around this - if I only want to render one frame to look at - my script will be rebuilding the scene every frame until the current frame - potentially making it very very slow on large scenes when I just want to render a single frame.
On 08/11/2014 at 04:54, xxxxxxxx wrote:
That's the way it works. Cinema needs to go through all frames to be really sure that it gets the correct
state at a specific frame. Many expressions are progressive (simulations) and can therefore be not
computed on the fly
I personally think there should be something like a flag for objects/tags that tell Cinema 4D if they're
progressive, and if there are no such objects/tags in the scene, it wouldn't need to evaluate all frames.
Except for writing a script that uses RenderDocument() with the RENDERFLAGS_EXTERNAL flag not
set, I think there is no way around it.
On 08/11/2014 at 05:13, xxxxxxxx wrote:
Thanks for that Niklas,
And just be sure it's still not wise to insert new objects into the scene every frame ? seems related..
anyway, I've an idea for a work around by reusing objects, rather than deleting and recreating.
On 10/11/2014 at 00:45, xxxxxxxx wrote:
the best way to create a particle system may be to use a ObjectData generator plugin that re-creates the desired geometry for each frame.
On 10/11/2014 at 01:47, xxxxxxxx wrote:
Thanks Sebastian - is this what the Python Generator is based on? This is what I'm now using and seems perfect, and much simpler, for what I need.
On 10/11/2014 at 02:50, xxxxxxxx wrote:
technically the Python Generator is just another ObjectData plugin. If the Python Generator's functionality let's you do what you want to do that's great! But there may be some things you may not be able to handle with the Generator and that have to be done with a "full" plugin.
For some details on the Python Generator you may take a look at the Cineversity article.
On 10/11/2014 at 03:38, xxxxxxxx wrote:
Yeah so far it's doing everything I need - and fast, steady and reliable