Automated Presentation of directory src/tutorials/OGLT/Examples/Video/src/

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


The Envmap program has been compiled and tested on the following High and Maximum Impact systems
(and it is always preferable to run it on systems with 4 TRAMS):
-- IRIX 5.3 All Indigo² IMPACT with patch 1105
-- IRIX 6.2
It is expected to compile and run on the following systems but has NOT BEEN TESTED:
-- Infinite Reality
-- Reality Engine (5.3 with OpenGL Extensions Patch 918 (successor to 154))

The Envmap binary included on v6.1 of the Developer Toolbox was
generated on an IRIX 6.2 Indigo² Impact system.

In order to recompile you must install the GLUT 3.0 software,
included on this v6.1 Toolbox, onto your own system.
The inst images or tardist file can be found in

toolbox/src/exampleCode/opengl/GLUT/inst


README file from "src" directory

/*
    Author : Patrick Bouchaud
             galaad@neu.sgi.com
*/


PURPOSE:
========


    To fully understand the shape of metallic structures, designers need to
take into account the reflections from the surrounding environment.
    In the AEC market, where oil platforms are designed, this type of
visualization often prevents very costly mistakes.
This is the reason why CadCentre (Cambridge, UK) asked the Core Technology
Group of Silicon Graphics (Cortaillod, Switzerland), to integrate the latest
techniques of "Texture Mapping" into their application Review - PDMS.

    Chosen from among the projects undertaken by this partnership, an optimised
version of the "Environment Mapping" technique is presented here.
    This technique is based principally on the calculation of a 360 degrees
Environment Map, taken from the centre of the object : for each point on the
surface of this object, the appropriate reflected color is computed using this
map as a lookup table for the surface normal at this point.

    The Environment Map needs to be updated any time a modification of the
environment occurs; this data processing involves non-trivial mathematics.
When using a video source to integrate all or part of an existing environment,
it is thus necessary to recalculate the Environment Map for each frame. 



AUTHORS's ticks :
================

    I use 4-space tabulations (sorry for the printing)

    My Makefile first creates a .ofiles directory, where all the .o files go,
and where the actual executable $(TARGET).EXE is generated.
A $(TARGET) link is then created from the current directory to the executable.

    This Makefile currently generates a fake core file without any write
permission. This is to avoid generating a core file which would be over 50Mb,
should you run this program on a non IRIX-6.2 IMPACT system.

Libraries :
===========

    These Examples use P.Haeberli's libimage.a, and M.Kilgard's libglut.a.
    I assume these files are located under /usr/lib, and the image.h header
can be found under /usr/include/gl, whereas the glut.h file should be under
/usr/include/GL.



COMPILER's DIRECTIVES:
======================

-DINTERPOL: bilinear interpolation of the face's data, for each envmap's pixel
-DSAVEIMG : saves the initial 6 views
            into the {front,back,left,right,bottom,top}.rgba image files

OPENGL EXTENSIONS:
==================


CODE ARCHITECTURE :
===================


	Six 90 degrees fov views are generated of the SGI-logo, corresponding to
the 6 faces of the surrounding environment cube : these views are read back
into the corresponding image array.

	Then, for each frame, the logo is drawn as viewed from its centre, and
rotated accordingly to the middlemouse user-motions.
	The rotation is also taken into account to regenerate the environment map
out of the previously saved 6 views.

	In a virtual set environment - or on an exhibition booth - it is often the
case that most of the surrounding environment "faces" don't change, except for
the front one (for example) which is life-recorded by a video-camera.

	In a AEC-CAD application, we may only want to change our viewpoint,
which correspond in fact to a rotation of the environment relatively to the
object, as far as environment mapping is concerned.

	This algorithm (genenvmap.c) enables real-time re-computation of the
environment map in such case.


***************************** NOTA *****************************************

    At this stage, we just draw the environment map, in the middle of the
view.  In a real application, we would load it into the Texture memory and use
it as a GL_SPHERE_MAP on any object located inside of this environment.

    This "sphere-map" is a 360 degrees view of the surrounding environment :
the rendering of a sphere would only let you see a 180 degrees view !

*******************************************************************************


Files of interest from "src/tutorials/OGLT/Examples/Video/src" directory

Source

Documentation

Reference


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire src directory.

Copyright © 1996, Silicon Graphics, Inc.