Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 26-06-2012 , 09:24 AM
Registered User
Join Date: Sep 2005
Location: Netherlands
Posts: 130

Calculating Ncache

Hi all,

I'm working on an animation that includes a giant hourglass, and i'm using Nparticles for grains of sand. I'm currently at 4k frames, and the animation is halfway there (yay).

The "problem" I have is that while it's calculating the particles, it's not using all my cores. It seems to be only using 1 core, and not even 1 core fully. Is there a way to increase the number of threads that it can use for Ncache calculations?

Thanks on forehand


01001011011101010111011101100101011001010110101101 10010101100101
# 2 26-06-2012 , 11:26 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Only certain operations can be efficiently run in multiple threads. In the case of your simulation, the next frame is dependent on the previous frame, so even if you were using multiple threads per frame, each thread would be blocked, waiting for the current frame to finish simulating.

For example, the (crude) timing diagram below shows how the calculations are distributed. F1, F2, F3, etc are when a given frame has finished simulating. The lines how when a CPU is high (calculating) or low (idling)

You can immediately see the problem, as each successive processor waits on the result of the previous. So 1 would be the initial, 2 would depend on 1, 3 on 2, 4 on 3 ... n on n - 1, until n is greater than the number of cores you have, in which case it jumps back to the initial.

Code:
       F1       F2         F3   ...   Fn
        ________
CPU 1:          |______________________
                 __________
CPU 2:  ________|          |___________
                            __________
CPU 3:  ___________________|          |
:
CPU N
I hope this makes sense.


Imagination is more important than knowledge.

Last edited by NextDesign; 26-06-2012 at 11:29 PM.
# 3 27-06-2012 , 10:15 AM
Registered User
Join Date: Sep 2005
Location: Netherlands
Posts: 130
ok, that´s clear. I do however have another issue.

This one is with appending Ncache. When I try to do it (both in Maya 2011 and 2013) something weird happens. If I do it in 2011, maya seems to lose the collission of the hourglass itself, and the particles "blow up" in all directions.

In maya 2013 it stops caching particles, and just evaluates the next 2k frames without calculating the particles. Any ideas?


01001011011101010111011101100101011001010110101101 10010101100101
# 4 27-06-2012 , 11:52 AM
Registered User
Join Date: Sep 2005
Location: Netherlands
Posts: 130
Ok, I think I've managed to fix it.
After the first 4k particle frames were cached, I cached the Nrigid container, and now it seems to be working fine. I'll keep you guys posted


01001011011101010111011101100101011001010110101101 10010101100101
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads