PDA

View Full Version : building a maze


GoldenSun
06-02-2008, 04:46 PM
Hi,

I'm building a maze. I'm using an existing wall 3d modal and duplicated it for each walls. These walls are put together into a specific maze design by using translate, rotate and scaling. As I try to add more ojects and animation/interactions into the maze the program crashes.

Does anyone know why? are there limits on the object file sizes placed in the virtual world? Also, is there a better way to build the maze within Vizard that's more efficient and accurate?

Thanks for the help.

farshizzo
06-02-2008, 08:14 PM
How man objects are we talking about here? Vizard does not limit the number of objects you can add. You are only limited by the amount of memory your computer has. Unless you are adding thousands of objects with lots of polygons/textures I don't think memory will be an issue. Can you post a sample script that causes the crash?

Also, do you load the wall object from file each time, or do you load it once and clone it? Cloning objects is the most efficient way to deal with multiples of the same object.

GoldenSun
06-04-2008, 10:05 AM
Thanks for the suggestion.

I used the clones for all 30 wall pieces as you suggested and I believe it helped alot. I also try to add about 15 more small 3d objects and/or images inside. I found out that when I select the tracking option from the prompt to use the intersense it sometimes crashes before everything starts. Has anyone else experienced it?

the follwing is sample code for a wall and a pic. What is the best way to set each wall pieces in accurate position with one another?

wall = viz.add('box.WRL')
wall.translate(-2.000, 1.500, +0.450)
wall.setScale(4.600, 3.000, 0.100)
wall.texture( walltexture )
-------------------------
pic1 = viz.add(viz.TEXQUAD)
pic1.translate(-0.1, 0, 2.2)
pic1.setEuler(90, 0.0, 0.0)
pic1.scale(0.3, 0.5, 0.4)
pictexture = viz.addTexture( 'logo_fl.jpg' )
pic1.texture(pictexture)

farshizzo
06-04-2008, 10:27 AM
Yes, we've experienced this crash quite often. If you tell Intersense to automatically detect a device, sometimes they connect to the wrong device and it causes a crash. The solution is to specify the intersense port by using the PORT_INTERSENSE variable. See the documentation for more details.

I don't understand what you mean by setting the pieces in accurate position. The pieces will be placed where you tell them to be placed with the translate command.