XML Feeds

.

[jitter] Re: Re: Smoothing with sketch and gl_commands

David Buff david.buff at free.fr
Sun Mar 23 14:08:12 MDT 2008


Thanks all for your help !

May be our question need some more details.

What we are building is a big patch for performing art with 4 video projector witch are rebuilding a 3D world on stage (with actors, sensors...). All 4 images have to be synchronized with the same 3D univers looking at different camera angles.

The 3D univers we draw is made with several objects witch need each a different texture. It's not possible to use a gl.model, because we need for example to define a different position to each object.

We thaught it will be a good idea to do this with a gl.sketch using a gl_command like:

reset, glbindtexture txtA, drawmatrix objA, glbindtexture txtB, drawmatrix objB, glbindtexture txtC, drawmatrix objC, etc...

To get the matrix, we use a small patch witch load an object.obj with a gl.model (containing all the objects), and then output all the different matrices using drawgroup 1, then 2, then 3 etc... All this matrices are stored in a different jit.matrix witch is called by the gl.sketch.

Because we need 4 render spaces, we can change the state or coordinates of a single matrix, and get automaticaly the changes in all render (on all video projectors).

So we have got a single matrix by object, and a single render and a single sketch by video output.

It works well... but the only problem is now to smooth the objects...

----------

I try to use the phong shader. The window look like different with the shader enabled or disabled. But the smooth is not good.

I put a jit.op @op pass pass pass pass pass * * * between the matrixoutput of the gl.model and the jit.matrix storing the object. If I change the multiplicator of normal vector, the image result doesn't change... so it seems that gl.sketch doesn't care of normal vectors...

I mean there is a gl_command witch ask the gl.sketch to considere the normal vectors, and also one to smooth theym... but I don't know witch one.

David


More information about the jitter mailing list