Displaying a Layer Mix material's texture in the viewport

   5914   9   2
User Avatar
Member
64 posts
Joined: March 2017
Offline
I'm new to Houdini, so apologies for what is probably a very basic question.

I've built a material with two principled shaders going into a layer mix node. Basically, it's a Planet Earth material where the land is represented by one principled shader and the ocean another. I need to see the land map on the earth sphere in my viewport. How do I specify that I want the Earth's base color texture map to be used as the diffuse map on the sphere in my viewport?

I read the section in the manual about tagging a VOP shader for viewport display, but it didn't make much sense to me. http://www.sidefx.com/docs/houdini/shade/opengl [sidefx.com]

Thanks!

Brad T.
User Avatar
Member
64 posts
Joined: March 2017
Offline
I figured it out. In case anyone else is stuck, the solution is to add a UVQuickshade node into your geometry tree. In the node, specify the texture map that you wish to see in the viewport. There doesn't seem to be any control over the resolution of the openGL map though, so it's pretty rough.

Now I have a new question:

I need to very accurately position a second texture map, with it's own UV coordinates over the first. It's a higher resolution map of just the east coast USA, which the camera will be flying closer to. It will stamped over the larger, full-earth texture map, similar to a decal. I've figured out how to add a second set of UV coordinates, but I can't figure out how to get the viewport to display both maps, so that I can accurately position the decal. In 3ds Max, this is straightforward, but I'm trying to learn/stay-in Houdini.

Any suggestions?

Thanks in advance!
User Avatar
Member
7749 posts
Joined: Sept. 2011
Online
Don't use the uv quickshade for this, it has no correlation to your material. Try the new material tagging system. Kai explains it quite well in the master class on shading. You can specify two diffuse texture tags, and specify the layer number in the tag. The viewport will layer the textures using the alpha of each. Unfortunately, I don't think multiple uv's are supported in the viewport.

https://www.sidefx.com/tutorials/houdini-16-masterclass-custom-shading/ [sidefx.com]

http://www.sidefx.com/docs/houdini/shade/opengl [sidefx.com]
User Avatar
Member
64 posts
Joined: March 2017
Offline
Thanks jsmack, I hadn't seen that video before and it was SUPER helpful.

To anyone else, the part about OpenGL tagging is around the 34 minute mark, but I recommend watching the whole video.
User Avatar
Member
4 posts
Joined: Nov. 2015
Offline
I'm following along with the shader masterclass in Houdini Indie https://www.sidefx.com/tutorials/houdini-16-masterclass-custom-shading/ [www.sidefx.com] and it looks like Open GL shader tagging is disabled in the indie version.

I'm a houdini noob but I can't see the sense in this. Can anyone confirm if the feature is available in Houdini Indie or not?



Note the greyed out values and “Indie” text in the bottom right hand corner.

Thanks
Edited by AdMorris - July 27, 2018 14:06:49
User Avatar
Member
7749 posts
Joined: Sept. 2011
Online
It's not disabled in indie, you are looking at a locked node. You can't edit the parameters of a locked HDA.
User Avatar
Member
4 posts
Joined: Nov. 2015
Offline
OK thank you for clarifying.
User Avatar
Member
3 posts
Joined: April 2020
Offline
What if I need to set the alpha of one layer accordingly to the value of a point attribute?
I'm mixing two animated cop using, using material builder.
Everything is fine in mantra but I have two problems with opengl diffuse tag:
- the cop sequence doesn't update in viewport every new frame
- I can't figure out how to derive the opengl layer alpha from a point/primitive or vertex attribute.
any idea?
User Avatar
Member
7749 posts
Joined: Sept. 2011
Online
flaclad
What if I need to set the alpha of one layer accordingly to the value of a point attribute?
I'm mixing two animated cop using, using material builder.
Everything is fine in mantra but I have two problems with opengl diffuse tag:
- the cop sequence doesn't update in viewport every new frame
- I can't figure out how to derive the opengl layer alpha from a point/primitive or vertex attribute.
any idea?

The opengl shader doesn't support layered materials, or any material networks for that matter.
User Avatar
Member
3 posts
Joined: April 2020
Offline
jsmack
flaclad
What if I need to set the alpha of one layer accordingly to the value of a point attribute?
I'm mixing two animated cop using, using material builder.
Everything is fine in mantra but I have two problems with opengl diffuse tag:
- the cop sequence doesn't update in viewport every new frame
- I can't figure out how to derive the opengl layer alpha from a point/primitive or vertex attribute.
any idea?

The opengl shader doesn't support layered materials, or any material networks for that matter.

Ok, thank you very much for the clarification you saved me from endless attempts
  • Quick Links