Page 1 of 1

Fusion 3D: RAM consumption quesion.

PostPosted: Wed May 06, 2015 2:48 pm
by Serge Ilinov
Hi there.
These day's I've stucked alot with subj issue... And trying to understand - why this happened?
Unlikely this is a bug... but it is a fact that I don't understand why this happening..
So, pretty simple comp: fast noise-->Merge3D-->Renderer
fu_comp.JPG
fu_comp.JPG (88.39 KiB) Viewed 3484 times


If I hit "render" - i got realtime rendering (25fps). and after 100 frames RAM outgo is like 80mb atall. fine.

Now I want to animate Noise texture.. via set keyframes on seethe attr on fastNoise.

Then playback whole framerange (100fr) of this animated noise (just view this noise on my viewer)
i got 12fps and 530mb RAM consumption.. ok, not bad for 2K texture.

Now I want to view renderer output ... and hit "play"..
and, gotta very surprised by the fact that playback speed become 1.5 fps! AND mad! RAM consumption - like 100-200 mb per frame.. and 10Gb for 100 frames!
just WOW.
fu_animated_texture.JPG
memory consumption while playback 100 frames with animated texture
fu_animated_texture.JPG (125.97 KiB) Viewed 3484 times


So, guys, can some body explain - why this happened?
And is there a ways to optimize this ? Because my scene suppose to use some of animated textures ..
For now I can see only one solution - not use textures at all.. but apply them later via UV coordinats as post-process.. Its cumbersome... and I don't like it.. but ..

PS:
switching from openGL rendering to software didn't help.
I tested it on both Fu7 and Fu6.4. result the same.

thanx for watching.


PS:
HA!!! Looks like this is a bug :D
Because I tried shape3D instead of ImagePlane3D - and all plays sweet! lalalalaa....
PPS: hmm.. looks like not so easy... when I changed shape subdivision to the same as in imagePlane - result become the same... - huge memory consuming..

UPD:
ok.. i've found relationship ... - when my 3DImagePlane has default subdivision 10 - all plays fine.
but while I start increase subdivision value (up to 2138) - playback (and rendering) speed become greatly down.. and memory consumption become greater and greater :(
it is normal behaviour?

Re: [BUG?] Fusion 3D: RAM consumption quesion.

PostPosted: Wed May 06, 2015 8:26 pm
by Chad Capeland
Ok, so this is going to sound weird, but the input to your otherwise static geometry is now an dynamic image. So every frame the input to your tool is invalid. You see where I'm going with this, right?

In the first instance, with no animated texture, the FN is valid for the full range. The 3Im is valid for the full range, and here's the awesome part... The 3Rn is valid for the full range. So yeah, you'll get 120fps if you have a 3D monitor. :)

When you animated the FN, though, you need to make that every frame, which is slow, and it needs to cache, though it's only 8int, so it's not bad. But... The FN is an input to the 3Im, even though it doesn't actually affect the 3Im at all. There's a hidden material node, conceptually, in there. So now you are forcing the 3Im to reprocess, all umptinine thousand vertices worth, every frame. And the 3Rn obviously has to render each frame. If you look at the RAM usage, the FN and 3Rn are using ~7MB each. The 3Mg takes 128MB per frame. And if you were to have the 3Im in one viewer and the 3Rn in the other, you'd have to cache the 128MB twice, once for the 3Im (for the viewer) and once for the 3Mg (for the 3Rn input). So it's possible with just 2 viewers to use ~270MB per frame.

Unfortunately, I can't think of a way to reduce the memory in a practical manner. Even using a 3Rpl, which will make the render FASTER, won't reduce the RAM because even though you are just assigning a material, the entire 3D scene is cached.

Re: [BUG?] Fusion 3D: RAM consumption quesion.

PostPosted: Wed May 06, 2015 10:45 pm
by Serge Ilinov
Ha cool!
just take a look what your advice did in my case.. )))))
ChadSaver.JPG
ChadSaver.JPG (168.44 KiB) Viewed 3459 times


What you think about that? :mrgreen:

So, ReplaceMaterial3D did the trick for case when you just need to have animated texture without affecting on geo..
Of course it doesn't work if you want to use animated texture as map for 3D displacement , in that case you get huge caching issue..

domo arigato Chad!

PS: by the way this is perfect example of my previous idea\question, posted on wesuckless forum (http://www.steakunderwater.com/wesuckle ... f=16&t=383) about ability to disable caching for specific nodes.. or at lest - ability to purge cache only for current node (via in-tool script).

Re: Fusion 3D: RAM consumption quesion.

PostPosted: Thu May 07, 2015 2:51 am
by Chad Capeland
Yeah, it's faster, but it should take the same amount of RAM. I'm confused as to why it's not identical for you.

Regarding your cache issue, you can try something like this as an intool script:
Code: Select all
fusion = eyeon.scriptapp("Fusion", "localhost")
fusion.CacheManager:Purge()


BUT the real issue is, what's the issue with the caching heuristics now that is causing a problem? Maybe there needs to be a tweak to how the automatic cache weighting is done?

Re: Fusion 3D: RAM consumption quesion.

PostPosted: Thu May 07, 2015 7:50 pm
by Serge Ilinov
Thank you for intool script code..
It working like should..
withPurgeCache.JPG
"A" - without intool script
"B" - with your intool script.
withPurgeCache.JPG (66.8 KiB) Viewed 3399 times

As I said earlier - would be better to have a handle to purge only specific node cache..
If I understand correctly - your code purge whole Fusion cache.. but it way better that swapping indeed :D

Re: Fusion 3D: RAM consumption quesion.

PostPosted: Thu May 07, 2015 8:14 pm
by Chad Capeland
Oh, right. I think something like that was added, where you can chose what cache entries to clear, or maybe it was to set the TCost, I forget, but you'd have to check the scripting docs. :)

Re: Fusion 3D: RAM consumption quesion.

PostPosted: Fri May 08, 2015 3:42 pm
by Serge Ilinov
hmmm that's an interesting :)
will check it.. thanx !