Jump to content

Attribute blur in shader


davpe

Recommended Posts

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.

Clipboard01.thumb.jpg.16d390e60a2e838af82a4171b5ce42da.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 ;)

leaks_example.thumb.jpg.563ee7a3a8e92d0304f1928606ed9087.jpg

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...