hellomrjack Posted April 26, 2011 Share Posted April 26, 2011 Hi, Im currently trying to make a Volume VOP node that will be able to strip out all densities except in a narrow range. I was thinking of using an inline code node containing something like this: $outDensity=0.0; if ($density>1.1) { if ($density<1.2) { $outDensity=$density; } } The name for my output is outDensity. Am I going about this the write way? Even when I just use: $outDensity=1.0; It wont just set everything to 1.0. Thanks Jack Quote Link to comment Share on other sites More sharing options...
symek Posted April 26, 2011 Share Posted April 26, 2011 I can't help you with your code at the moment (no Houdini around), but I would suggest to take a look on VolumeRampSOP or using clamp() function or recreating volumeramp with vex's ramp parameter. Conditional statements (if/then) misbehave, since they output unfiltered data. Quote Link to comment Share on other sites More sharing options...
hellomrjack Posted April 26, 2011 Author Share Posted April 26, 2011 Ah I've just worked out the problem, I was in render view and it wouldn't properly update until i was in the scene view. Ive managed to implement that code now. Im using it to analyse MRI scans. Quote Link to comment Share on other sites More sharing options...
Macha Posted April 26, 2011 Share Posted April 26, 2011 (edited) Here is something silly I played with. I like the ramp but the problem I often have with it is it's range 0..1 and the lack of control you have over the curves. So here is a version of the ramp that uses bezier curves. Woohoo! Just for fun, don't expect wonders. Edit: The volumevop in that network serves no purpose. I forgot to delete it. sillyvol.hipnc Edited April 27, 2011 by Macha 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.