Forums > Jitter

opengl – loading mulitple instances of one object in the same window

Feb 27 2006 | 2:44 pm


is it possible to load multiple instances of the same lightwave.obj in one/the same renderwindow?

lets say i have a model of a tree – tree.obj:
everytime an event (bang) happend the number of trees in renderwindow should inrease for 1+… it would be also great if i would have acces to the coordinates of each individual tree…

i tried the thing but here i can only take access to the goup ids…

it would work if i make different names on the object
for expamle: name1, name2, name3… etc… but it would be a mess if i would have up to 30 instances…

hope you understand what i mean…
many thanks

Feb 27 2006 | 6:06 pm


i workaround/ignore this isue…

i made an predefined object with 40 trees in it (trees.obj)
the coords of each single object i will write in an coll-file…

so now a have to goging on, maybe you can help me…

if a bang is detected (about 1/minute) the camera should move to the coords of tree nr.1 and should circle/rotate around this single object in focus (lookat)… if the next bang is detected the camera should stop rotating and should move to the coords from tree nr2 and rotate around this one at next bang cam should
move to coords from tree nr3 and rotate around this… etc. etc.

i have two different camera movements: rotation mode and move to object mode…

i play arounf with jasch objects but have not so satisfying results sofar…

any hints or suggestions for this… i’m so stupid :-|

Feb 27 2006 | 6:23 pm

In response to your original post, you can create multtiple instances
of the same object very easily by setting the attribute
@automatic 0 and calling draw multiple times with different scale and
position parameters. There as a javascript-dev thread about how to
manage this not too long ago.


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

Forums > Jitter