Texture Map lookup, slow? And how to stop non yielding sim?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
User avatar
claudevervoort
Posts: 89
Joined: 16 Oct 2009, 00:56
Location: Montréal, QC, Canada

Texture Map lookup, slow? And how to stop non yielding sim?

Post by claudevervoort » 01 Feb 2012, 00:27

Hi!

I'm having a bit of an issue with getting the color from a texture map: I have 16 grids each one with its own texture map, and in my ICE tree I have 16 emitters, one for each grid, which emit particles, looking up the color from the texture map (emit location, each emitter has a different png photo for the texture map).

Thing is, as soon as I set up the emitter to look up the color on the map, speed drops significantly. So slow that the only way I can see me using this setup is to use particle caching. Is it expected to be an 'expensive' operation to do color lookup? Also I notice only one core is used. Is it also related to texture map size (I'm using quite hi-res pix)?

Also i'm kind of stuck: my scene, when loading, starts the sim to go to the last frame. No way to stop it. I see it working since every 2 minutes it outputs a particle cache file, signs it's moving on in the sim. But if my calculations are correct, it will take 20 hours for the sim to finish. No way to get control back :( Anyway to force the sim to stop? (I imagine not, since the UI is totally frozen, but who knows :) ).

BTW i'm running 64 bit Vista, SI 2012 SAP.

I'll keep investigating on my side and if I come with anything, I'll post here.

Thanks!

Claude

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: Texture Map lookup, slow? And how to stop non yielding sim?

Post by xsisupport » 01 Feb 2012, 00:52

claudevervoort wrote:Hi!

Also i'm kind of stuck: my scene, when loading, starts the sim to go to the last frame. No way to stop it. I see it working since every 2 minutes it outputs a particle cache file, signs it's moving on in the sim. But if my calculations are correct, it will take 20 hours for the sim to finish. No way to get control back :( Anyway to force the sim to stop? (I imagine not, since the UI is totally frozen, but who knows :) ).

Claude
I wonder if you could use xsibatch -processing -script to open the file and move the timeline pointer back to frame 1, and then save the scene?
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
claudevervoort
Posts: 89
Joined: 16 Oct 2009, 00:56
Location: Montréal, QC, Canada

Re: Texture Map lookup, slow? And how to stop non yielding sim?

Post by claudevervoort » 01 Feb 2012, 01:50

Never ever tried something like that, but will sure have a look, thx!

Claude

User avatar
claudevervoort
Posts: 89
Joined: 16 Oct 2009, 00:56
Location: Montréal, QC, Canada

Re: Texture Map lookup, slow? And how to stop non yielding sim?

Post by claudevervoort » 01 Feb 2012, 02:39

I could not figure out how to get xsibatch to work, but that led me to discover screentoc, where you can inject code to execute after load :)

Well actually :( since it seems it is run once the scene is loaded i.e. when the simulation is re-run, so really did not help, but nice to know.

However I stopped the process and significantly reduced the image map sizes, and that is much faster! A couple of hours and XSI should yield back control. So enough time to go watch a couple of Mad Men :)

Thanks for the help!

Claude

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: Texture Map lookup, slow? And how to stop non yielding sim?

Post by xsisupport » 01 Feb 2012, 10:49

Save this JScript in a .js file.

Code: Select all

var sScene = "C:\\Users\\blairs\\Support\\Scenes\\Test.scn"
OpenScene(sScene, null, null);
SetValue("PlayControl.Current", 1, null);
SaveScene();
In a command prompt, use xsibatch -processing -script to run the script:

Code: Select all

xsibatch -processing -script C:\Users\blairs\Documents\resetPlayControlCurrent.js
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
claudevervoort
Posts: 89
Joined: 16 Oct 2009, 00:56
Location: Montréal, QC, Canada

Re: Texture Map lookup, slow? And how to stop non yielding sim?

Post by claudevervoort » 01 Feb 2012, 12:36

Superb! Worked perfectly! I'll definitely remember that trick...

Thanks a ton,

Claude