USD:Distant Lights Intensity ?

   4440   27   2
User Avatar
Member
767 posts
Joined: April 2014
Offline
How does one reduce the intensity of a USD-Distant Light. When using a USD-SphereLight (type) one can scale the sphere light to reduce it's intensity; although that isn't the case with distant lights ?
Edited by _Christopher_ - April 28, 2022 08:23:48
【T】【C】【S】
User Avatar
Member
7836 posts
Joined: Sept. 2011
Offline
Use the intensity, color, or exposure attributes.
User Avatar
Member
767 posts
Joined: April 2014
Offline
jsmack
Use the intensity, color, or exposure attributes.
USD in Houdini doesn't have an intensity, color or exposure attribute; it's not listed in the usd_attributes list of the documentation ?
【T】【C】【S】
User Avatar
Member
7836 posts
Joined: Sept. 2011
Offline
_Christopher_
jsmack
Use the intensity, color, or exposure attributes.
USD in Houdini doesn't have an intensity, color or exposure attribute; it's not listed in the usd_attributes list of the documentation ?

It's right on the light, always has been.
User Avatar
Member
767 posts
Joined: April 2014
Offline
jsmack
_Christopher_
jsmack
Use the intensity, color, or exposure attributes.
USD in Houdini doesn't have an intensity, color or exposure attribute; it's not listed in the usd_attributes list of the documentation ?

It's right on the light, always has been.

I'm meant when you create a primitive lop; and set a path and it's type to distant light.
【T】【C】【S】
User Avatar
Member
7836 posts
Joined: Sept. 2011
Offline
_Christopher_
jsmack
_Christopher_
jsmack
Use the intensity, color, or exposure attributes.
USD in Houdini doesn't have an intensity, color or exposure attribute; it's not listed in the usd_attributes list of the documentation ?

It's right on the light, always has been.

I'm meant when you create a primitive lop; and set a path and it's type to distant light.

The primitive lop doesn't set any attributes. It doesn't matter what node created the primitive, the light lop can still be used to edit the attributes. Use 'distant light edit' in the tab menu to create an edit-only node. You can also right-click the attributes in the scene graph details to edit individual properties. The orange properties are part of the schema, such as 'inputs:intensity' for the light's intensity.
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
_Christopher_
USD in Houdini doesn't have an intensity, color or exposure attribute; it's not listed in the usd_attributes list of the documentation ?

Attributes in USD are driven by schemas, not what parameters Houdini happens to include in any particular LOP node interface. So when you create a prim of a particular type, USD automatically binds the schema for that type (which has nothing to do with houdini) and that makes those attributes available. Like jsmack said you can see the attributes in the scene graph details pane and use various LOP nodes to set attribute values.

I guess schema attributes in USD and LOPS are a bit like intrinsic attributes in SOPS if you are familiar with those. A USD light will always have an intensity attribute like a SOP sphere will always have a radius intrinsic. Any SOP node is allowed to change the radius value of the sphere. Any LOP node can change the intensity of a USD light.

I'm not sure what documentation you were looking at btw, but if you take a look at the schema documentation for USD lights [graphics.pixar.com] you'll see that the intensity, color and exposure attributes jsmack mentioned are present (along with many others).

Hope that helps!
Edited by antc - May 2, 2022 10:07:43
User Avatar
Member
767 posts
Joined: April 2014
Offline
@antc - I was reading this documentation; this [www.sidefx.com]I just use the GetIntensityAttr and apply a value to that attribute.
【T】【C】【S】
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
_Christopher_
@antc - I was reading this documentation; this [www.sidefx.com]I just use the GetIntensityAttr and apply a value to that attribute.

Ok, yeah that's the vex function doc for setting a USD attribute in a generic way. It isn't going to discuss specific schema attributes like intensity etc.

GetIntensityAttr is the right way to do it in python, but not very UX friendly. The distant light edit would be the way to go if you want a nice interface.
Edited by antc - April 29, 2022 10:37:19
User Avatar
Member
767 posts
Joined: April 2014
Offline
antc
_Christopher_
@antc - I was reading this documentation; this [www.sidefx.com]I just use the GetIntensityAttr and apply a value to that attribute.

Ok, yeah that's the vex function doc for setting a USD attribute in a generic way. It isn't going to discuss specific schema attributes like intensity etc.

What is the difference between USD schema and setting a USD attribute by means in Houdini ?

What I described is how you would use USD schema attributes in Houdini.
【T】【C】【S】
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
_Christopher_
What is the difference between USD schema and setting a USD attribute by means in Houdini ?

What I described is how you would use USD schema attributes in Houdini.

There is no difference. It all results in the same USD data (scene description) in the end. That's why it's important to look at the scene graph details pane. That's kind of the ground truth. You'll see that using python - GetIntensityAttr(), or vex - usd_attribute(), or a LOPS node - editproperties, distantlightedit etc ... they all result in the same USD, which can be confirmed by inspecting the scene graph details pane.

LOPS is basically a USD editor. It doesn't matter what LOP node you use or python or whatever, the result has to be valid USD (and there's only one kind of valid USD when it comes to authoring attributes).
User Avatar
Member
767 posts
Joined: April 2014
Offline
antc
_Christopher_
What is the difference between USD schema and setting a USD attribute by means in Houdini ?

What I described is how you would use USD schema attributes in Houdini.

There is no difference. It all results in the same USD data (scene description) in the end. That's why it's important to look at the scene graph details pane. That's kind of the ground truth. You'll see that using python - GetIntensityAttr(), or vex - usd_attribute(), or a LOPS node - editproperties, distantlightedit etc ... they all result in the same USD, which can be confirmed by inspecting the scene graph details pane.

LOPS is basically a USD editor. It doesn't matter what LOP node you use or python or whatever, the result has to be valid USD (and there's only one kind of valid USD when it comes to authoring attributes).

When selecting the primitive lop with it's type set to a distant light then looking in the Scene Graph details, it's blank ?
【T】【C】【S】
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
It should not be blank. Are you sure you have the light created by the primitive LOP selected in the Scene Graph Tree pane? Selecting just the LOP node in the node editor is not enough. The attributes are a property of the USD prim, not the LOP node, so you need to select the USD prim.

If that's not the issue maybe post a screen shot of you Houdini session because it's hard to guess what the problem might be.

I attached a screen shot of what it should look like.
Edited by antc - April 30, 2022 11:18:01

Attachments:
distant_light_attributes.png (1.4 MB)

User Avatar
Member
767 posts
Joined: April 2014
Offline
antc
It should not be blank. Are you sure you have the light created by the primitive LOP selected in the Scene Graph Tree pane? Selecting just the LOP node in the node editor is not enough. The attributes are a property of the USD prim, not the LOP node, so you need to select the USD prim.

If that's not the issue maybe post a screen shot of you Houdini session because it's hard to guess what the problem might be.

I attached a screen shot of what it should look like.

I see the intensity value. I placed a wrangler after the primitive lop and set the intensity to 100; although it's still too bright ?
【T】【C】【S】
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
_Christopher_
I see the intensity value. I placed a wrangler after the primitive lop and set the intensity to 100; although it's still too bright ?

Maybe post a screen shot or hip of your setup. You should able to control the intensity of the light with a wrangle. Hip and image attached.

Attachments:
intensity_wrangle.gif (188.0 KB)
intensity_wrangle.hipnc (77.6 KB)

User Avatar
Member
767 posts
Joined: April 2014
Offline
I must use the `input` when using USD attributes ?

I'm having an issue whereas I didn't change anything in the primitive lop but it's failing: unable to evaluate expression ?
【T】【C】【S】
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
Yes the name set by the wrangle will need to match whatever the attribute is called in the scene graph details pane. Otherwise it will author to some other attribute that is not recognized by the lights schema. In this case it's "inputs:intensty" not "intensity". When you use python to set the intensity via the schama's GetIntenistyAttr function it takes care of the naming for you. But when you use vex to set attributes you (unfortunately) can't use the schema so have to type the correct attribute name.

The ":" syntax are called attribute namespaces btw. So the core light attributes are all in a namespace called "inputs". I don't recall offhand why the "inputs" namespace was chosen for lights but one benefit is it keeps all the light attributes grouped together nicely. For example if you look at the other attributes on the light there is also "visibility" and "purpose" that don't live in the "inputs" namespace. Those two attributes are actually coming from a different schema since schemas can inherit from other schemas.

So yes watch out for the naming if using wrangles! Note that the distantlightedit LOP takes care of the naming for you automatically as well. Plus you get a nice slider for the intensity and color picker for the color So if it were me I would only use a wrangle if I were doing something super fancy and procedural.
Edited by antc - May 1, 2022 16:06:18
User Avatar
Member
767 posts
Joined: April 2014
Offline
I don't know why; I'm getting this error in the primitive lop, although I never changed anything in the lop ?

Attachments:
wrangler_error.jpg (40.2 KB)

【T】【C】【S】
User Avatar
Member
282 posts
Joined: Nov. 2013
Offline
I think the error there is saying there's something wrong with the primitive pattern in LOP node attrbwrangle1. What does the primitive pattern look like on that node?
User Avatar
Member
767 posts
Joined: April 2014
Offline
antc
I think the error there is saying there's something wrong with the primitive pattern in LOP node attrbwrangle1. What does the primitive pattern look like on that node?

I didn't change anything on the node; why I asked it just broke. The pattern is; /lights/lightkb
【T】【C】【S】
  • Quick Links