playMaker

Author Topic: Custom action for substance CPU use  (Read 5245 times)

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Custom action for substance CPU use
« on: July 25, 2012, 06:10:07 AM »
@ Jean
As you can read here 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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Custom action for substance CPU use
« Reply #1 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

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: Custom action for substance CPU use
« Reply #2 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.
« Last Edit: July 25, 2012, 10:25:19 AM by santelia »

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: Custom action for substance CPU use
« Reply #3 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."

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Custom action for substance CPU use
« Reply #4 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

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: Custom action for substance CPU use
« Reply #5 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Custom action for substance CPU use
« Reply #6 on: July 26, 2012, 08:11:55 AM »
Ouch. I'll see if I have time next week to look at that.

 bye,

 Jean

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: Custom action for substance CPU use
« Reply #7 on: August 07, 2012, 08:23:15 AM »
Hi Jean,
did you find the time to take a look at that matter?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Custom action for substance CPU use
« Reply #8 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

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: Custom action for substance CPU use
« Reply #9 on: September 11, 2012, 03:10:11 AM »
May I make a reminder for you?  ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Custom action for substance CPU use
« Reply #10 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