🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.graphics.avs
Article #282

Re: Large Number of Objects

#282
From: James Peters
Date: Tue, 26 Jan 1993 14:47
43 lines
2859 bytes
larry novak posted:
>We are running AVS on a Convex. We have an application in which we want
>to be able to pick any of a large number (80,000) of objects. When we
>try to define a geometry with 80,000 named objects, AVS begins to
>gobble memory and runs out of memory long before it completes the
>definition of the geometry. Using the same geometry without naming the
>objects is no problem.  Is this unique to the Convex implementation or
>is it an AVS issue? Is there any workaround?


hello larry,

this is a generic avs problem. the OBJ layer stores objects in a linked 
list, and each object has a large memory and access overhead associated
with it, reference /usr/avs/include/obj.h.  

think about the performance of a linked list data structure being traversed
on both sides of the geometry pipeline when the list gets on the order of 80k
nodes. also of note is that avs does not keep an end pointer so to add each
new node, object, the entire list has to be traversed to reach the end. 
this is why atom (i.e. sphere) picking is non trivial with avs not just
convexavs.

the workaround is to put all of the spheres into single object, minimizing
the object storage overhead, and use the GEOM functions for setting upstream
pick correlations via GEOMedit_selection_mode and GEOMadd_*_{prim,vertex}-
_data. reference chapter 10 Geometries page 328 and chapter 11 Geometry
routines pages 351, 352 and 374.

you then have to write a pick handler which gets the vertex id and correlates
this with a particular sphere. if you want to change color or remove the 
sphere, you have to regenerate the object with all the spheres as before, 
with the desired changes to the particular picked one. if you want to move
the picked sphere then you need to delete the previous object, regenerate 
all the previous spheres minus the picked one, and then create a new object
with just that picked sphere.  this can be applied to any type of geometry,
not just spheres.  

if you have any more questions free to send some email.

take care,
james, peters@convex.com
Technical Details
Message-ID: <1993Jan26.144730.20046@convex.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!usenet.coe.montana.edu!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!convex!peters

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!usenet.coe.montana.edu!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!convex!peters
From: peters@convex.com (James Peters)
Newsgroups: comp.graphics.avs
Subject: Re: Large Number of Objects
Keywords: avs convexavs geom objects large
Message-ID: <1993Jan26.144730.20046@convex.com>
Date: 26 Jan 93 14:47:30 GMT
Article-I.D.: convex.1993Jan26.144730.20046
Sender: usenet@convex.com (news access account)
Organization: CONVEX Computer Corporation, Richardson, Tx., USA
Lines: 43
Nntp-Posting-Host: mikey.convex.com
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.