been trying to figure this out for a while now, and i cant quite get it to work right.
I’ve got some 2D voronoi noise mapped to my model’s UVs, and I am trying to figure out a way to light each voronoi cell as if it were a single point (so if a shadow is cast onto an object, rather than casting an accurate shadow, it instead darkens the entire voronoi cells which it covers). Is this possible?
If you manage to calculate light over surfaces inside GN, then it would be possible. (this almost implies building a renderer with GN )
I never tried to do that (and probably I’ll never will), but you can give it a shot.
It might even be possible to create a mapping vector that is tied to a ‘light’ source, but it wont be possible to control each ‘point’ from a voronoi noise individually.
Do you have more examples of what sort of effect you want to go for?
Quick idea:
In eevee there is the Shader to RGB node… with this and a less then node you might “detect” the darkened cells and “switch them” to you “complete shadow color”.
Another way might be in composite: using a crypto mate for the object and then again compare normal lightened versus shadow values ??
most my attempts so far have used a diffuse into a shader to rgb (a toon shader) and i’ve been trying to use it as a mask for shadows. problem is i need a way to retrieve color data directly from one part of a model (the center of each voronoi cell) and apply it to the rest of each voronoi cell, which doesnt seem to be possible.
At the render loop, some pixel needs to get the value of some other pixel, somewhere else in the screen… but it’s impossible to know if that other pixel was calculated or not!
That’s why ‘Baking’ is needed (, it forces a pre-step).
And there’s also the problem that you can’t convert UV coordinates to any other Texture space (object, world, camera)… But that would be a bit much for this thread.
i see… i thought i would be able to retrieve color data from a model “live” in a shader. i guess that doesnt really make sense in retrospect.
i will keep experimenting to see if i can find a workaround, as i would prefer not to bake every frame of animation !