davpe Posted June 15, 2018 Share Posted June 15, 2018 Hey guys, i'm working on shader HDA and I'd appreciate some help. I'm using geometry normals that needs to be blurred. I can easily do that in SOP (see the pic - @N.y on left, attribute blur on right) and bind into the shader but I'd like to blur the attribute in shader for convenience reasons. Any thoughts? Pretty sure it could be done with gather VOP but can't figure it out... thanks. Quote Link to comment Share on other sites More sharing options...
toadstorm Posted June 15, 2018 Share Posted June 15, 2018 If your geometry is saved to disk, you could use point cloud operations to sample nearby points and average the N attributes together... would probably be faster than gather(). Quote Link to comment Share on other sites More sharing options...
davpe Posted June 15, 2018 Author Share Posted June 15, 2018 yeah that is also an option. but it's not what i want, unfortunately. i am looking for a solution that needs no external data. Quote Link to comment Share on other sites More sharing options...
toadstorm Posted June 15, 2018 Share Posted June 15, 2018 If you have all the objects together in one SOP that you want to average the N of, you could use op: syntax to point to that SOP for the point cloud instead of pointing to geo on disk. The only catch is that the merged object must be flagged as "renderable" for Mantra to export it to the IFD, so if you don't actually want to render this combined object (just a part of it) you'd need to add the `vm_renderable` object property to ensure it exports. Quote Link to comment Share on other sites More sharing options...
davpe Posted June 15, 2018 Author Share Posted June 15, 2018 are you sure op: syntax for point clouds work in shader? i mean, that would be great but i'm pretty sure you can't do that (and also it didn't work when i tried btw i don't care for ifd, this is supposed to be rendered on local machines only Quote Link to comment Share on other sites More sharing options...
toadstorm Posted June 15, 2018 Share Posted June 15, 2018 Yes, it will work, but only when the op: is pointing to a path that is considered "renderable," meaning the object's description will be written to or linked in the IFD. Whether or not you're rendering locally, an IFD is still going to be automatically generated, so it helps to think in this way. If you're trying to point to geometry using op: syntax and it isn't considered renderable by the ROP, it's going to be omitted from the scene description and so no point cloud operations will work on it. The solution is to add your point cloud geometry as a "force object" on your ROP, then add the "vm_renderable" property to the point cloud's geo container and uncheck it so that it doesn't actually render, but the point cloud will still be written out with the IFD. point_cloud_renderable.hip Quote Link to comment Share on other sites More sharing options...
davpe Posted June 16, 2018 Author Share Posted June 16, 2018 aha ok, i didn't know about this trick. it still is too clumsy thou, as there are some not obvious steps you have to make in order to get the shader working. as a random user, you'd probably ended up thinking it's broken. that's why i hope to find some fully inside-shader solution. i know gather() should do it but couldn't find good enough examples how to use it. there is a picture attached of what i am trying to do. the shader is generating sort of a weathering mask that is otherwise pain to do for large assets. this is one of the tools for texture artists that mostly don't know houdini, so i'm trying do do something very easy to use. i got what i want, mostly, only with the inconvenience of having to generate an input data in SOPs, which is, i am afraid, still too much of a hassle for non-houdini people. anyways, thanks for your effort and suggestions, toadstorm 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.