Hello; above topic is a little complex but i will try to explain here
I am trying to figure out a way for outputting a mask for my Geolight
Assume that I have one geolight in different areas of my scene using one geometry. Each Geometry is merged into one node and fed into the geo light but I still have point or prim attributes to keep these prims unique.
Is there a way for me to create a mask per attribute on the illuminated object, so I can grade them individually even if they are coming from one light.
Primvar to Geolight Render Masks per color or per prim etc
1928 3 2-
- tricecold
- Member
- 260 posts
- Joined: 7月 2006
- Offline
Edited by tricecold - 2019年11月14日 15:11:09
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
-
- jsmack
- Member
- 7981 posts
- Joined: 9月 2011
- Offline
-
- tricecold
- Member
- 260 posts
- Joined: 7月 2006
- Offline
It's Mantra, I assumed there must be a way to trace the Ray back to its source and get attribute.
Looking in documentation currently. Any possible pointers ?
Looking in documentation currently. Any possible pointers ?
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
-
- ZeitG
- Member
- 9 posts
- Joined: 11月 2010
- Offline
Hello, tricecold.
1. based on camera you can create a points grid in NDC space, point per pixel. Than make a direction vector from centre of camera till each point. This is going to be an image representation with points.
2. Using intersect function you may find new points (pixels) position in your scene.
3. For each point create a vector till each light (easy to do this in foreach loop) and again with intersect function find an intersection with geometry in you scene. If intersection is -1 this mean pixel will be affected by light. Put each light in array, based on this array you can read from light whatever you want.
if you have a particles - convert position of all particles to NDC, find closest pixel ( but in this case you need to have something like a pixel samples to define exact position )
if you have a volumes. create a point per voxel (or try any different resolution), than find an intersection with geometry in your scene based on path to light, store this info, and back it camera as particles. Or grid (2x2) per voxel, store density value for each grid, and with intersectall for pixel (point) iterate inside array till density >= 1
In this case on each point (pixel) you may store everything, light name, geo name, distance and do with this whatever you want.
Is this a best way or not - I do not know. I hope it will help.
1. based on camera you can create a points grid in NDC space, point per pixel. Than make a direction vector from centre of camera till each point. This is going to be an image representation with points.
2. Using intersect function you may find new points (pixels) position in your scene.
3. For each point create a vector till each light (easy to do this in foreach loop) and again with intersect function find an intersection with geometry in you scene. If intersection is -1 this mean pixel will be affected by light. Put each light in array, based on this array you can read from light whatever you want.
if you have a particles - convert position of all particles to NDC, find closest pixel ( but in this case you need to have something like a pixel samples to define exact position )
if you have a volumes. create a point per voxel (or try any different resolution), than find an intersection with geometry in your scene based on path to light, store this info, and back it camera as particles. Or grid (2x2) per voxel, store density value for each grid, and with intersectall for pixel (point) iterate inside array till density >= 1
In this case on each point (pixel) you may store everything, light name, geo name, distance and do with this whatever you want.
Is this a best way or not - I do not know. I hope it will help.
-
- Quick Links