|
Hello, I have texture atlas in which there are several frames of animation. I'd like to make a particle emitter that for each emitted particle would pick one frame from this atlas and use that as the particle texture. I do NOT want the particle to animate its appearance over its lifetime (like it would if I used the UV animation properties on the Particle Renderer component), just have a different frame on each emitted particle. I tried attaching a script and modifying the material texture offset on each call to I guess what I'd really want is a way to access the texture offsets of an already emitted particle (so I could just change them on the "newest" particle every frame). I know I can access all the particles that the emitter has emitted via the Any ideas how I could accomplish this with the standard particle components? I'd really prefer not to write an ad hoc particle emitter just for this. I'm doing this for the IPhone, so performance is premium. Thanks in advance.
(comments are locked)
|
|
All the particles in a system will read from the same material. You've probably noticed that objects that share a material will all be affected by the material's properties, including offset. Therefore, you will most likely need to have separate emitters with different materials attached to each one. A common technique is for each particle to randomly pick a tile in the atlas. In order to achieve this we need to be able to set the uv coordinates of each particle to a random index in the texture atlas. We don't need to assign a new material for each particle and we don't need to modify the material assigned to the particle system either. Unfortunately I can't find a way to access the uv index of the particle through the particle class either. This would be good. Alternatively just having a 'pick random start frame' checkbox in the particle renderer would be even easier
Feb 04 '12 at 09:38 AM
ivanp
(comments are locked)
|
