jit.gl.videoplane + spotlight problem

ćwiek's icon

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

3027.rap.rar
rar
Wesley Smith's icon

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

ćwiek's icon

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

3028.rap2.zip
zip
Wesley Smith's icon

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.

ćwiek's icon

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?

3030.rap.txt
txt
Rob Ramirez's icon

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.

ćwiek's icon

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

ćwiek's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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!

ćwiek's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

ćwiek's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

thanks for any advice!!

3035.export.png
png
ćwiek's icon

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..

ćwiek's icon

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