Jump to content

custom attribute and sprite problem


vbk!!!

Recommended Posts

Hello,

I begin to learn Houdini and, of course, I have some question to achieve a specified task !

I watched the tornado and sprite shader tutorial from 3dbuzz. I made my own tornado sim and procedural sprite surface shader.

I include parameters to my shader to allow me to change it easely.

I have still some problems importing attributes in vop shop.

In the file attached ( simple particle emission), I try to make some changes in the color of my sprite using attribute like speed spritescale or life ...

It works fine with speed, spritescale, Cd or Alpha.

But I failed using the life attribute. Is it because it's not a float and not a vector ?

I watch and rewatch my scene. I don't what I miss

Thanks for your help

sprite04.hip

Link to comment
Share on other sites

hi there, the LIFE variable is not actually "local" inside of SOPs and if brought in to VOPs it's actually life[0] and life[1], where life[0] is the amount of time you're particle has been alive, and life[1], is the amount of time you're particle can live... Therefore in order to get the "LIFE" variable you're thinking of, you have a couple options here:

in VOPs, divide life[0]/life[1] to get you're LIFE

or

in SOPs, lay down an attributeCreate SOP, set it to TYPE FLOAT and POINT, and then in the value1, use $LIFE... then for the name you can either override this, by calling it life, or make you're own "newlife"... then in VOPs, reference this "newlife" var.

Cheers, and g'luck

Jonathan

Link to comment
Share on other sites

Thank for the reply Jonathan,

If the first option is possible in vopsop, is no more possible in vopshop. The global panel doesn't contain any life param.

I tried the second option but regarding your post i think i made a mistake filling the attributeCreate node.

The strange thing is, when I use the life attribute like I do with speed or Cd, NOTHING happen. I excepted a wrong result, something crazy but something.

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...