WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   viz.collision enabled lag (https://forum.worldviz.com/showthread.php?t=4195)

Gekitatsu 04-10-2012 01:10 PM

viz.collision enabled lag
 
Setup

-City enviorment (Buildings/tress/cars/etc)(As 1.ive file)
-Mainview placed at a location in the city.

Goal

Move the camera around the city without being able to move through any objects in the city.

Problem

When I add viz.collision(viz.On) to enable collision for MainView my framerate drops to 22 from 60. Anybody have any idea how to bring my framerate back up to 60 with a collision enabled mainview?


-Note The mainview is not linked to any objects.

Jeff 04-11-2012 07:00 AM

Having a dense mesh can slow things down to a crawl if you try to do collisions with it. Instead it's common to build a much lighter collision mesh (eg, 10k polygons) for collisions. Hide the visibility of the collision mesh and disable collisions on the dense visible mesh.

farshizzo 04-11-2012 09:20 AM

Along with using a lower poly mesh for collision tests, you can also use the viz.OPTIMIZE_INTERSECT_HINT flag to speed up collision tests with a particular mesh:
Code:

model.hint(viz.OPTIMIZE_INTERSECT_HINT)


All times are GMT -7. The time now is 01:28 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC