QUOTE(amitc @ 07/11/09, 10:15 PM) [snapback]311335[/snapback]
I am bit confused how does knowing the index of instance help.
You can read it form the pdc but autodesk embeds this in the mr stteram, make a particle give some pp colors export it as mi, the file now contains:
CODE
data "particleShape1:ptdata"
1636 [
'6179614d03000000010000000400000029000000390000000000000039000000'
'03000000b400000000000000b400000000000000b400000000000000b4000000'
'00000000b400000001000000dd00000001000000060100000300000081010000'
'0000000082010000000000008501000086010000870100008801000089010000'
'00000000000000000000000000000000000000008a0100008d01000090010000
....
(this data is used by geomery shader but no reason why you cant use it for your instances)
This binary data is described in the devkit folder but basically ist a list taht contains velocity,color etc for the particles. So now all your shader need to do is read the data, and pair it with index you obtained form isntance name.
Again make a instanced file export mi and it becomes clear what mayas up to. In general it actually pans out to read the mi files every now and then.
So: now you have the data the index and the color all you new need is shater that querries shading isntance name, tekes the index looks up list and outputs color, done.
PS: Each item gets a separte instance so you dont need to do the querry for index for every sample just the init of shader for each instance (its a bit heavy)
QUOTE
Great thanks, but I woud'nt want to ruin your vacation for this.
You really think i can be without a computer for 4 weeks?
In any case its just a matter of copying a file, it just that my old computer is not here. Im going where it is anyways on my vacation.