Jump to content

How to get the normalized LIFE in VOP POP?


Recommended Posts

I am trying to get the LIFE attribute in VOP POP but I get different results than the LIFE attribute (from the help):

LIFE

Percent of total life used (from 0 to 1).

So there is a LIFE attribute that does this? But the ones available in VOPs named Point Life Attribute and Point Age Attribute are different?

Or do they correspond to LIFE[0] and LIFE[1] I see in the Details View?

But In VOPs, Point Life Attribute gives me constant 100, and Point Age Attribute gives me from 0-10.

Any ideas?

Thanks :)

Link to comment
Share on other sites

Many ways, i usually do it from globals : age / life

EDIT:

So there is a LIFE attribute that does this? But the ones available in VOPs named Point Life Attribute and Point Age Attribute are different?

Or do they correspond to LIFE[0] and LIFE[1] I see in the Details View?

yes they are same.

life[0] = current age.

life[1]= how long its going to live.

both in seconds.

Cheers,

Edited by vectorblur
  • Like 1
Link to comment
Share on other sites

Thanks got it. Btw what's the reason they are exposed as life[0] life[1] and not as life and age?

Also can you tell me the other ways since you said there are many ways? I am just curious to see the alternatives even though I will use your first method :)

EDIT: I just tried age / life and I get 0 to 0.1 for 1-240 frame range.

Edited by magneto
Link to comment
Share on other sites

Thanks got it. Btw what's the reason they are exposed as life[0] life[1] and not as life and age?

$LIFE is available as a local variable to lot of ops. My best guess would be this is how its defined, may be got to do with the suitabilities involving attributes and variables.

Masters should be able to help here. Some how newer folks just learn to live with it.

Also can you tell me the other ways since you said there are many ways? I am just curious to see the alternatives even though I will use your first method :)

EDIT: I just tried age / life and I get 0 to 0.1 for 1-240 frame range.

another way would be to create an attribute using $LIFE and import that directly in vops.

Take out additional 0 from your particle life expectancy and make it 10. Found in your source pop. ;)

Cheers

Edited by vectorblur
Link to comment
Share on other sites

Thanks man, it works now. Is there a way to factor particle life expectancy into normalized LIFE? Can I just do?:

(age / life) * lifeExpectancy * 0.1

Not clear what do you mean. above equation will just be reduced to age*0.1

where life = life[1] = life expectancy

Link to comment
Share on other sites

Sorry I meant since you asked me to reduce life expectancy from 100 to 10, I thought maybe there is 1:10 correspondence between that and age.

Like age / life works when life expectancy is 10. But how can I calculate normalized LIFE if life expectancy is a different value like 300? :)

Link to comment
Share on other sites

Sorry I meant since you asked me to reduce life expectancy from 100 to 10, I thought maybe there is 1:10 correspondence between that and age.

Like age / life works when life expectancy is 10. But how can I calculate normalized LIFE if life expectancy is a different value like 300? :)

No worries i am sure this life business has confused most of us when we first encounter it.

The value which you set in life expectancy( how long a particle is going to live) in source pop is the attribute you are seeing in details view as life[1] and this very same value is available as "point life attribute" in global variable inside vop pop.

Age "How many seconds have past since the particle was born" is stored on particle as an attribute life[0] is available in voppop globals under the age attribute and you can access it using variable $AGE directly.

But variable "$LIFE" is normalized life[0]/life[1] or age/(life or life expectancy)

keep in mind that they are independent of the frame range or animation length "$TLENGTH"

hth,

  • Like 1
Link to comment
Share on other sites

in layman's terms:

$LIFE = life[0]/life[1]

where:

life[0] = age (time since birth)

life[1] = lifespan (total time particle will live)

* this is in seconds

so:

whenever you divide age/life, no matter the lifespan, it should return a 0-1 value.

I have seen some issues where the particle's age goes 1 timestep above it's lifespan, I'm guessing this happens because the particle has not been reaped (removed) from the system. Clamping 0-1 fixes this issue usually.

Just thought'd I'd throw in my 2 cents :D

Edited by static
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...