Instancing a rig = speed increase

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  05 May 2014
Instancing a rig = speed increase


I came across a situation where instancing a rig got my viewport to speed up dramatically, now I am wondering why...

I attached a file with my stripped down rig showing the situation:
- try rotating the view, I get around 4fps
- enable the "Rig_Instance", also disable "Rig" layers Visibility and Expression in the layer manager
- try rotating now, I get realtime feedback
- and if you move the "Controls_moveOnX" left and right you can see the rig still works

now... to me it seems c4d is doing some kind of caching of the instance in the background, but I couldn't find any such info in help, so I am wondering if any of you came across such an example and know why it is doing this, so I can have set up this from the start with speed in mind...

Thanks for any info!

Attached Files
File Type: zip (103.9 KB, 3 views)
Twitter | Ratata
  05 May 2014
OK, I was wrong, it is not the instance that is causing the speed up, it is the fact that you disable the Expression in the layer manager...

now this brings another question, what is c4d calculating, since the rig is not impacted by disabling or enabling Expressions in the layers manager...
Twitter | Ratata
  05 May 2014
so I tried to eliminate all the factors and came down to this, if you check the attached file:
- rotating the view I get 15fps
- if I disable the Expressions in the layer manager I get realtime viewport

but nothing changes other than the fps, so I presume this is a bug, since the effectors are acting as a deformer (so to disable them in layer manager you have to uncheck Deformers)

Looks like effectors have some redundant calculations going on in my case... or am I missing something?

Attached Files
File Type: zip (97.4 KB, 4 views)
Twitter | Ratata
  05 May 2014
I don't know why this is happening, but i know that this is the weakest part of C4D. It constantly refreshes things that have no impact on what you see in a viewport. It doesn't matter if something is animated or just static deformation, cinema refreshes everything all the time. There should be some kind of intelligent system to determine if something have a potential to change or not.
The only place where you can decide do you want to constantly refresh or not is Displacer. This is definitely an Achilles heel of cinema 4d. Just create something moderately complicated in terms of calculations and you can forget about navigating in a scene even when everything is just static.
  05 May 2014
AdsovonMelk, yeah lets hope this will be addressed in R16 :/

so what I learned out of this, if you are using Shader effector, put it in a layer and turn off Expressions
Twitter | Ratata
  05 May 2014
sandidolsak, in your RigExpressions test, leave expressions enabled, mouse out of the active window, mouse back in and then out again. You viewport speed will return to a high value.

It could be for whatever reason Cinema doesn't register the first mouse out and therefore doesn't cache the evaluation. Who knows - however no matter how you do it you'll never get real time performance out of something doing a ton of texture lookups, especially on a noise shader (in the case of a playing animation).

I didn't have a hugely detailed look at your scene, but as you are only using generated noise you could replicate the functionality with a Random Effector using Noise mode, and a second plain effector to simulate the effects of the second shader effector (which doesn't seem to be using a shader at all). This will be much, much faster.

Also, when you use an effector as a deformer on a spline, you force Cinema to handle the spline as a cloner, so it's iterating through all those points in a not too efficient manner to create the effect - in your case that's 150 virtual clones per spline. It adds up. Try using fewer points with interpolation.
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 02:41 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.