Projecting texture through light

   2522   3   3
User Avatar
Member
260 posts
Joined: March 2011
Offline
Hi,

Is It possible to do texture projection through light?
User Avatar
Member
12427 posts
Joined: July 2005
Offline
In a surface shader? Or in the light as "projector"? And for Karma, or other delegates?

I did try making a rectangle light with a texture, and then turning up the focus to astronomical values, but it still didn't focus enough to be a slide projection. I feel like I'm missing something, however.

Also, I tried to create a light shader for Karma but got an instant crash. I'll try to recreate this a bit later for SideFX.
Moreover, I have no idea how to do this kind of thing in Mtlx... there is not a lot of info about it. I don't see nodes for querying spaces, not even a node to query projection info from image headers (texinfo stuff). Ah, I see that the "Geometric Nodes" like Mtlx Position all have a "space" parameter. It would be good if SideFX populated the menus for this: "model", "object", "world". It looks like NDC space was proposed way back when in the 1.36 draft proposal, but fell off for some reason.



FWIW, this got me messing with the surface shader via Space Change VOP, hoping to be able to refer to another prim's space, and I was only able to get the basic space changes working (current/world/NDC) and wasn't able to refer to a specific prim (using the Object Name entry). Perhaps these could be RFEs? I'm not certain what access a delegate has to the scene, express after going through Hydra, but it would be most excellent to be able to transform to prims and lights/etc to get their spaces.
Edited by jason_iversen - Nov. 15, 2021 14:34:43

Attachments:
spaces.png (261.5 KB)

Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Staff
451 posts
Joined: June 2020
Offline
Here's a custom light shader which supports projection. It's based off of our vanilla Karma light shader but adds projection via a "slide" parm. You can have a look at the vfl in a text editor if you want. Just search for "slide" or "defaultlightsurface1/projection" to see the additional block of code. Everything else is the original defaultlightsurface.

There's an RFE to add projection support to the vanilla Karma light shader, but we're also watching&waiting a bit to see how light shader&filter networks evolve with USD.

- Rob
Edited by robp_sidefx - Nov. 16, 2021 04:30:50

Attachments:
light.vfl (10.3 KB)
projection.hip (494.9 KB)
proj.jpg (1.2 MB)

User Avatar
Member
260 posts
Joined: March 2011
Offline
robp_sidefx
Here's a custom light shader which supports projection. It's based off of our vanilla Karma light shader but adds projection via a "slide" parm. You can have a look at the vfl in a text editor if you want. Just search for "slide" or "defaultlightsurface1/projection" to see the additional block of code. Everything else is the original defaultlightsurface.

There's an RFE to add projection support to the vanilla Karma light shader, but we're also watching&waiting a bit to see how light shader&filter networks evolve with USD.

- Rob
Thanks Rob. Although I'm using Karma, my question was indeed generic because I didn't find any parm for that kind of effect in the usd lights.

Thanks for the file and the answer and Jason as well!
  • Quick Links