Changeset 65


Ignore:
Timestamp:
Dec 15, 2004, 11:51:37 PM (20 years ago)
Author:
darran
Message:
 
Location:
Swollen
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • Swollen/doc/contract2_hours.txt

    r62 r65  
    44
    55
     615 December, Wednesday (4 hours)
     7- changed Visual Studio solution to compile new GDAL code
     8- work on understanding lack of bedslope lighting
    69
    7 15 December, Tuesday (4 hours)
     1014 December, Tuesday (4 hours)
    811- added -texture <filename> option for bedslope image
    912- other code cleanups related to handling georeferenced data
    1013- small amount of work on background thread for data read
    1114
    12 14 December, Monday (6 hours)
     1515 December, Monday (6 hours)
    1316- visit to GA, swollen now compiling on-site under Windows/Visual Studio .NET
    1417- added command line params for tweaking transparency (see "swollen -help")
  • Swollen/doc/contract2_priorities.txt

    r62 r65  
    4949- cairns dataset reveals popping triangles (zbuffer?)
    5050- steepcull dataset reveals steep angle cull problem
    51 - dragging sww onto swollen (all in one directory) does not produce the same results as calling from command line
    52 - Problems with Duncan's, Chris' and Stephen Roberts' machines at GA: Swollen won't render semi transparency.
    53   Swwviewer works fine. (This appeared to work on Dunca's computer 13/12/4?).
     51- dragging sww onto swollen (all in one directory) does not produce the same results as
     52  calling from command line
     53- Problems with Duncan's, Chris' and Stephen Roberts' machines at GA: Swollen won't render semi
     54  transparency. Swwviewer works fine. (This appeared to work on Dunca's computer 13/12/4?).
    5455- toggle wireframe not working on Mac
    5556
     
    5758BUGS FIXED:
    5859
     60- can no longer make model disappear by pushing back through sky [2004-12-15]
    5961- Swollen starts up showing first time step, not zeroth (even though clock shows zero). Stepping one
    6062  forward and one back, bring things into sync. [2004-12-01]
  • Swollen/swollen/bedslope.cpp

    r64 r65  
    4747    texture->setImage( _sww->getBedslopeTexture() );
    4848
     49    // material
     50    _material = new osg::Material();
     51    _material->setAmbient( osg::Material::FRONT_AND_BACK, osg::Vec4(0.2, 0.2, 0.2, 1.0) );
     52    _material->setDiffuse( osg::Material::FRONT_AND_BACK, osg::Vec4(1.0, 1.0, 1.0, 1.0) );
     53    _material->setSpecular( osg::Material::FRONT_AND_BACK, osg::Vec4(0.8, 0.8, 0.8, 1.0) );
     54    _material->setEmission( osg::Material::FRONT_AND_BACK, osg::Vec4(0.0, 0.0, 0.0, 1.0) );
     55
     56
    4957    // state
    5058    _stateset = new osg::StateSet;
    51     //_stateset->setTextureAttributeAndModes( 0, texture, osg::StateAttribute::ON );
     59    _stateset->setTextureAttributeAndModes( 0, texture, osg::StateAttribute::ON );
     60    _stateset->setAttributeAndModes(_material, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
    5261    _stateset->setMode( GL_BLEND, osg::StateAttribute::ON );
    5362    _stateset->setMode( GL_LIGHTING, osg::StateAttribute::ON );
  • Swollen/swollen/bedslope.h

    r45 r65  
    1616#include <SWWReader.h>
    1717#include <osg/Geode>
     18#include <osg/Material>
    1819#include <osg/StateAttribute>
    1920
     
    3536    osg::Geometry* _geom;
    3637    osg::StateSet* _stateset;
     38    osg::Material* _material;
    3739    virtual ~BedSlope(){;}
    3840
  • Swollen/swollen/createSky.cpp

    r63 r65  
    11
     2#include <osg/Depth>
    23#include <osg/Geode>
    34#include <osg/Geometry>
     
    5758    stateset->setTextureAttributeAndModes( 0, texture, osg::StateAttribute::ON );
    5859    stateset->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
     60
     61    // to prevent being able to push the model back through the sky, we
     62    // do two things (i) ensure sky is drawn first, and (ii) skip writing
     63    // to the depth buffer
     64    stateset->setRenderBinDetails( -1, "RenderBin" );
     65    osg::Depth* depth = new osg::Depth();
     66    depth->setWriteMask( false );
     67    stateset->setAttributeAndModes( depth, osg::StateAttribute::ON );
     68
    5969    geom->setStateSet( stateset );
    60     geom->setUseDisplayList(true);
    61 
    62 
     70    geom->setUseDisplayList( true );
    6371    geode->addDrawable(geom);
    6472
    6573    osg::Transform* transform = new MoveHorizonWithEyePointTransform;
    66     transform->setCullingActive(false);
    67     transform->addChild(geode);
     74    transform->setCullingActive( false );
     75    transform->addChild( geode );
    6876
    6977    return transform;
  • Swollen/swollen/customviewer.cpp

    r6 r65  
    5757   
    5858   
    59     if (!_updateVisitor) _updateVisitor = new osgUtil::UpdateVisitor;   
     59    if (!_updateVisitor) _updateVisitor = new osgUtil::UpdateVisitor;
    6060    _updateVisitor->setFrameStamp(_frameStamp.get());
    6161
  • Swollen/swollen/main.cpp

    r64 r65  
    125125    // Lighting
    126126    SpotLight* spotlight = new SpotLight(rootStateSet);
    127     spotlight->setPosition( osg::Vec3(2,0,2) );  // z is up
     127    spotlight->setPosition( osg::Vec3(1,0,1) );  // z is up
    128128    spotlight->setSpotAngle( 45.0 );
    129129
  • Swollen/swollen/spotlight.cpp

    r64 r65  
    77#define DEF_DEFAULT_ANGLE 45
    88#define DEF_DEFAULT_EXPONENT 10
    9 #define DEF_DEFAULT_CONE_RADIUS 0.05
    10 #define DEF_DEFAULT_CONE_HEIGHT 0.1
     9#define DEF_DEFAULT_CONE_RADIUS 0.125
     10#define DEF_DEFAULT_CONE_HEIGHT 0.25
    1111
    1212
     
    2323    _light->setAmbient(osg::Vec4(0.0,0.0,0.0,1));
    2424    _light->setDiffuse(osg::Vec4(1,1,1,1));
    25     _light->setSpecular(osg::Vec4(1,0,0,1));
     25    _light->setSpecular(osg::Vec4(1,1,1,1));
    2626    _light->setSpotCutoff(DEF_DEFAULT_ANGLE);
    2727    _light->setSpotExponent(DEF_DEFAULT_EXPONENT);
Note: See TracChangeset for help on using the changeset viewer.