Add ramp to Dome light
1128 2 0- Leli
- Member
- 2 posts
- Joined: July 2020
- Offline
- mestela
- Member
- 1748 posts
- Joined: May 2006
- Online
Good question!
19.5 added light material nodes, so you can do gobos, gels, projections. I've used it in spotlights and area lights, but never thought to try it in dome lights.
It kind of works, but it's likely I'm missing a trick. You need to get uv coordinates from the light, which look like this for a spotlight:
If you do the same for a domelight, the uv coordinates are weird; it projects two infinite planes that face each other, one of them upside down:
You can swap the texture for a ramp, having seen the previous image, this odd result makes sense, the left side has the ramp going from bottom to top, the right from top to bottom:
I've played around a bit with the various nodes and options in the light filter library context, I couldn't find anything that'd give you what you need, basically polar coordinates. As far as I can tell all the other mtlx nodes to return position, normals, tangents etc are expecting geometry, not an infinite light source, so they return the domelight's pivot at best, nothing or garbage values at worst.
The best I could do was to fix the upside down bit, and squeeze the uv's so that the values returned are more reasonable. This gives you a ramp that almost looks usable, but not really:
Anyway, I've attached a hip, but I'm quietly hoping one of the karma devs will either go 'dur matt, use this node', or 'dur matt, we've added a node to the next daily build'.
19.5 added light material nodes, so you can do gobos, gels, projections. I've used it in spotlights and area lights, but never thought to try it in dome lights.
It kind of works, but it's likely I'm missing a trick. You need to get uv coordinates from the light, which look like this for a spotlight:
If you do the same for a domelight, the uv coordinates are weird; it projects two infinite planes that face each other, one of them upside down:
You can swap the texture for a ramp, having seen the previous image, this odd result makes sense, the left side has the ramp going from bottom to top, the right from top to bottom:
I've played around a bit with the various nodes and options in the light filter library context, I couldn't find anything that'd give you what you need, basically polar coordinates. As far as I can tell all the other mtlx nodes to return position, normals, tangents etc are expecting geometry, not an infinite light source, so they return the domelight's pivot at best, nothing or garbage values at worst.
The best I could do was to fix the upside down bit, and squeeze the uv's so that the values returned are more reasonable. This gives you a ramp that almost looks usable, but not really:
Anyway, I've attached a hip, but I'm quietly hoping one of the karma devs will either go 'dur matt, use this node', or 'dur matt, we've added a node to the next daily build'.
Image Not Found
- Leli
- Member
- 2 posts
- Joined: July 2020
- Offline
-
- Quick Links