Re: Scenes with lots of simple objects

Scott Nelson (snelson@canopus.llnl.gov)
Tue, 7 Mar 1995 11:30:08 -0800


>
>Even if given hints, what would a viewer do with those hints? I don't know
>how to write a general viewer that can render 50*50*50 cubes quickly.
>
Actually you do... only draw the cubes that are visible. You only
need to recalc visible cubes when the user turns materials/objects
on or off. In a 50*50*50 block, only about 14400 cubes are actually
visible (a 9X reduction). You can't see the ones on the inside so don't
put them in the OpenGL display list. You do want to keep them in
the database since someone may want to turn some of the outer materials
"off". Then just update the OpenGL display list with the new set
of visible objects.

I guess that's the kind of hint that I was thinking about. If none
of the objects are transparent, then putting one object inside of
another effectively hides one of the objects (unless you introduce
cutting planes, etc). If the goal is not to slice and dice the
model (just look at it, spin it around, move around it, translate it,
turn materials on/off, etc), then this "hint" should be OK???

Also, I *am* using 50*50*50 "Separator { Transform { } Cube { } }" since
the MultipleCopy or Array nodes are not in the spec. Maybe this is
a motivation to put them into the spec?

>I think it makes more sense to define new kinds of shapes that know how to
>render large numbers of simple primitives, and that know how to optimize the
>rendering. For example, a CubeSet could store the cubes in a spacial data
>structure, figure out where the eyepoint is relative to the cubes, draw them
>back to front, and (if it was really smart) avoid drawing invisible cubes.
>
>The current thinking in InventorLand is to do something like:
>
>PrimitiveProperty {
> MFVec3f translation
> MFRotation rotation
> MFLong scaleFactor
> MFColor color
> SFEnum materialBinding
>}
>CubeSet { } # Or SphereSet{} / ConeSet{} / CylinderSet{}
>
>... but nothing has been implemented and it will take an implementation to
>find out if this will work (for example, we think Indexed versions will be
>necessary to concisely represent molecular models).

I agree. I've been grappling with this problem for awhile. If VRML could
handle both types ([1]large collection of simple objects, [2] small collection
of complex objects) then this would be great!

In the "mesh" community, there are just a handful of (first order)
fundamental types that people make 3D meshes out of:
cubes
arb. hexahedrons
wedges [triangular prisms]
pyramids
tetrahedra

Thanks for your feedback.

Scott Nelson

-- 

+----------------------------------------------------+ |Scott D. Nelson B131 Rm2074 3-1250 | |Lawrence Livermore National Laboratory | |7000 East Ave., L-153 Livermore CA 94550 | |email: nelson18@llnl.gov http://www-dsed.llnl.gov/ | +----------------------------------------------------+