I want a model (a plane) to be complete transparent and only visible where shadow is casted on it.
I experimented some time with colorblendattrib but i dont realy understand how the colorblendattrib works and how to use it, also couldnt find infos/examples on the forum about how to use the colorblenattrib. With following code im actually close to the look i want, but close is not enough ;D (i found this code with trial and error, trying al the constants listed in the api under colorblendattrib)
shadowplane.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MLessEqual))
This works when the color of the light, which casts the shadows is completly white, but if the light has a color, this color is also visible/drawn. Is there a way to define a color, lets say (0.1,0.1,0.1) and make the model only visible if the color of it is below that defined color? How?
Another problem is, i want the shadow not to be complete black, but halftransparent instead, but alpha/transparency seems not to work when i use the colorblenattrib, how to work around that?
Or is there a simpler way to have shadows in an augmented reality application???
Thanks for looking ;D
edit: i found a solution to one of the issues, with following code i was able to do a half-transparent overlay (found it somewher on the forums):
shadowplane.setColor(1,1,1,0.7)
shadowplane.setTransparency(True)
shadowplane.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOne))
but this does not seem to work with the MLessEqual-mode…so im still looking for a methode to overlay just the dark colors and make them halftransparent