updated docs

This commit is contained in:
Paolo Cignoni 2004-09-09 23:15:35 +00:00
parent 542670453b
commit 817f053d03
1 changed files with 74 additions and 18 deletions

View File

@ -1,31 +1,87 @@
VCGLib http://vcg.sf.net o o
Visual and Computer Graphics Library o o
_ O _
Copyright(C) 2004 \/)\/
Visual Computing Lab http://vcg.isti.cnr.it /\/|
ISTI - Italian National Research Council |
\
Metro, All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
for more details.
--- Synopsis ---
'shadevis' is a tool designed to compute a per vertex, ambient occlusion term
Please, when using this tool cite the following reference:
For any question about this software please contact:
Paolo Cignoni ( p.cignoni@isti.cnr.it )
This value is mapped into a gray shade according to this formula
v=clamp(v,LowPass,HighPass)
v=(v-LowPass)/(HighPass-LowPass)
graylevel=GammaCorrection(v,GammaLev)
v=(v-LowPass)/(HighPass-LowPass) /// Normalized 0..1
graylevel=GammaCorrection(v,GammaLev)
This graylevel is used in the Opengl lighting equation as follow.
Let assume that there is just a single directional light and no emissive and no specular component in the material, the gl lighting equation is:
C = Acm *Acs + Acm*Acli + (n*L)*Dcm*Dcli
where
Acm is the ambient color of the material (glMaterial or glColor if glColorMaterial is enabled)
Acs is ambient color of the scene (glLightModel)
Acli is the ambient intensity of the light (glLight)
We simply substitute the constant ambient that is usually constant, with a per vertex color, using a constant diffuse color.
Simple one line tutorial:
-- load a ply mesh, press 'enter', wait, press keys from 1 to 4.
Some useful hints:
keys
'c' compute the sampling (sample are added so pressing c twice is the same of using 2n sampling directions)
'S' save a ply with the currently computed color.
's' smooth (average) the computed visibility
Keys
'esc' quit
'enter' compute the sampling (sample are added so pressing the key twice is the same of using 2n sampling directions)
' ' add the current view to the sampling direction
'S' save a ply with the currently computed color.
's' smooth (average) the computed visibility among adjacent vertices
'v' toggle the rendering of directions used for the sampling.
'V' Save a Snapshot of the current View.
'l' Increase LowPass
'L' Decrease LowPass
'h' Increase HighPass
'H' Decrease HighPass
'g' Increase GammaLev
'G' Decrease GammaLev
'tab' switch between object trackball light trackball
'a' Toggle Lighting
'A' Toggle per vertex coloring
'l'-'L' Increase/Decrease LowPass
'h'-'H' Increase/Decrease HighPass
'p'-'p' Increase/Decrease GammaLev
'C' Toggle Lighting
'c' Toggle per vertex coloring
'a'-'A' Increase/Decrease Ambient Coefficient
'd'-'D' Increase/Decrease Diffuse Coefficient
'e'-'E' Increase/Decrease Balance between Diffuse and Ambient coefficient
'1'..'4' Some preset ambient/diffuse values ranging from standard constant ambient to a
options
-n <number> set the number of sampling direction (default 32, but 100~1000 should be better)
-n <number> set the number of sampling direction (default 64, but 100~500 should be better)
-f flip normal of the surface
-z <float> specify the z tolerance used to decide if a vertex is visible against the zbuffer or not (default 1e-4, useful range 1e-3 .. 1e-6)
-z <float> specify the z tolerance used to decide if a vertex is visible against the zbuffer or not (default 1e-3, useful range 1e-3 .. 1e-6)