Forums > Jitter

"prepend texture" vs "jit.gl.texture"

October 1, 2007 | 1:11 pm

Hi all,

-introduction-
I’m re-programming (restyling) a theather show for children, Farfalle/Butterflies of the italian TPO company, using a pc connected to a sensitive carpet with 12×9 pressure sensors, a dozen of proximity sensors, a infrared camera and 3 videoprojectors to create a immersive ambient.
I hope that someone can help me:

-question 1-
I’ve noticed that a texture created with the "prepend texture" message has a lower quality than one created by a jit.gl.texture (with the same image). I have to read the same image at the double of resolution (and more) to have the same quality.

-question 2-
With the "prepend texture" message I can delete the texture from the video memory with "deletetexture" message, how can I delete the jit.gl.texture memory? Only deleting "physically" the object?

-question 3-
How can I reproduce the "lighten" and "screen" layer’s filters normally used in photo-editing software? I use many GL layers with blend_enable activated.

-question 4-
In a scene I have 48 "jit.gl.gridshape @shape plane dim 2 2" with texture (butterflies) moving around the screens with many many "drunk", "scale", "rotate", "line", etc. The movements slow down (low fps) but the cpu’s graphic in the Task Manager show the cpu "relaxing".
Less GL-objects -> more fps and the cpu work more…
Why the cpu don’t work well? It’s a graphic card problem? I use two Radeon X1300 and a Core Duo 2 cpu.
Should be better with a javascript’s programming?

-bug 1-
When I have the 3 windows in fullscreen mode in the 3 monitors and I resize the patch’s windows, the borders make "garbage lines" and the windows don’t resize really. I have to use the "window size xxx yyy, window exec" message or disable the fullscreen of the 3 screens.

Thanks to all
(and sorry for my english)

SpyRoX

http://www.tpo.it


October 1, 2007 | 1:28 pm

> -question 1-
> I’ve noticed that a texture created with the "prepend texture" message has a lower quality than one created by a jit.gl.texture (with the same image). I have to read the same image at the double of resolution (and more) to have the same quality.

>
> -question 2-
> With the "prepend texture" message I can delete the texture from the video memory with "deletetexture" message, how can I delete the jit.gl.texture memory? Only deleting "physically" the object?
>

Do you have an example patch? I’m not really sure what you’re
describing here. Are these messages to jit.gl.render? I would
recommend using jit.gl.texture for anything texture related. Also,
why do you need to worry about deleting the texture’s memory? Is
there some kind of memory related issue you’re coming across?

> -question 3-
> How can I reproduce the "lighten" and "screen" layer’s filters normally used in photo-editing software? I use many GL layers with blend_enable activated.
>

You may want to render your scene to a texture and use jit.gl.slab to
do some kind of scene post processing.

> -question 4-
> In a scene I have 48 "jit.gl.gridshape @shape plane dim 2 2" with texture (butterflies) moving around the screens with many many "drunk", "scale", "rotate", "line", etc. The movements slow down (low fps) but the cpu’s graphic in the Task Manager show the cpu "relaxing".
> Less GL-objects -> more fps and the cpu work more…
> Why the cpu don’t work well? It’s a graphic card problem? I use two Radeon X1300 and a Core Duo 2 cpu.
> Should be better with a javascript’s programming?
>

use jit.gl.gridshape @displaylist 1. That should speed things up
quite a bit. Also, if you can express the patterns controlling the
gridshapes in a matrix, you may want to look at using jit.gl.multiple
for controlling the 48 gridshapes.

> -bug 1-
> When I have the 3 windows in fullscreen mode in the 3 monitors and I resize the patch’s windows, the borders make "garbage lines" and the windows don’t resize really. I have to use the "window size xxx yyy, window exec" message or disable the fullscreen of the 3 screens.

Again, do you have a simple example patch that reproduces this bug?
If its an interface bug, it’s something that has probably been
addressed in Max5.

wes


October 1, 2007 | 3:43 pm

> > -question 1-
> > I’ve noticed that a texture created with the "prepend texture" message has a lower quality than one created by a jit.gl.texture (with the same image). I have to read the same image at the double of resolution (and more) to have the same quality.
> >
> > -question 2-
> > With the "prepend texture" message I can delete the texture from the video memory with "deletetexture" message, how can I delete the jit.gl.texture memory? Only deleting "physically" the object?
> >
>
>
> Do you have an example patch? I’m not really sure what you’re
> describing here. Are these messages to jit.gl.render? I would
> recommend using jit.gl.texture for anything texture related. Also,
> why do you need to worry about deleting the texture’s memory? Is
> there some kind of memory related issue you’re coming across?

This is a very simple patch, if you load the same texture, you can test the difference. It’s better if you load images with thin orizzontally or verically lines.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 231 433 100 196617 "jit.gl.texture";
#P newex 201 290 204 196617 jit.gl.texture finestra1 @name t_example2;
#P newex 201 258 105 196617 jit.qt.movie 400 300;
#P message 48 433 171 196617 texture t_example2 , rotate 0 0 0 1;
#P message 48 413 183 196617 texture t_example1 , rotate 180 1 0 0;
#P window linecount 2;
#P newex 34 465 306 196617 jit.gl.gridshape finestra1 @shape plane @position 0. 0. 0. @scale 4. 3. 1. @color 1. 1. 1. 1. @blend_enable 1 @layer 101 @enable 1;
#P window linecount 1;
#P newex 29 312 63 196617 s to_render;
#P newex 124 116 63 196617 r to_render;
#P newex 29 289 138 196617 prepend texture t_example1;
#P message 81 225 57 196617 read , bang;
#P newex 29 257 105 196617 jit.qt.movie 400 300;
#P newex 26 161 236 196617 jit.window finestra1 @size 400 300 @pos 640 44;
#P newex 50 113 53 196617 s to_bang;
#P newex 26 84 58 196617 t b b erase;
#P toggle 26 36 15 0;
#P newex 26 54 57 196617 qmetro 40;
#P newex 26 138 315 196617 jit.gl.render finestra1 @camera 0. 0. 7.25 @erase_color 0. 0. 0. 1.;
#P comment 231 413 100 196617 "prepend texture";
#P window linecount 2;
#P comment 150 224 252 196617 load a 400×300 image with sharp details , better with orizzontally and vertically lines;
#P window linecount 1;
#P comment 71 395 100 196617 Try to switch;
#P connect 17 0 18 0;
#P connect 10 0 9 0;
#P connect 10 0 17 0;
#P connect 6 1 7 0;
#P connect 16 0 14 0;
#P connect 15 0 14 0;
#P connect 11 0 13 0;
#P connect 9 0 11 0;
#P connect 6 0 3 0;
#P fasten 6 2 3 0 79 104 31 104;
#P connect 12 0 3 0;
#P connect 4 0 6 0;
#P connect 5 0 4 0;
#P window clipboard copycount 20;

I need to delete the texture’s memory because the show is full of hi-res images and after a bit the max’s window say "error: could not allocate matrix" "error: jit.gl.texture: unable to create cache: out of memory"
In the old version of the show I’ve used only "prepend texture" and with the "deletetexture" I’ve resolved the problem, loading and deleting texture during the show.

> > -bug 1-
> > When I have the 3 windows in fullscreen mode in the 3 monitors and I resize the patch’s windows, the borders make "garbage lines" and the windows don’t resize really. I have to use the "window size xxx yyy, window exec" message or disable the fullscreen of the 3 screens.
>
>
> Again, do you have a simple example patch that reproduces this bug?
> If its an interface bug, it’s something that has probably been
> addressed in Max5.
>
> wes

Yes, it’s "only" a interface bug and only when I have all the 3 windows in fullscreen mode.

Thanks

SpyRoX


October 1, 2007 | 4:19 pm

Ok, so to explicity manage jit.gl.texture’s allocated memory you may
want to use javascript to delete no longer used objects. I believe
there’s a freepeer() method you can use to force freeing of a JS
Jitter object. Or you can send a texture object a very small matrix
and it should adapt its internal matrix to that size. BTW, what size
images are you using and how many? Sounds like you’re really maxing
out on your computer’s memory.

wes


October 1, 2007 | 6:30 pm

>
>>-question 3-
>>How can I reproduce the "lighten" and "screen" layer’s filters normally used in photo-editing software? I use many GL layers with blend_enable activated.
>>
>
>
> You may want to render your scene to a texture and use jit.gl.slab to
> do some kind of scene post processing.
>

…and take a look at the co.lighten.jxs and co.screen.jxs shader!

ciao
Marco


Viewing 5 posts - 1 through 5 (of 5 total)