Hey folks,
Running into an interesting problem. Using 3dsMax 2010 x64 SP1, and I have a fairly simple script op that sets the particle mapping u and v based on the particle ID. The script works fine but when i go to cache it and reopen the file, the cache says it has information in it but the viewport does not display the particles!
I have narrowed this down to whether or not the script is using the particleMapping property or not. I’ve tried storing the mapping coordinate in the vector channel, this caches just fine but when I put a script op on top of the cache to grab the vector, no go. In fact, putting a script operator in the global event seems to do absolutely nothing when local events have caches feeding it.
Here is the script that is giving me problems:
on ChannelsUsed pCont do ( )
on Init pCont do ( )
on Proceed pCont do
(
count = pCont.NumParticles()
pCont.useMapping = true
loopu = 50000
loopv = 1000
for i in 1 to count do
(
pCont.particleIndex = i
fr = pCont.particleID + 6000
remu = mod fr loopu
remv = mod fr loopv
u = remu / loopu
v = remv / loopv
pCont.setParticleMapping i 1 [u,v,0]
)
)
on Release pCont do ( )
Any ideas?
Also, using Krakatoa to cache yields some strange results with this setup. I have a scene where I’m using just a bunch of forces, and that caches out and load just fine (with Krakatoa), with PFlow correctly placing a particle at each visible particle loaded. But when using a Speed By Icon and this script (I haven’t fully narrowed down what the culprits are, just noticing that Speed By Icon causes problems when this is done), I cache out load the particles in via PRT loader, all seemingly coming in just fine, and PFlow places particles correctly at each loaded particle on the first frame, but as I scrub it starts omitting particles!
I’m pulling my hair out on this one, any help is much appreciated!
-S