WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Maximum Number of Avatars? (https://forum.worldviz.com/showthread.php?t=2023)

EnvisMJ 05-11-2009 11:21 AM

Maximum Number of Avatars?
 
I'm doing some research into some upcoming projects, and trying to answer some questions...such as:
1. What is the maximum number of avatars that Vizard can support?

2. If there isn't a limit in the software, what level of hardware capability would be needed to run 100 avatars?

3. What problems might we expect to encounter at this level?

4. What could we do to streamline or reduce the impact of this many avatars?

5. How complex of behaviors could we achieve without causing a large amount of lag?

Gladsomebeast 05-11-2009 01:19 PM

The CPU limiting factor with avatars is recomputing their mesh for each frame of animation. So to reduce this load:
>Use lower polygon avatars.
>Decrease the number of times the avatar's animation is recomputed with the avatar.updaterate() function.

Its best to use these two options on avatars that are further from the viewer.

You could also set avatar's updaterate to 0 when they are out of view. The viz.MainWindow.isCulled(avatar) returns True if the avater is out of view.

Don't know what it takes to get 100 animating avatars, but upgrading the CPU should improve performance.

EnvisMJ 05-12-2009 09:05 AM

Thanks, that should be pretty helpful.

-MJ

Gladsomebeast 05-12-2009 12:04 PM

Dance party test
 
Here is an avatar stress test script. Sliders control the number of avatars and the update rate.

Code:

import viz
import vizact
viz.go()

MAX_AVATARS = 100
START_COUNT = 10

viz.MainView.setPosition([0, 1.5, -5])
viz.window.framerate(viz.NICE)

#dance beat
music = viz.add('carousel.wav',volume=0.15,loop=1)
music.play()

avatars = []
updateRate = 0
def addAvatar():
        a = viz.add('vcc_female.cfg')
        a.state(5)
        a.setPosition([.5*len(avatars), 0, 0])
        a.updaterate(updateRate)
        avatars.append(a)

for i in range(START_COUNT):
        addAvatar()
       
def removeAvatar():
        avatars.pop().remove()
       
       
import vizinfo
info = vizinfo.add('')
avatarSlider = info.add(viz.SLIDER, 'avatar count  '+str(START_COUNT))
updateRateSlider = info.add(viz.SLIDER, 'update rate 0  ')

def onAvatarSlider(pos):
        targetCount = int(pos * MAX_AVATARS)
        avatarSlider.label.message('avatar count: ' + str(targetCount))
        countDiff = targetCount - len(avatars)
        if countDiff > 0:
                #add avatars
                for i in range(countDiff):
                        addAvatar()
        else:
                #subtract avatars
                for i in range(-countDiff):
                        removeAvatar()
       
vizact.onslider(avatarSlider, onAvatarSlider)


def setUpdateRate(rate):
        global updateRate
        updateRate = rate * .2
        updateRateSlider.label.message('update rate' + str(round(updateRate, 3)))
        for a in avatars:
                a.updaterate(updateRate)
vizact.onslider(updateRateSlider, setUpdateRate)



All times are GMT -7. The time now is 03:08 PM.

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