OGL in inventor to avoid data replication

OGL in inventor to avoid data replication

Post by Michele Fiorentin » Fri, 25 Jan 2002 21:26:50



Hi to everybody,

I have a modeller that provides and stores the tassellated points of the
geometries in his propretary data structures( I can access to that).
Shipped with it a OGL render.  I am using Open Inventor TGS 2.6
for providing user interface. At the moment i retreive the data from the
modeller and load the points in a SoTrianglestripset (actually
duplicating the data).
It works, but I think that its quite slow and its also difficult to
manage the
constency between the two rapresentations.

I am thinking to write  a node that renders all the geometry  in the
modeller, using the provided OGL code.

1) its possible to render all directly with OGL?How?
2) How it will interfere with my Open inventor graph?
3) Is that a possible solution for increase the  performance ?
4) If i attach this node in my SG, it will get the former
transformations of inventor?
5) What about the cashing?
6) Has someone a better solution?

thanks !

P.S.: sorry for the long text.    as  someone says in this  newsgroup...
the time runs!

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

OGL in inventor to avoid data replication

Post by Michael Hec » Sat, 26 Jan 2002 05:02:31



Quote:> I have a modeller that provides and stores the tassellated points of the
> geometries in his propretary data structures( I can access to that).
> Shipped with it a OGL render.  I am using Open Inventor TGS 2.6
> for providing user interface. At the moment i retreive the data from the
> modeller and load the points in a SoTrianglestripset (actually
> duplicating the data).

You can avoid the duplication of data using setValuesPointer
instead of setValues (requires Open Inventor 3.0 or better).

Quote:> It works, but I think that its quite slow and its also difficult to
> manage the constency between the two rapresentations.

Is it slow to re-order the data or slow to render?  These are
separate issues.  Usually the re-order (import) operation
occurs very few times compared to rendering, and so is less
important.  Managing the consistency can be inconvenient.

Quote:> I am thinking to write  a node that renders all the geometry  in the
> modeller, using the provided OGL code.

> 1) its possible to render all directly with OGL?How?
> 2) How it will interfere with my Open inventor graph?
> 3) Is that a possible solution for increase the  performance ?
> 4) If i attach this node in my SG, it will get the former
> transformations of inventor?
> 5) What about the cashing?
> 6) Has someone a better solution?

This is certainly possible.  It may not render faster, but
that is also possible in some cases.  The most important
thing is to avoid making the OpenGL state inconsistent with
what Open Inventor thinks is the OpenGL state.  You can do
that "brute force" in many cases using glPush/PopAttrib.
You can also do it a little more elegantly by setting the
values of the corresponding Open Inventor "elements".  In
general your node will be subject to the current transform
and to render caching, even if it is simply an SoCallback.
The best solution is to implement a custom shape node (see
Chapter 2 of The Inventor Toolmaker) and/or the open source
Inventor code for examples.  Doing this allows your node to
get the current material, allows picking to work, etc.

-Mike
 TGS Inc, http://www.tgs.com

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

1. Inventor technical FAQ + reading in data -> Inventor

First of all, I'd like to thank everyone that has offered me assistance
with regards to the camera angle/position question I had earlier. I
finally was able to get that to work...

On another note, is there a technical FAQ for Inventor available? I'm
trying to figure out how to read in x,y,z coordinate information from a
text file and have the data from the text file update an object's
position in my scene graph.

I've made quite a bit of progress in other areas of my Inventor program,
up to this point. Also, I have Specular's Infini-D for the Power Mac. Is
it possible to import these files into a format that Inventor can read?
If so, how is this done?

Krishna

2. JPEG machine-independent optimization questions for IJG 6a/6b

3. Inventor -- how to avoid unneccesary redraws?

4. 2D Animator's Opinions Needed

5. How will support Data Integrity to avoid Concurrency??

6. DirectX retained mode

7. Texture mapping in Inventor and OGL

8. New Home Page

9. Use *.DXF data in OGL

10. Imagine 2.0 replication wont work

11. pixel replication

12. SGI OGL VS MS OGL

13. Data-conversion Inventor <-> Performer