CinnamonMetal Posted July 22, 2019 Share Posted July 22, 2019 (edited) I'm using a basic smoke shader to shade volumes. I want to shade the scattering of the volumes perimeter depending on it's size; if the size of the volume is less then a specific size, then don't apply the scattering to the volume and only shade the volume using another type of basic smoke shader ? Edited July 22, 2019 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
3dome Posted July 22, 2019 Share Posted July 22, 2019 (edited) not sure if i understood correctly, but I'd try a switch SOP with an expression like sizeOfVolume < threshold to switch between 2 material SOPs edit: or store the size of the volume in attribute that you read (bind) inside of the material followed by two-way switch, etc to drive whatever material parameters you want to drive based on that Edited July 22, 2019 by 3dome Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted July 22, 2019 Author Share Posted July 22, 2019 Can a volume have a perimeter; and can I store the perimeter to an attribute ? Quote Link to comment Share on other sites More sharing options...
Andrea Posted July 22, 2019 Share Posted July 22, 2019 It doesn't have polygons so no, you can't calculate the perimeter of a volume. You can store the perimeter of the volume bounds, but it doesn't make much sense. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted July 22, 2019 Author Share Posted July 22, 2019 (edited) @Andrea Sbabo What do you mean it doesn't make much sense ? The volume bounds is what I'm after, but it doesn't create an attribute which I can use in materials. I need to iterate over only volumes clusters which are within a specific size, and get only the perimeters or size of those volumes; that is what I'm not sure how ? If some volume pieces are small, I want to ignore those, if the volume size is large; those are of which I want the size. Edited July 22, 2019 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
3dome Posted July 23, 2019 Share Posted July 23, 2019 It doesn't create the attribute by default, but what stops you from doing it yourself? Also you might leverage the intrinsic attributes measuredvolume and measuredarea Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted July 23, 2019 Author Share Posted July 23, 2019 @3dome Yes, those intrinsic attributes are what I need; but, how do I access them if they are not available, since I created my volume with the volumeRasterizeAttribute SOP ? Quote Link to comment Share on other sites More sharing options...
3dome Posted July 23, 2019 Share Posted July 23, 2019 (edited) don't have H17 at hand but since volumeRasterizeAttribute uses volumeRasterizeParticles internally and at least in H16.5 volumeRasterizeParticles has those intrinsics I don't know why they shouldn't be available to you. I don't think SideFX removed them in 17, need to check later though edit: in any case, this is Houdini so there's a million way to do things. How about convert your volume (to SDF) to polygons, measure area, sum up area -> get some value that way Edited July 23, 2019 by 3dome 1 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted July 23, 2019 Author Share Posted July 23, 2019 4 minutes ago, 3dome said: edit: in any case, this is Houdini so there's a million way to do things. How about convert your volume (to SDF) to polygons, measure area, sum up area -> get some value that way VolumeSDF SOP is what you mean by converting your volume to SDF, you can convert an SDF to polygons, I thought only if it's a VDB ? I don't have a previous version of Houdini installed, if you can verify if they removed the intrinsic attributes ? Quote Link to comment Share on other sites More sharing options...
3dome Posted July 23, 2019 Share Posted July 23, 2019 (edited) can't upload files and i usually work straight with VDBs but let's assume 1) you have a sphere -> isooffset Do you see the measured* intrinsics? (in H16.5 they are available) 2) convertvdb (to VDB, class Fog to SDF) 3) convertvdb (to Polygons) 4) from there all the measure and sum stuff (measure + attribpromote SOP) will check this evening if I can see intrinsics after 1) in H17 Edited July 23, 2019 by 3dome Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted July 23, 2019 Author Share Posted July 23, 2019 6 minutes ago, 3dome said: 1) you have a sphere -> isooffset Do you see the measured* intrinsics? (in H16.5 they are available) Yes. Although converting it to polygons from an SDF removes all the intrinsic measure* attributes. Quote Link to comment Share on other sites More sharing options...
3dome Posted July 23, 2019 Share Posted July 23, 2019 1 minute ago, CinnamonMetal said: Yes. Although converting it to polygons from an SDF removes all the intrinsic measure* attributes. of course it removes them, because they are volume related intrinsic attributes. But if you see them, there's no need to convert to polys anyway. Just use them in your shader Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted July 24, 2019 Author Share Posted July 24, 2019 Sorry, I located the Intrinsic attributes for the volumeRasterizeAttributes SOP Thanks 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.