Shader building and texture information from Geometry

   4010   11   4
User Avatar
Member
22 posts
Joined: July 2014
Offline
Hi!

I was wondering if there were any good tutorials for using geometry information to produce textures in Houdini.

The kind of stuff I'm interested in are things like:

  • using volume intersections to change colours
  • using geometry intersections to create masks
  • using scattered points to draw brush strokes

That sort of thing. Any information would be really handy. Thanks!
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
No tutorial, but for creating textures based on intersections you can scatter points and read them in as point clouds. Something similar should work for shaders, as well.
Edited by Konstantin Magnus - Jan. 23, 2017 15:45:05

Attachments:
geo_intersect_cop_mask.hipnc (342.5 KB)
intersect_sshot.png (203.3 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
766 posts
Joined: April 2014
Online
You need to be able to make posts or threads ‘favorites’ so you can reference them at a later date on this forum, like this one
【T】【C】【S】
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Interesting subject and I am not sure of your end goal,but Houdini also gives you the ability to grab attributes directly from your geometry and then use it in your shaders or for use as say a matte in a render image plane. I never bother writing out a image , then use that in a shader.

Rob
Gone fishing
User Avatar
Member
22 posts
Joined: July 2014
Offline
Konstantin Magnus
No tutorial, but for creating textures based on intersections you can scatter points and read them in as point clouds. Something similar should work for shaders, as well.

Thank you very much! This is useful. I have seen this method used in a digitalTutors tutorial as well. It works quite, but it's heavy and imprecise , you need a whole lot of points for any kind of precision.

Christopher R
You need to be able to make posts or threads ‘favorites’ so you can reference them at a later date on this forum, like this one

There's a ‘Subscribe’ button up by the reply button at the top of the thread. I think that does what you're looking for, though I'm not sure how to browse subscribed threads.

circusmonkey
Interesting subject and I am not sure of your end goal,but Houdini also gives you the ability to grab attributes directly from your geometry and then use it in your shaders or for use as say a matte in a render image plane. I never bother writing out a image , then use that in a shader.

Rob

Thanks Rob! I'm interested in using houdini for some NPR projects I'm working on. I'm hoping to find a way to create brush stamps, lines, and geometry controlled gradients on ramp-shaded objects.

For example, it would be useful to be able to draw a spline on a surface, and then render the spline as a line on the projected surface. Or it might be interesting to be able to use a fog volume to modify the colour of another object to create a gradient related to density.

I'm talking about textures because I'm from video-games and in my head, shaders always end up being textures eventually. You're absolutely correct that you don't actually need to bake out a shader, though in some cases it might be optimal in terms of performance.
User Avatar
Member
766 posts
Joined: April 2014
Online
Christopher R
You need to be able to make posts or threads ‘favorites’ so you can reference them at a later date on this forum, like this one

There's a ‘Subscribe’ button up by the reply button at the top of the thread. I think that does what you're looking for, though I'm not sure how to browse subscribed threads.

That is to subscribe to the thread. I mean to literally save a post or the entire thread in a favorites vault so to speak.
【T】【C】【S】
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Heres a simple example for you to look at . Check the attribute in sops , then look inside the shader and finally the rop.

r

Attachments:
attributes.hipnc (1.6 MB)

Gone fishing
User Avatar
Member
22 posts
Joined: July 2014
Offline
Err… sorry circusmonkey! I don't see anything when I render your scene. I can see that you're writing a color channel to a vertex variable in the SOPs, then in the shader you're exporting it, and in the ROP you're creating another image plane, but when I render, I just get this:



I feel like I'm missing something.
Edited by Zach Hall - Jan. 24, 2017 22:42:14
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
I am creating a point attribute, not vertex in sops.Then in the shader thats applied I have cracked it open and created a parameter to grab the attribute, which is then exported. The image plane in the ROP reads that exported parameter and renders it. If you render with mplay, note the drop down has the exported variable. Note :- you can only render image planes to multi channel .exr , unless you want to define a separate output path for each image plane.

The example I have done you is very simple, normally I do everything in vops that way I can render in one hit , no need for multiple ROPs for mattes

Rob
Gone fishing
User Avatar
Member
22 posts
Joined: July 2014
Offline
Ah, all right. Got it rendered then. In other news, I need to learn how the compositing workflow in Houdini works (adds that to the list…).

So, so far it looks like using points to collect geometry data is the only way. That's too bad, as it looks like it'll take a computer-killingly large number of points to get any kind of resolution. Damn, I was hoping for something approaching an interactive frame-rate.
Edited by Zach Hall - Jan. 25, 2017 01:04:02
User Avatar
Member
766 posts
Joined: April 2014
Online
Konstantin Magnus
No tutorial, but for creating textures based on intersections you can scatter points and read them in as point clouds. Something similar should work for shaders, as well.

I don't fully understand the authors question.

Although Konstantin your method made me wonder if you apply UV to a mesh then using UDIM, you use your method to UV specific areas of a mesh for specific tiles, sounds dumb let me know ?
Edited by _Christopher_ - Jan. 27, 2017 23:44:24
【T】【C】【S】
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
Christopher_R
your method made me wonder if you apply UV to a mesh then using UDIM,

i just wanted to increase the padding between the uv islands a little, so the COP is not painting in neighbored UV areas.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
  • Quick Links