jit.gl.videoplane + spotlight problem

Dec 5, 2011 at 2:45pm

jit.gl.videoplane + spotlight problem

hi!
i’v got a problem with some drawing in opengl..

first i generate the plane in @poly_mode 1 1 with @dim 20 2, to get the stripes, then i store the texture in jit.gl.node, and with jit.gl.slab i am substracting it with an alpha mask and next to jit.gl.videoplane. untill now everythink goes right, but when i*am trying to turn on the lighting on videoplane, the resolution is geting low. the only solution that i found, is to increase the @dim on the videoplane, but then i loose the performance.. anyway i have posted here my patch, with the sample video, and skeleton data from kinect. the other problem is when i turn on the fullscreen, everything is getting buggy, and the axes of light is moving with +- 0.5 fps. i would be thankful for any help!
adam

i take the alphamask from kinnect

Attachments:
  1. rap.rar
#60475
Dec 5, 2011 at 4:38pm

Could you post something other than a RAR? A ZIP file would be better and a compressed patcher even better.

#217659
Dec 5, 2011 at 4:49pm

wow it is you again :) big thanks!
i’am compressing it, because the mov file, is 100 mb.

Attachments:
  1. rap2.zip
#217660
Dec 5, 2011 at 5:17pm

For whatever reason, the zip file doesn’t work for me.

You shouldn’t need to increase the dim on the videoplane to create a spotlight effect. If you need 3D lighting, have a look at jit.gl.light (Max6). If you just want an image of a spotlight to modulate the texture, you could use jit.gl.slab and a custom shader in Max5 or jit.gl.pix in Max6. Using jit.gl.pix it should be pretty simple to make a nice looking spotlight.

#217661
Dec 5, 2011 at 5:31pm

yes yes! i would like only to modulate the texture. i’am using max 6 and using jit.gl.light, but the jit.gl.pix is some sort of magic for me.. could you help me with this?

http://galeria-silownia.pl/test.mov
this is the movie :)

Attachments:
  1. rap.txt
#217662
Dec 5, 2011 at 5:34pm

i was able to open the zip file.

napentro, i think these are simply the artifacts that appear when you draw lines with opengl.
you could get better results by setting @antialias 1 on your gridshape, and @fsaa1 on your window. you might want to add some gaussian blur to your output texture as well.

the fullscreen slowdown happens because you are reading your back to a matrix to view with the pwindow.
get rid of that, and you should be fine in fullscreen.
a better solution for a pwindow preview is to use a shared_context.

#217663
Dec 5, 2011 at 9:34pm

i dont know if you get me right, because my problem begins when you open the “jit.gl_stuff” patcher, and turn on the lighting. only then the fulscreen is getting buggy and the problems with resolution is starting. sorry for my google translator english, but i think, you get me

#217664
Dec 6, 2011 at 12:52pm

hi!
i have made another atempt, and stopped on quite similar thing. with this less complicated patch i am trying to get silhouette, with lights on hands and foots. i have got problem, to improve the quality of lights with no lose of performance. next i want to add those stripes some how.. maybe the jit.gl.material will be usefull?
Thanks in advance!

– Pasted Max Patch, click to expand. –
#217665
Dec 6, 2011 at 2:17pm

i did it with gl.slab and it works :))
but now i got porblems with fullscreen performance..

– Pasted Max Patch, click to expand. –
#217666
Dec 6, 2011 at 3:20pm

i v got another, more simplyfied version with the same problem…

– Pasted Max Patch, click to expand. –

thanks for any advice!!

[attachment=178566,3035]

Attachments:
  1. export.png
#217667
Dec 6, 2011 at 3:55pm

so… i have to continue my monologue :)

i found that now the problem is in the gaussian blur, that is eating my fps :)

do you know why is it happened?
it should be done with gpu and i am messed up..

#217668
Dec 6, 2011 at 7:07pm

i simplified the question and patch and i started new topic.
Thanks for help!
do you know is there any way to delate topic?

#217669

You must be logged in to reply to this topic.