Issue with cache generated by Voronoi
-
On 12/01/2018 at 06:36, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I face a cache generation issue in the following example.
I have a voronoi, which fractures an object using a matrix mograph as source.
The matrix mograph generates 2 points, so the object breaks in half.I also use a Plain effector that hides one of those 2 parts of the voronoi (by using scale -1).
To do that, I have placed a Mograph Selection on the Voronoi.The problem is that if I place the voronoi above matrix, I get wrong Cache from the voronoi.
If the Voronoi is placed below Matrix, I get the correct cache.Why is this happening ?
As document, I use GetActiveDocument().Thank you.
-
On 15/01/2018 at 08:25, xxxxxxxx wrote:
Hi,
my first guess is a priority issue in the scene. Whenever reordering of objects in the OM remedies an issues, that's something to take into account. So check and play around with the priorities of objects in concern. Please also see the documentation in our user help on this topic.
If the above does not solve the issue, could you maybe provide us with a test scene and more importantly a more detailed description of when and where you are encountering these issues. Plugin type? In which function are you trying to retrieve the cache? ...
-
On 16/01/2018 at 01:34, xxxxxxxx wrote:
Hello and thank you for your help.
In my initial post I made a mistake.
The scene doesn't work only if I clone the GetActiveDocument().
If I use directly GetActiveDocument() without cloning it, it gives me the correct cache.
Also, the cache I get from the vps->doc in VideoPost's Execute(...) works correctly.
So, It appears I do something wrong in cloning the active document.This is how I do it (code is minimized) :
clone_doc = (BaseDocument* )GetActiveDocument()->GetClone( COPYFLAGS_DOCUMENT | COPYFLAGS_NO_MATERIALPREVIEW , NULL); clone_doc->ExecutePasses(render_thread, TRUE, TRUE, TRUE, BUILDFLAGS_EXTERNALRENDERER);
How should I clone the doc so the OM reordering shouldn't affect the result ?
Thank you !
-
On 17/01/2018 at 05:58, xxxxxxxx wrote:
Hi,
first of all, while probably not related to your issue, you are using GetActiveDocument() in a VideoPost plugin. That's really not a good idea.
Always remember the rule: Never use the active document in a NodeData derived plugin.Then can you please try to call ExecutePasses() twice or even three times and see if it makes a difference?
Lastly, if there's no change on your end, please provide us with the scene, so we can have a closer look.
-
On 17/01/2018 at 06:12, xxxxxxxx wrote:
Hello.
Inside VideoPost's Execute(...) I use only vps->doc.
But, since I have to use the document to start a non-videopost rendering, my only choice is GetActiveDocument (right ?).By calling ExecutePasses twice I get the correct result !
How can I know how many times should I call it ?Thank you very much for your help Andreas !
-
On 01/02/2018 at 09:28, xxxxxxxx wrote:
Hi,
sorry for having you wait so long. Unfortunately I need to ask for more patience. I'm still in need for some feedback from development.