magneto Posted March 13, 2012 Share Posted March 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
gaurav Posted March 13, 2012 Share Posted March 13, 2012 (edited) 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 March 13, 2012 by vectorblur 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 13, 2012 Author Share Posted March 13, 2012 Thanks vectorblur, so you import those attributes using Import Attribute and calculate age / life? Quote Link to comment Share on other sites More sharing options...
gaurav Posted March 13, 2012 Share Posted March 13, 2012 Thanks vectorblur, so you import those attributes using Import Attribute and calculate age / life? they are already available from global variables. so no need to import explicitly. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 13, 2012 Author Share Posted March 13, 2012 (edited) 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 March 13, 2012 by magneto Quote Link to comment Share on other sites More sharing options...
gaurav Posted March 13, 2012 Share Posted March 13, 2012 (edited) 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 March 13, 2012 by vectorblur Quote Link to comment Share on other sites More sharing options...
magneto Posted March 13, 2012 Author Share Posted March 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
gaurav Posted March 13, 2012 Share Posted March 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 13, 2012 Author Share Posted March 13, 2012 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? Quote Link to comment Share on other sites More sharing options...
gaurav Posted March 13, 2012 Share Posted March 13, 2012 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, 1 Quote Link to comment Share on other sites More sharing options...
static Posted March 13, 2012 Share Posted March 13, 2012 (edited) 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 Edited March 13, 2012 by static Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.