3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: suggestion on object array variable  (Read 996 times)

« on: September 27, 2009, 03:15:16 PM »
for some things it would be cool to have a 2 dimension array variable for objects (for example target systems or environment controll.)

at the moment I'm trying to write a script that hides some 3d imposter's if i am far away and shows instead billposts ( for better performance). I got a skinmesh for a area of imposter's and want to controll all imposter's simultaneous at this area.

while creating the imposter's i could create a array and assign each imposter to its position and later use this in a other script.

shure, i can just add all creation positions to the other script and make a loop that indicates what imposter is in each area but it would be better to make this at once at start.

is there propably a way to assign a pointer to the array like in c++?

here is a picture of what i mean:
« Reply #1 on: September 28, 2009, 02:27:47 PM »
thanks for the answer  :)

i think i did it now nearly how you explained it. Unluckily i didn't made a skinmesh in each square to create imposter's, i created all imposter's from one source. again something that i can improve the next time ^^ .

Its really a big performance improvement if all imposter's far away (and all that aren't in the camera view) are hidden.

I also created now bigger skinmeshes for the grass object and it is a lot faster with the same visual effect and same amount of polygons.
Now i wonder where the "magic point" is and the performens doesn't improve anymore.

I think with the small grass skinmeshes i had around 800 imposter's (3200 polygons )and a very poor framerate.
with the new i got 200 imposter's (4800 polygons) and the framerate is excellent even with 2 big trees with around 3000-4000 polygons.

« Reply #2 on: September 28, 2009, 03:02:03 PM »
Try playing around with this or improve it.. it's suppose to render vegetation dynamicly around player, and only reuse those not in the rendering window.
« Reply #3 on: September 28, 2009, 03:21:50 PM »
shadmar you script has some errors try checking it. ;)
« Reply #4 on: September 29, 2009, 09:57:29 AM »
shadmar you script has some errors try checking it. ;)

Wierd, it works on my end.... are you using 6.38 ?
Pages: [1]