Re: Performer internals

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Tue, 27 Oct 1998 13:33:04 -0800


P J Narayanan wrote:
>
> Hi,
>
> I need to really get to some of the internal representations of Performer
> for an application. Some of the requirements are:
>
> (1) Can the database be accessed (stored to a file/converted etc)
> after the culling operation from a particular viewpoint?
> The objects or primitives that are culled away should be
> removed and the rest should stay. Is that possible?
>

No, you could use cull callbacks on each node to get the cull result or
even write your own cull function. You can also easily traverse the
scene
graph and cull using Performers routines which are all exposed. This
sounds closer to what you need given your desire to modify the scene
graph and write it to disk.

> (2) How can we access the individual primitives (say triangles) of a
> scene database? Is there a way one can access them in a systematic
> way? (Say, all trianges of obj1 followed by those of obj2,
> getting info about triangle meshes etc)
>

Yes, you just traverse the scene graph, it's all there in the geosets.

> (3) Given a world point, is there a function that maps it to the
> image point? (ie, projection, z-buffering, viewporting etc
> all included) Alternatively, given a list of triangles, can
> we find where the vertices map to?
>

This would be the transformation of a point through modelling and
projection
matrices, it could be done, but I expect it'd be kind of longhand using
the
performer matrix math library, not too difficult though. You may preffer
to
use the gl feedback or the glu routines for this.

> I will appreciate any answers to the above questions and/or pointers to
> deeper discussion on these issues.

Performer is an API, so it doesn't suffer from the limitations an
application might. Because of this it provides the functions you
need to create the features you've asked for, but it doesn't exactly
give you items 1 & 3. None of this stuff requires access to performer
internals. You seem to be labouring under some slight misunderstanding
about the nature of Performer. It isn't a black box, all the data used
to describe the world is owned by the programmers application. Even if
you use a 3rd party loader to create that data, for example the
OpenFlight loader, you still own it and can access & modify every
aspect of the description. In addition many of the functions/methods
to process that data are exposed. It's a very open design.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Oct 27 1998 - 13:33:10 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.