Jump to content


Photo

Randomizing Particle Sprites


  • Please log in to reply
15 replies to this topic

#1 Mendoza

Mendoza

    Member Pig

  • Adv Members
  • PipPip
  • 11 posts

Posted 07 December 2007 - 04:48 PM

Hey,

I'm trying to generate particles at random using a sequence of 4 sprites. I can get the emitter to cycle through the sequence but I can't seem to randomize the particles emitted per frame. For instance on frame 5 if my emitter is set to "particle birth time" and the number is set to 4 than all the particles emitted on that frame will be of the same sprite.

Is there any way to make them emit different sprites per frame without resorting to creating multiple particle systems?

-Nitant

#2 ShadowMaker SdR

ShadowMaker SdR

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 674 posts

Posted 07 December 2007 - 07:00 PM

At the moment I don't think there is a way to do this. But be sure to write Eyeon about it. It has been one of my personal favorite requests for years now. The more people who want it, the more likely it will happen.

#3 robertjackson1

robertjackson1

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 128 posts

Posted 10 December 2007 - 11:54 AM

Really easy to attach them all to that switcher macro, & then just modify the number (input 1-8) with a random shake & feed that into the emitter. A workaround, but only takes seconds to set up

#4 robertjackson1

robertjackson1

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 128 posts

Posted 10 December 2007 - 11:55 AM

still need more than 1 system though, so not ideal

#5 xmare

xmare

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 723 posts

Posted 10 December 2007 - 03:01 PM

Hi!

If You don't need to see the beginning of Particle animation, You can always adjust "Pre-generate frames" setting in Prender node + You can randomize Particle life. that should randomize Your sprites

hope this helps a bit
cheers
marek

#6 PolLitra

PolLitra

    Member Pig

  • Adv Members
  • PipPip
  • 24 posts

Posted 11 December 2007 - 05:52 AM

one more way (if you don't need a tons of different sprites) is to use pChangeStyle node with Bitmape style again. In the Conditions tab you can control probability of replacement. If you need more then one change - so you chain several pChangeStyle nodes. If you want to use the one sequence and you want particles to use different frame start for replacement - you can use the following trick - in the Animate drop down you're choosing Particle Birth Time or Particle Age. It will replace each particle with the sequence - so you'll have them asynchronical. You'll need to make pretty high Lifespan (1000 for example). And the main trick is to use pretty low emition rate (Number) and in the pRender node to make Pre-Generate frames more then 0 - bigger frames number - bigger difference in particle age, so you have bigger difference in the appearance of particles. Usually I'm animating the Number (emition rate) like value I need in frame #0 and zero in frame #1 - so I have already generated "crowd" and big lifespan giving me time to operate with particles. Works well (but not with pImageEmitter :( )

#7 Yuri V. Nemets

Yuri V. Nemets

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 134 posts

Posted 11 December 2007 - 11:10 AM

Is that what you are looking for?

Attached Files



#8 Mendoza

Mendoza

    Member Pig

  • Adv Members
  • PipPip
  • 11 posts

Posted 14 December 2007 - 02:39 PM

Thanks a lot for all the options.

Heres the reply I got from eyeon when I emailed them about the problem:

"You can attach the time offset for the bitmap particle to a shake
modifier, and set the sub frame calculation in the prender higher. This
will then determine an offset on each particle at the sub frame level.
Be sure to set the shake modifiers maximum value to the largest offset
desired, and reduce the smoothness to a low value such as .01. "

Seems to have worked nicely

#9 Bejoy

Bejoy

    Piglet

  • Adv Members
  • 2 posts

Posted 04 July 2010 - 06:30 AM

Hi can you post the workspace i tried the same but doesn't work for me?

#10 mzigaib

mzigaib

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 165 posts

Posted 23 November 2010 - 11:06 AM

It would be very nice if I could use the Particle Image Emitter to randomize the sprites using the id of each particle, is that possible?

#11 mzigaib

mzigaib

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 165 posts

Posted 23 November 2010 - 11:12 AM

Or is there a way to emit a aligned grid of particles using the particle emitter?

I am trying to use a pcustom to create this grid of particles but I can't find a way to use the particle Id in conjunction with expressions to make my particles maintain the same Y position for some nth units, after that I want it to rise up a nth unit as well, with that I could align all my particles to a grid, maybe a better idea?

I didn't find a way to make a loop inside the pcustom tool to make it happen, is that also possible?

I hope I could be clear about this, sorry for the bad english.

#12 mzigaib

mzigaib

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 165 posts

Posted 23 November 2010 - 09:59 PM

Anyone?

#13 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 23 November 2010 - 10:07 PM

pIE will do a grid.
Loops aren't possible, except in a fuse, afaik.

#14 mzigaib

mzigaib

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 165 posts

Posted 23 November 2010 - 11:58 PM

Thanks for the feedback.

Anyway to randomize sprites with the pIE?

#15 PolLitra

PolLitra

    Member Pig

  • Adv Members
  • PipPip
  • 24 posts

Posted 24 November 2010 - 05:15 AM

Thanks for the feedback.

Anyway to randomize sprites with the pIE?


Here you can find a comp which makes a particle grid using IDs and pCustom tool.
In pCustom n1 - number of rows in a grid, n2 - height of a row, n3 - witdth of row.

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users