Jump to content

j00ey

Members
  • Content count

    225
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    3

j00ey last won the day on July 26 2018

j00ey had the most liked content!

Community Reputation

32 Excellent

1 Follower

About j00ey

  • Rank
    Initiate

Contact Methods

  • Website URL
    http://50percentgray.com

Personal Information

  • Name
    Tim
  • Location
    London

Recent Profile Visitors

3,650 profile views
  1. inline vop

    I haven't looked at your scene but in the amended one of mine you've disconnected the enumerate SOP so there's no id attribute to bind, so it will always be zero and the conditions in the inline VOP always evaluate as false
  2. inline vop

    At a guess I'd say your loop isn't executing
  3. inline vop

    Also it's a good idea when you're testing things and figuring out what's going on in your shaders to work at the top level of a material network, not inside a material builder because you can assign anything as a material. What I usually do is make a null, call it 'test' and assign that as a material, then just plug things into that to test
  4. inline vop

    For a start you have id set as a vector output, and you're binding it as a vector too. It's an integer. I haven't really got time to try and unpick the logic of your for loop but it seems to me you're trying to run before you can walk. Houdini is telling you via the colour labels what's an int, float, vector etc. You need to be able to recognize them and know what data types you need to use to get what you're after. Don't overcomplicate with for loops, learn about basic stuff first like setting outputs in your inline VOP, writing to them, reading in geometry attributes, manipulating them and then outputting them.
  5. inline vop

    I hadn't actually read your code properly earlier but again you're setting a condition which can never be true. You initialise a variable id as zero, then you say if it's between 2 and 10 set the Cd variable, but it's always zero. For the id workflow I mentioned you need to read in the id from the geometry, in your sample scene you've set it as an output, and as a vector. Attached is a sample scene. inline_colour_by_id.hip
  6. inline vop

    Can you upload your scene and I'll have a look?
  7. inline vop

    Yes that should work. A good way to check what variables you have access to for free, put down a globals VOP and look at the list. If you want to use primnum, just give your geometry an attribute that mirrors it, eg id. You can do that with an enumerate SOP, or manually in a wrangle just put for instance: i@id = @primnum; then you can bind that in your shader and use it
  8. inline vop

    There are a few issues with this. Firstly, I don't think you have access to primnum inside a shading context. You can use something like id and bind that to do the same thing. But assuming you did that, it would be an integer, not a float. And this condition can never be true - a float can't be greater then 0.5 and also less than 0.45. ($primnum > 0.5 && $primnum < 0.45) Regards the declaration thing, you can actually write f@value=1; f@value = 2; because that's setting the value of a geometry attribute but you can't declare it twice - replacing f@ with float will throw an error.
  9. inline vop

    From what I can see in that screengrab it looks like you've got an output called pntList, in which case your line should read : $pntList = set(1,1,1); if you put 'vector' before it you are declaring it, and it's already declared. [Anything you put in your list of outputs is declared automatically]. Just like in a wrangle in SOPs if you write : float value = 1; float value = 2; you'll get an error, that should be float value = 1; value = 2; By the way, if you're setting a vector with constants you don't need to use set(). You can just write $pntList = {1,1,1}; Use set() if you need to set it with other variables, eg: float valueA = 1; float valueB = 2; vector values = set(valueA, valueB, 0);
  10. inline vop

    You can't make an output variable called pntColorList AND declare it in the body of your code. If you add the output and then change the line vector $pntColorList; to $pntColorList = 1; it won't error. Same goes for $pngList
  11. inline vop

    You can name your variables however you want to, you just have to make sure they match up if you want to export something for use outside the Inline VOP [but in the same VOPnet]. There's no @ syntax in Inline VOPs so @Cd will throw an eror. $Cd is fine. Can you put up a sample scene with your error in it and I'll take a look at it?
  12. inline vop

    There's no @ syntax in inline VOPs. If you want to export Cd, add it to the output section as a vector, then in your code you can refer to it - $Cd.r = $sUV; Presumably dPdt is declared somewhere above your snippet..? If not that will throw an error too. You don't have to use the $ prefix for variables that are only used internally in the Inline VOP but if you don't and you have more than one Inline in the same network using the same variable name, you'll get errors too.
  13. Understanding rand()

    It's not usually desirable to have a random number that changes every time it's evaluated, in general you want the same result every time you feed the function the same seed [in your case $F]. What I usually do is as merlino suggests, but I usually add 'seed', 'min' & 'max' parameters to the node [or a control null somewhere] and reference them, eg : fit01(rand($F + ch("seed")), ch("min"), ch("max")) If you do really want a different result every time you could write a python expression in the seed field to, for example, return the time.
  14. Yes that's right. From the docs : 'Calculates the area under a channel’s graph, which is the same as calculating the integral of a channel, or integrating the channel.' The slope CHOP does the reverse, they're both very useful.
  15. I would fetch the revolutions per second channel in CHOPs and use an area CHOP to accumulate the animation. Then you can export that to the z rotation parameter [or look it up with an expression]
×