Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: santelia on July 25, 2012, 06:10:07 AM

Title: Custom action for substance CPU use
Post by: santelia on July 25, 2012, 06:10:07 AM
@ Jean
As you can read here http://support.allegorithmic.com/node/654 (http://support.allegorithmic.com/node/654), the substance engine by default uses only one core to generate outputs when needed. And you have to call a proper instruction to set the usage to All cores. Given that we can build a custom action for that, do you have any suggestion on using such a statement, I mean both in terms of action structure in playMaker and of Unity workflow? About the last one, can a playMaker FSM actually be excuted BEFORE the engine substance generation starts? Or we risk the FSM to be executed after the engine has already generated the substances?
Title: Re: Custom action for substance CPU use
Post by: jeanfabre on July 25, 2012, 09:23:13 AM
hi,

 for the custom action, I'll look into it.

 for who is called first between substance and playmaker, I am not sure, I will see if I can verify that, but how would you make sure that substances did indeed used all cores or not?

bye,

 Jean
Title: Re: Custom action for substance CPU use
Post by: santelia on July 25, 2012, 10:19:40 AM
... how would you make sure that substances did indeed used all cores or not?
An empiric way could be to simply measure the time that two builds (identical for all the rest) use for their startup with and without that action being in use, and see if a difference occurs. Using only one rather than all the four cores of a quad core i7, to say the one that I've on my desk, can actually make a big difference in performance/time.
Title: Re: Custom action for substance CPU use
Post by: santelia on July 25, 2012, 10:45:02 AM
And, if we have to believe to Allegorithmic guys, the default setting of the substance engine in Unity is to use only 1 core:

"The default value actually only use one CPU core to generate the textures."
Title: Re: Custom action for substance CPU use
Post by: jeanfabre on July 25, 2012, 11:31:23 AM
Hi,

 Don't have a quad core tho... :) and to test this you would a very big set of textures to start measure differences actually.

Are you actually already seeing some long delays and such?


 bye,

 Jean
Title: Re: Custom action for substance CPU use
Post by: santelia on July 25, 2012, 02:27:00 PM
roughly 45" for generating all the needed substance textures. With "generate all outputs" obviously unchecked. Too much. The issue of being used 1 core only is much more than a suspect.
Title: Re: Custom action for substance CPU use
Post by: jeanfabre on July 26, 2012, 08:11:55 AM
Ouch. I'll see if I have time next week to look at that.

 bye,

 Jean
Title: Re: Custom action for substance CPU use
Post by: santelia on August 07, 2012, 08:23:15 AM
Hi Jean,
did you find the time to take a look at that matter?
Title: Re: Custom action for substance CPU use
Post by: jeanfabre on August 07, 2012, 09:05:58 AM
Hi Jean,
did you find the time to take a look at that matter?

Sorry, not had time yet, let's see if I can have a go before the end of the week.

bye,

 Jean
Title: Re: Custom action for substance CPU use
Post by: santelia on September 11, 2012, 03:10:11 AM
May I make a reminder for you?  ;)
Title: Re: Custom action for substance CPU use
Post by: jeanfabre on September 11, 2012, 05:30:47 AM
Hi,

 yes, never hesitate to remind me :) only, please remind it to me again next week ( travelling now : )

bye,

Jean