PDA

View Full Version : Loading objects faster


kovitch
01-11-2011, 08:39 AM
Hello,

I'm using the following code to load some objects:

for i in range(0,tables_number):
tables.append(viz.add('src/obj/table.flt'))

However, it takes too long to load 50 tables (about 30 seconds).

Is there any trick to accomplish this task faster?

Regards.

Jeff
01-11-2011, 11:12 AM
You could add the table once and then make copies or clones of it. Check out the section on Duplicating, Copying, and Cloning on the following page:

http://www.worldviz.com/vizhelp/Adding_3D_objects_to_your_world.htm

Veleno
01-11-2011, 03:46 PM
Ideally, you should bring the object into 3ds Max, and re-export as an .IVE (OpenSceneGraph), Vizard's native format.

farshizzo
01-11-2011, 04:40 PM
If your script does not require a unique instance for each table, then you can clone all the tables.for i in range(tables_number):
tables.append(viz.add('src/obj/table.flt',cache=viz.CACHE_CLONE))