Forums > Jitter

gridshape Vs .obj

February 25, 2006 | 2:03 pm

hi all

here’s a quick question…

part of my ridiculous new installation involves the graphic 3D representation of a bacterial colony following instructions from an AI system running on another machine. for reasons of practicality i have limited the colony to 20 members (though if possible i will add a few more). each one is represented by an instance of jit.gl.gridshape with a jpg texture and individual positioning data. all this code is pretty efficient – at least i assume it is because i borrowed most of the thinking from the towers of hanoi patch from the jitter examples. it was a great help.

the computer (a dual 1.25 G4) will be running this openGL patch alongside 6 audio processing subpatches and 1 subpatch sedning serial data. so my question is this; would it be more efficient to keep my 3D patch as it is, or would loading multiple .obj files be better?

i’d be happy to post the patch if necessary.

best

andy_g


March 23, 2006 | 12:54 pm

its a lonely world when you have to reply to your own messages! ;)

anyway, i ran my patch in the end with 40 objects from 40 jit.gl.gridshape objects with updating, repositioning, rotating every 3 seconds and it ran fine (and looked pretty decent too).

i’m going to run some tests now to compare performance of this method compared to using an equivalent number of .obj files and jit.gl.model objects. however, i’d still be very interested to hear what experiences or preferences other users have regarding the gridshape or model issue.

best

andy_g


March 23, 2006 | 8:14 pm

On Mar 23, 2006, at 4:54 AM, andy g wrote:

> anyway, i ran my patch in the end with 40 objects from 40
> jit.gl.gridshape objects with updating, repositioning, rotating
> every 3 seconds and it ran fine (and looked pretty decent too).
>
> i’m going to run some tests now to compare performance of this
> method compared to using an equivalent number of .obj files and
> jit.gl.model objects. however, i’d still be very interested to hear
> what experiences or preferences other users have regarding the
> gridshape or model issue.

Three suggestions for users looking for more performance in such a
scenario:

1. if you turn on jit.gl.gridshape’s displaylist attribute, the
triangle rendering will be faster. (would recommend using a single
jit.gl.gridshape object with @automatic 0 as demonstrated in the
jit.gl.gridshape-skittles example)

2. if you manage your own OpenGL state with jit.gl.sketch, drawing
the objects with "drawobject 1" (i.e. overriding object
attributes), you have the ability to avoid setting some additional
opengl state for every object

3. if you send the message ;jitter glerrorcheck 0, you can increase
the performance of patches which are rendering several objects or one
object several times.

-Joshua


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