Forum

ProjectedTexture.fx

That ProjectedTexture.fx from Girlpowers (slide projector) patch also projects backwards.
Does somebody know a way to prevent this?

help appreciated!

this is the only problem to be solved for a
generic movinglight simulation,

which allows rotating and morphing gobos etc.

you could check the z component of the TexC in the pixelshader and if it is < 0 then just give back the color black. something like this.

können vor lachen.

i don’t know nothing at all about shaderprgramming.

somebody around here who can fix that?
would be very nice!

if (TexC.z smaller 0) {col=0;} didn’t do the trick. not sure, if it can, since the walls backside is a frontside in 3d-means (guess the tex coords are all within normal range).
if you use culling-counterclockwise on the fx, the texture is only seen one sided (in this case inside the wall).
but maybe it’s enough for your needs to just use a 3d-model without volumina.

gonna keep trying anyway…

wand_cut.x (2.8 kB)

thx woei,

i’m sorry to say that the volumina-culling-double projection thing is not what bothers me.
sorry for describing my problem mistakable.

how may that be solved?
solution of this would be a quantum leap in simulation of vvvv-dmx-controled lights.
i think there are some more users beyond me having interest in this.

unfortunately i don’t think that i am able to find the solution on my own within the next 6 months…

ahhh, wiki cuts the image :-P

MovLight (Fixture Generic) help-DirectX Renderer#0.jpg (25.6 kB)

once again:
please help:

download Gobo.zip

that 2nd projection on the left is not wanted.
how to get rid of this?

anybody found a solution for this yet?

just found this tutorial regarding OpenGL: http://www.ozone3d.net/tutorials/glsl_texturing_p08.php

qoute:

The reverse projection occurs when the {q} coordinate becomes negative. It is not easy to act on the {q} coordinate at the fixed functions level, but in a pixel shader it is really simple as shown by the following shader code

unfortunately no time for this at the moment.

hi kalle!

i work on this topic right now.

try this patch and have a look at the shader. it does the same but for 4 projections.

does it work for you?

greg

projectedtex.rar (4.5 kB)

hey gregsn,

yes, works for me.
meanwhile i found the time to modify the girlpowers “slide prejector” patch and its shader.
i assume that you did them…

i also tried to get the RendererCoordsToTexCoords as a matrix inside the shader but didn’t get managed to do this yesterday.

so there is only one thing left:
that the projection is “leaving” the solid at the “far” side again.
but in most case this will not be very important.

thanks for contributing your patch/fx!!!

( slide projector ) (0 Bytes)
( slide projector ).zip (9.6 kB)

hey kalle!

yes, i did it. and it provides somehow the possibilty to place a slide independent from a light which shines through the slide.

however for most gobo or beamer projections you wouldn’t need this flexibility. to say it in antoher way: the parameterization of this patch didn’t work for me anymore. i needed a good way to visualize a projector (done with the now very good projector module) and an easy way to use this virtual projector in a simulation.

so i skipped this slide projector patch…

by the way: there is a new version of that projector patch…

Projector (EX9).v4p (45.0 kB)

It would be nice to update the girlpower with the most current version of the Projector.fx - I just ran into this same old problem with the example from 40beta17 and luckily remembered this thread …

Also modified the .fx to kill all color outside of the [0…1 texture coordinates to fix ugly borders for blendmodes other than ‘add’:

ProjectedTexture.fx (3.6 kB)