making particles freeze/static

Discussions about the use of Realflow 5
toxicbueffel
Posts: 17
Joined: Mon Oct 10, 2011 9:36 am

making particles freeze/static

Postby toxicbueffel » Tue Oct 11, 2011 7:50 am

YAYYYYYY!

thanks a lot

all best

tim


User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

making particles freeze/static

Postby Otuama » Tue Oct 11, 2011 3:39 pm

Hi.

I've managed to get it so when the particles are moved they fall with gravity. At the moment, if you apply gravity all the particles fall, even if they have a 0 velocity.

The way I've just found means you don't need to have a gravity daemon attached to the emitter but if the particles move faster than the threshold, they'll fall.

I'll put a test on vimeo and will let you know when it's up.
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

toxicbueffel
Posts: 17
Joined: Mon Oct 10, 2011 9:36 am

making particles freeze/static

Postby toxicbueffel » Wed Oct 12, 2011 7:03 am

can´t wait, sean!
this is highly appreciated.....

thanks!

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

making particles freeze/static

Postby Otuama » Wed Oct 12, 2011 12:05 pm

Only 3 lines were needed to add the gravity.

Rf Forum Freeze #3 (Final)
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

toxicbueffel
Posts: 17
Joined: Mon Oct 10, 2011 9:36 am

making particles freeze/static

Postby toxicbueffel » Wed Oct 12, 2011 12:25 pm

awesome, sean!
thanks for the effort....
i hope it is of any use for you too!

can you tell me the 3 lines?


all best

tim

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

making particles freeze/static

Postby Otuama » Wed Oct 12, 2011 12:39 pm

Oh yeah, it would have helped if I'd actually added them.

Code: Select all

####
   emitter = scene.getEmitter("Circle01")
   p = emitter.getFirstParticle()
   gravity = Vector.new (0.0, -9.8, 0.0)
   while p:
     #CHANGE THRESHOLD NUMBER BELOW
     if p.getVelocity().module() < 0.075:
      p.velocity = 0.0
     #CHANGE THRESHOLD NUMBER BELOW TO 1 DIGIT ABOVE OTHER THRESHOLD
      if p.getVelocity().module() > 0.076:
         p.setExternalForce (gravity)
     p = p.getNextParticle()
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

toxicbueffel
Posts: 17
Joined: Mon Oct 10, 2011 9:36 am

making particles freeze/static

Postby toxicbueffel » Wed Oct 12, 2011 12:56 pm

Most awesomest! :first:

toxicbueffel
Posts: 17
Joined: Mon Oct 10, 2011 9:36 am

making particles freeze/static

Postby toxicbueffel » Wed Oct 12, 2011 3:08 pm

mmh...

Code: Select all

#--------------------------------------------------
# Function: onSimulationBegin
#--------------------------------------------------

def onSimulationBegin():
   pass




#--------------------------------------------------
# Function: onSimulationStep
#--------------------------------------------------

def onSimulationStep():
   ####
    emitter = scene.getEmitter("Circle01")
    p = emitter.getFirstParticle()
    gravity = Vector.new (0.0, -9.8, 0.0)
    while p:
      #CHANGE THRESHOLD NUMBER BELOW
      if p.getVelocity().module() < 0.075:
       p.velocity = 0.0
      #CHANGE THRESHOLD NUMBER BELOW TO 1 DIGIT ABOVE OTHER THRESHOLD
        if p.getVelocity().module() > 0.076:
            p.setExternalForce (gravity)
      p = p.getNextParticle()

then i get this : WARNING: Script syntax error at line number 24.

any idea?

...

sorry it is michael ende´s neverending story...

User avatar
Otuama
Posts: 1155
Joined: Fri Apr 02, 2010 12:56 am
Location: Swansea
Contact:

making particles freeze/static

Postby Otuama » Wed Oct 12, 2011 3:14 pm

In simulation events click 'Script' > check syntax.

which line does it highlight.

I sometimes find that when posting scripts the indents are difficult to make out.

Can you post a screenshot of the script?
iCreate Ltd
'Strength does not come from physical capacity. It comes from an indomitable will.' - Gandhi
'What Does Success Look Like?' - iCreate Ltd

toxicbueffel
Posts: 17
Joined: Mon Oct 10, 2011 9:36 am

making particles freeze/static

Postby toxicbueffel » Wed Oct 12, 2011 3:30 pm

can not figure out how to attach it directly...

http://minus.com/m5WMd22CD

mmh...


Return to “Realflow 5”

Who is online

Users browsing this forum: No registered users and 3 guests