depth message wouldn't resolve trails ?

Mar 31, 2008 at 4:55pm

depth message wouldn't resolve trails ?

Hello,

I have these inexpected trails,
Could you point me the way to remove them ?

thank you.

max v2;
#N vpatcher 163 71 1065 589;
#P origin 0 21;
#P toggle 510 232 15 0;
#P window setfont “Sans Serif” 9.;
#P message 510 255 81 196617 depth_enable $1;
#P toggle 562 323 15 0;
#P message 562 346 81 196617 depth_enable $1;
#P flonum 475 326 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 475 347 82 196617 color 1. 1. 1. $1;
#P toggle 732 301 17 0;
#P toggle 752 338 17 0;
#P toggle 711 337 17 0;
#P newex 670 358 89 196617 pak poly_mode 0 0;
#P newex 408 328 29 196617 r b2;
#P newex 381 229 29 196617 r b1;
#P newex 107 111 29 196617 s b1;
#P newex 71 111 29 196617 s b2;
#P window linecount 3;
#P newex 408 381 336 196617 jit.gl.gridshape bulle @shape sphere @scale 0.5 0.5 0.5 @blend_enable 1 @smooth_shading 1 @lighting_enable 1 @automatic 0 @depth_enable 1 @color 1. 1. 1. 0.35;
#P toggle 450 238 15 0;
#P window linecount 1;
#P message 450 256 53 196617 enable $1;
#P message 531 98 30 196617 read;
#P newex 619 234 47 196617 gate 1 1;
#N vpatcher 460 63 588 255;
#P outlet 32 74 15 0;
#P inlet 36 41 15 0;
#P connect 0 0 1 0;
#P pop;
#P newobj 656 209 13 196617 p;
#P flonum 689 37 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 784 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 748 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 712 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 679 189 112 196617 pak rotatexyz 0. 0. 0.;
#P flonum 743 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 705 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 665 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 640 98 85 196617 pak scale 1. 1. 1.;
#P flonum 762 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 724 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 684 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 656 143 95 196617 pak position 0. 0. 0.;
#P message 201 80 34 196617 reset;
#P toggle 182 109 15 0;
#P newex 182 129 47 196617 gate 1 1;
#P window linecount 2;
#P newex 201 98 189 196617 jit.gl.handle bulle @inherit_transform 1 @visible 0;
#P window linecount 1;
#P newex 415 280 405 196617 jit.gl.videoplane bulle @texture tex1 @automatic 0 @scale 0.2 0.2 0.2 @depth_enable 1;
#P newex 406 151 151 196617 jit.gl.texture bulle @name tex1;
#P message 479 106 29 196617 stop;
#P message 445 106 33 196617 start;
#P newex 445 86 41 196617 sel 1 0;
#P newex 404 128 167 196617 jit.qt.movie 320 240 @autostart 0;
#P message 523 79 76 196617 read bball.mov;
#P message 53 175 192 196617 name bulle , size 320 240 , depthbuffer 1;
#P user jit.pwindow 52 201 322 242 0 1 0 0 1 1;
#X name bulle;
#P newex 57 149 89 196617 jit.gl.render bulle;
#P newex 57 85 115 196617 t b b b erase;
#P toggle 57 37 15 0;
#P newex 57 61 57 196617 qmetro 20;
#P connect 5 0 4 0;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P fasten 14 0 3 0 187 146 62 146;
#P connect 2 3 3 0;
#P connect 2 0 3 0;
#P connect 2 1 36 0;
#P connect 2 2 37 0;
#P connect 15 0 14 0;
#P connect 16 0 13 0;
#P connect 13 0 14 1;
#P fasten 0 0 7 0 62 80 409 80;
#P fasten 6 0 7 0 528 124 409 124;
#P fasten 9 0 7 0 450 122 409 122;
#P fasten 10 0 7 0 484 122 409 122;
#P fasten 32 0 7 0 536 127 409 127;
#P connect 7 0 11 0;
#P fasten 46 0 35 0 567 371 413 371;
#P fasten 44 0 35 0 480 371 413 371;
#P connect 39 0 35 0;
#P fasten 40 0 35 0 675 378 413 378;
#P fasten 48 0 12 0 515 275 420 275;
#P fasten 33 0 12 0 455 274 420 274;
#P fasten 31 0 12 0 624 274 420 274;
#P connect 38 0 12 0;
#P fasten 1 0 8 0 62 55 450 55;
#P connect 8 0 9 0;
#P connect 34 0 33 0;
#P connect 45 0 44 0;
#P fasten 8 1 10 0 465 104 484 104;
#P connect 49 0 48 0;
#P connect 47 0 46 0;
#P fasten 21 0 30 0 645 191 661 191;
#P fasten 25 0 30 0 684 207 661 207;
#P connect 17 0 30 0;
#P connect 30 0 31 1;
#P connect 29 0 22 0;
#P connect 22 0 21 1;
#P connect 18 0 17 1;
#P fasten 23 0 21 2 710 92 695 92;
#P connect 29 0 23 0;
#P connect 41 0 40 1;
#P fasten 43 0 41 0 737 326 716 326;
#P fasten 19 0 17 2 729 138 717 138;
#P connect 26 0 25 1;
#P fasten 24 0 21 3 748 92 720 92;
#P fasten 20 0 17 3 767 138 745 138;
#P connect 29 0 24 0;
#P connect 27 0 25 2;
#P connect 42 0 40 2;
#P fasten 43 0 42 0 737 327 757 327;
#P connect 28 0 25 3;
#P pop;

#36643
Mar 31, 2008 at 5:10pm

This is because you have blending turned on. Depending on which
section of the sphere is drawn first, you will blend between different
colors. What you’re seeing are artifacts _because_ you have depth
testing turned on, not despite it. If you set @depth_enable 0
@blend_mode 6 1 @blend_enable 1, you will be in an additive blending
mode, which will get rid of the artifacts. @blend_mode 6 7 is an
xfading blend mode that is highly dependent on render order. In order
to use this mode effectively, you need to have depth sorted vertices,
which Jitter doesn’t do.

wes

On Mon, Mar 31, 2008 at 9:55 AM, Derrick Giscloux
wrote:
> Hello,
>
> I have these inexpected trails,
> Could you point me the way to remove them ?
>
> thank you.
>
> max v2;
> #N vpatcher 163 71 1065 589;
> #P origin 0 21;
> #P toggle 510 232 15 0;
> #P window setfont “Sans Serif” 9.;
> #P message 510 255 81 196617 depth_enable $1;
> #P toggle 562 323 15 0;
> #P message 562 346 81 196617 depth_enable $1;
> #P flonum 475 326 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 475 347 82 196617 color 1. 1. 1. $1;
> #P toggle 732 301 17 0;
> #P toggle 752 338 17 0;
> #P toggle 711 337 17 0;
> #P newex 670 358 89 196617 pak poly_mode 0 0;
> #P newex 408 328 29 196617 r b2;
> #P newex 381 229 29 196617 r b1;
> #P newex 107 111 29 196617 s b1;
> #P newex 71 111 29 196617 s b2;
> #P window linecount 3;
> #P newex 408 381 336 196617 jit.gl.gridshape bulle @shape sphere @scale 0.5 0.5 0.5 @blend_enable 1 @smooth_shading 1 @lighting_enable 1 @automatic 0 @depth_enable 1 @color 1. 1. 1. 0.35;
> #P toggle 450 238 15 0;
> #P window linecount 1;
> #P message 450 256 53 196617 enable $1;
> #P message 531 98 30 196617 read;
> #P newex 619 234 47 196617 gate 1 1;
> #N vpatcher 460 63 588 255;
> #P outlet 32 74 15 0;
> #P inlet 36 41 15 0;
> #P connect 0 0 1 0;
> #P pop;
> #P newobj 656 209 13 196617 p;
> #P flonum 689 37 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 784 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 748 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 712 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 679 189 112 196617 pak rotatexyz 0. 0. 0.;
> #P flonum 743 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 705 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 665 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 640 98 85 196617 pak scale 1. 1. 1.;
> #P flonum 762 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 724 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 684 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 656 143 95 196617 pak position 0. 0. 0.;
> #P message 201 80 34 196617 reset;
> #P toggle 182 109 15 0;
> #P newex 182 129 47 196617 gate 1 1;
> #P window linecount 2;
> #P newex 201 98 189 196617 jit.gl.handle bulle @inherit_transform 1 @visible 0;
> #P window linecount 1;
> #P newex 415 280 405 196617 jit.gl.videoplane bulle @texture tex1 @automatic 0 @scale 0.2 0.2 0.2 @depth_enable 1;
> #P newex 406 151 151 196617 jit.gl.texture bulle @name tex1;
> #P message 479 106 29 196617 stop;
> #P message 445 106 33 196617 start;
> #P newex 445 86 41 196617 sel 1 0;
> #P newex 404 128 167 196617 jit.qt.movie 320 240 @autostart 0;
> #P message 523 79 76 196617 read bball.mov;
> #P message 53 175 192 196617 name bulle , size 320 240 , depthbuffer 1;
> #P user jit.pwindow 52 201 322 242 0 1 0 0 1 1;
> #X name bulle;
> #P newex 57 149 89 196617 jit.gl.render bulle;
> #P newex 57 85 115 196617 t b b b erase;
> #P toggle 57 37 15 0;
> #P newex 57 61 57 196617 qmetro 20;
> #P connect 5 0 4 0;
> #P connect 1 0 0 0;
> #P connect 0 0 2 0;
> #P fasten 14 0 3 0 187 146 62 146;
> #P connect 2 3 3 0;
> #P connect 2 0 3 0;
> #P connect 2 1 36 0;
> #P connect 2 2 37 0;
> #P connect 15 0 14 0;
> #P connect 16 0 13 0;
> #P connect 13 0 14 1;
> #P fasten 0 0 7 0 62 80 409 80;
> #P fasten 6 0 7 0 528 124 409 124;
> #P fasten 9 0 7 0 450 122 409 122;
> #P fasten 10 0 7 0 484 122 409 122;
> #P fasten 32 0 7 0 536 127 409 127;
> #P connect 7 0 11 0;
> #P fasten 46 0 35 0 567 371 413 371;
> #P fasten 44 0 35 0 480 371 413 371;
> #P connect 39 0 35 0;
> #P fasten 40 0 35 0 675 378 413 378;
> #P fasten 48 0 12 0 515 275 420 275;
> #P fasten 33 0 12 0 455 274 420 274;
> #P fasten 31 0 12 0 624 274 420 274;
> #P connect 38 0 12 0;
> #P fasten 1 0 8 0 62 55 450 55;
> #P connect 8 0 9 0;
> #P connect 34 0 33 0;
> #P connect 45 0 44 0;
> #P fasten 8 1 10 0 465 104 484 104;
> #P connect 49 0 48 0;
> #P connect 47 0 46 0;
> #P fasten 21 0 30 0 645 191 661 191;
> #P fasten 25 0 30 0 684 207 661 207;
> #P connect 17 0 30 0;
> #P connect 30 0 31 1;
> #P connect 29 0 22 0;
> #P connect 22 0 21 1;
> #P connect 18 0 17 1;
> #P fasten 23 0 21 2 710 92 695 92;
> #P connect 29 0 23 0;
> #P connect 41 0 40 1;
> #P fasten 43 0 41 0 737 326 716 326;
> #P fasten 19 0 17 2 729 138 717 138;
> #P connect 26 0 25 1;
> #P fasten 24 0 21 3 748 92 720 92;
> #P fasten 20 0 17 3 767 138 745 138;
> #P connect 29 0 24 0;
> #P connect 27 0 25 2;
> #P connect 42 0 40 2;
> #P fasten 43 0 42 0 737 327 757 327;
> #P connect 28 0 25 3;
> #P pop;
>
>
>

#125862
Mar 31, 2008 at 5:11pm

On Mon, Mar 31, 2008 at 4:55 PM, Derrick Giscloux
wrote:

> Hello,
>
> I have these inexpected trails,
> Could you point me the way to remove them ?
>
>

Add the following to your jit.gl.gridshape:

@cull_face 1

For translucent objects you need to enable face culling.

Thijs

#125863
Mar 31, 2008 at 6:31pm

Yes.

Thanks to all.

It would be clever to have a special detailed tutorial about these questions.
For the moment I suppose the way is to have a look at the red book ?

thanks again.

#125864
Apr 1, 2008 at 8:18am

On Mon, Mar 31, 2008 at 9:03 PM, Tobias Rosenberger <
tobiasrosenberger@hotmail.com> wrote:

>
> same topic / question:
>
> i have a rendercontext with different stuff inside (models, videoplanes,
> gridshapes, text) and have constantly to blend beetween them.
> there is one gridshape (single sphere) i want at certain times to leave
> trails, but whatever i try the textobject (and only the textobject) also
> leaves trails (or is not visible at all).
> i tried a lot with different attributes, searched the forum, but somehow i
> can’t find the solution.
> I just seperated here the rendersettings, two gridshapes (one with trails
> and one without, as expected) and the textobject, maybe sb. can have a short
> look and help?
>
>
I think something went wrong with posting your patch. There is no window or
qmetro, and if I do connect them I don’t see anything because of the camera
settings. I guess there’s other stuff missing as well.

Thijs

#125866
Apr 2, 2008 at 1:15pm

On Tue, Apr 1, 2008 at 9:35 PM, Tobias Rosenberger <
tobiasrosenberger@hotmail.com> wrote:

> hi, here is everything cleaned and only the relevant parts. it is zipped
> because there are some loadbanged matrix-files inside…
>
>
Yeah its not that simple. Your patch makes perfect sense. If you are not
clearing the previous frame, anything that moves in between frames will
leave traces behind. It is a nice effect if you discover it for the first
time, but its pretty useless on its own like that.

If you want to apply this technique only to certain objects in your scene,
you need to render them to a texture and display the texture on a
jit.gl.videoplane with @transform_reset 2 or something similar.

The erase color trick can be done with a simple shader. Wes recently posted
an example in the “render erase color” thread. Have a look at that.

Thijs

#125868

You must be logged in to reply to this topic.