PhiiLL Posted January 7, 2018 Share Posted January 7, 2018 Hey guys, what is the difference between @Cd.r and $CR, and when do I use which? There is nothing in the docs about it :/ Thanks Quote Link to comment Share on other sites More sharing options...
mestela Posted January 7, 2018 Share Posted January 7, 2018 Dollar variables are hscript expression variables, hscript is sloooowly being phased out. At-symbols are vex attributes (@-ttributes, get it?), they're becoming the standard way to refer to geometry properties through most of houdini, its better to get used to that syntax. Occasionally you'll find some older nodes that only work with the older dollar syntax, best to ask here if you stumble across those. -matt Quote Link to comment Share on other sites More sharing options...
PhiiLL Posted January 8, 2018 Author Share Posted January 8, 2018 1 hour ago, mestela said: Dollar variables are hscript expression variables, hscript is sloooowly being phased out. At-symbols are vex attributes (@-ttributes, get it?), they're becoming the standard way to refer to geometry properties through most of houdini, its better to get used to that syntax. Occasionally you'll find some older nodes that only work with the older dollar syntax, best to ask here if you stumble across those. -matt Thank you for the quick answer I was trying to scatter points based on color, but when I set @Cd.r as density within the scatter node, I get an error :/ Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 8, 2018 Share Posted January 8, 2018 in your scatter, enable Density Attribute, click drop down list it should give you Cd (don't pick both P and CD, just Cd) Quote Link to comment Share on other sites More sharing options...
mestela Posted January 8, 2018 Share Posted January 8, 2018 And that's another fun gotcha with houdini; if something is designed to read attributes directly (like the scatter sop is), you don't use the @ prefix. That also means that it won't understand the thing.subthing syntax, so Cd.r won't work either. Put down a point wrangle before the scatter, and create a new attribute which is just the red component, we'll call it red: @red = @Cd.r; Now in the scatter you can put 'red' into the density attribute field. It'll make sense in time, honestly! 2 Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 8, 2018 Share Posted January 8, 2018 (edited) haha mestela....(Matt is the Chief Chef...I'm the sous chef) here's one I prepared earlier...(obviously we don't communicate very well...I went for blue) Edited January 8, 2018 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
PhiiLL Posted January 8, 2018 Author Share Posted January 8, 2018 Awesome guys, thank you very much for your help Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 8, 2018 Share Posted January 8, 2018 (edited) 21 hours ago, mestela said: And that's another fun gotcha with houdini; if something is designed to read attributes directly (like the scatter sop is), you don't use the @ prefix. That also means that it won't understand the thing.subthing syntax, so Cd.r won't work either. Put down a point wrangle before the scatter, and create a new attribute which is just the red component, we'll call it red: @red = @Cd.r; Now in the scatter you can put 'red' into the density attribute field. It'll make sense in time, honestly! so in this case its easier to use $CR than putting writing a new attribute and then putting that into the scatter scratch that.. I bow before you matt Edited January 8, 2018 by Jesper Rahlff Quote Link to comment Share on other sites More sharing options...
Sergey Filin Posted November 5, 2021 Share Posted November 5, 2021 On 08.01.2018 at 5:25 AM, mestela said: And that's another fun gotcha with houdini; if something is designed to read attributes directly (like the scatter sop is), you don't use the @ prefix. That also means that it won't understand the thing.subthing syntax, so Cd.r won't work either. Put down a point wrangle before the scatter, and create a new attribute which is just the red component, we'll call it red: @red = @Cd.r; Now in the scatter you can put 'red' into the density attribute field. It'll make sense in time, honestly! Thank you, Matt! Finally, I've got this thing. 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.