All I ever wanted was a possibility to previsualise projectors… within vvvv
I recently patched together some kind of video projection simulation that aims on simulating real projectors using strides lovely ProjectorLight. The node can be setup with typical projector properties (throw ratio, lens shift, …) and it works within certain limitations to help with planning of projector positions.
In the end the node is faking the projection image by offsetting the ProjectorLight from the real position when lens offset/shift is used. It therefore is not correct
with regards to shadows cast by objects within the projection cones.
not correct with non flat objects or walls that are not strictly perpendicular to the projector
This is of course not what it eventually should be. This is why I’m putting this here as a basis for discussion and call for collaboration. I’ve seen that the devvvs have projection tools on their roadmap and it would be really nice if some similar (but proper) implementation of a projector simulator would be part of this.
As far as I can tell a proper simulation with lens shift would work by letting the ProjectorLight
stay in the position of the projector
blow up the image size (FoV) of the projector light
scale and crop the image within this FoV
but there are probably other solutions as well. Also I’m not deep enough in Strides API to understand the details of how the projector light works internally.
I followed the idea to blow up the image size and reposition/scale the image inside this area. This actually works quite fine and also eliminates the restrictions regarding the objects being projected, shadowing, …
however, I don’t see a possibility to set the sampler state to “clamp” on the projected texture, resulting in a huge bleed of the borderpixels.
from what i can tell from the LightSpot source, sampler state is not being taken into account. is that right or are there other possibilities to set the sampler state?
i see.
this looks like an easy fix (if you are into the stride source - which i’m not :( ).
i’d be glad if somebody could lend a hand here or even pick it up. i don’t have the time to dive deeper into this atm.
anyways, here is the current status if you want to take a look. this could be really useful i guess…
yes, but as you said initially, the correct fix would be to give the spotlight the appropriate off-center parameters. we’ll have a look at whether that’s possible. thanks a lot for starting the framework, it is already very helpful.
Is giving the spotlight the appropriate off-center parameters an achievable option, or maybe connecting the LightSpot sampler state so we can use Clamp?
Maybe I can help here with the PR or something. Let me know and thanks!