Emission Attribute for Houdini GL

   3654   6   2
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
I seem to have a problem being able to get the viewport(stage context) show an obj image through the emission attribute alone.

I have the viewport light tick for emission selected.

In sops I set point v@emissioncolor attribute to desired levels algorithmically. Leaving Emission Intensity to manual control on the shader.

In Karma, it works fine and I get the desired results showing and can control the intensity(of emission color) manually on the shader.

If I switch to Houdini GL, however it doesn't ‘see’ the emission attribute and only uses the default emission color of the shader.

Bug or some additional step needs to be done?
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
I don't think HoudiniGL (LOPs or SOPs) maps attributes to shader parameters they way mantra/karma do. The best you can do is assign a texture to the emission texture of the principled shader, and the usd preview surface will be created with the same mapping for HoudiniGL.
User Avatar
Staff
5156 posts
Joined: July 2005
Online
The Houdini GLSL shaders only accept a small subset of attributes, and they're fixed: P, N, uv, Cd, Alpha. OpenGL was designed with a heavy emphasis on textures, not attributes, so there are only a limited number that can be passed to the vertex shader. More attributes and binding between shader stages slows down drawing, so we opted to keep the supported attributes lean.

Outside of lops you can get around this by adding the GL material attribute ‘gl_lit’ and using Cd as the emission color (or by making your own GLSL shader). But there's no way to make a USD preview material ignore lighting, to my knowledge.
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
twod
The Houdini GLSL shaders only accept a small subset of attributes, and they're fixed: P, N, uv, Cd, Alpha. OpenGL was designed with a heavy emphasis on textures, not attributes, so there are only a limited number that can be passed to the vertex shader. More attributes and binding between shader stages slows down drawing, so we opted to keep the supported attributes lean.

Outside of lops you can get around this by adding the GL material attribute ‘gl_lit’ and using Cd as the emission color (or by making your own GLSL shader). But there's no way to make a USD preview material ignore lighting, to my knowledge.

I tried to connect a usd primvar reader set to ‘displayColor’ to the emission input of the usdpreviewsurface, that did not work in HoudiniGL but does work in Storm and Karma.
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
Thanks guys for this info.
User Avatar
Staff
5156 posts
Joined: July 2005
Online
jsmack
twod
The Houdini GLSL shaders only accept a small subset of attributes, and they're fixed: P, N, uv, Cd, Alpha. OpenGL was designed with a heavy emphasis on textures, not attributes, so there are only a limited number that can be passed to the vertex shader. More attributes and binding between shader stages slows down drawing, so we opted to keep the supported attributes lean.

Outside of lops you can get around this by adding the GL material attribute ‘gl_lit’ and using Cd as the emission color (or by making your own GLSL shader). But there's no way to make a USD preview material ignore lighting, to my knowledge.

I tried to connect a usd primvar reader set to ‘displayColor’ to the emission input of the usdpreviewsurface, that did not work in HoudiniGL but does work in Storm and Karma.

Emission as a binding point is ignored. But you can do the opposite - bind a emissionColor primvar to diffuse.
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
For my purposes the workflow solution for seeing scene as GL was to make use of the diffuse and specular parameter options on the USD lights.

A background image eventually going to be used in conjunction with geometry derived from it, but for iterative purposes needed to keep work done in GL for initial set up, before ‘fine-tuning’ in render/Karma stages.

With the lights specular turned off (set to zero), and diffuse adjusted to needs - provides my working set up.
  • Quick Links