delta3d
 Forum Index >  > Artists' Studio New Topic Post Reply
 Bumping with osgFx in a .osg file
Prev Topic Next Topic
   
mr d
 11/20/2008 01:01AM (Read 2043 times)  

Full Member

Status: offline
Forum User

Registered: 12/07/2005
Posts: 160
PHP Formatted Code

MatrixTransform {
  DataVariance STATIC
  name "Scene Root"
  nodeMask 0xff
  cullingActive TRUE
  StateSet {
    UniqueID StateSet_0
    DataVariance STATIC
    rendering_hint DEFAULT_BIN
    renderBinMode INHERIT
    GL_LIGHTING ON
  }
  referenceFrame RELATIVE
  Matrix {
    1 0 0 0
    0 1 0 0
    0 0 1 0
    0 0 0 1
  }
  num_children 1
  Group {
    DataVariance STATIC
    name "Plane01"
    nodeMask 0xff
    cullingActive TRUE
    num_children 1
    osgFX::BumpMapping {
      DataVariance DYNAMIC
      nodeMask 0xffffffff
      cullingActive TRUE
      num_children 1
      Geode {
        UniqueID Geode_1
        DataVariance STATIC
        nodeMask 0xff
        cullingActive TRUE
        num_drawables 1
        Geometry {
          DataVariance DYNAMIC
          StateSet {
            UniqueID StateSet_2
            DataVariance STATIC
            rendering_hint DEFAULT_BIN
            renderBinMode INHERIT
            GL_CULL_FACE ON
            GL_LIGHTING ON
            0xba1 ON
            Material {
              DataVariance STATIC
              ColorMode OFF
              ambientColor .4 .4 .4 1
              diffuseColor .9 .9 .9 1
              specularColor 1 1 1 1
              emissionColor 0 0 0 1
              shininess 2
            }
            textureUnit 0 {
              GL_TEXTURE_2D ON
              Texture2D {
                DataVariance STATIC
                file "images\Istone3_Normal.tga"
                wrap_s CLAMP_TO_EDGE
                wrap_t CLAMP_TO_EDGE
                wrap_r CLAMP_TO_EDGE
                min_filter LINEAR_MIPMAP_LINEAR
                mag_filter LINEAR
                maxAnisotropy 1
                borderColor 0 0 0 0
                borderWidth 0
                useHardwareMipMapGeneration TRUE
                unRefImageDataAfterApply FALSE
                internalFormatMode USE_S3TC_DXT1_COMPRESSION
                resizeNonPowerOfTwo TRUE
              }
            }
            textureUnit 1 {
              GL_TEXTURE_2D ON
              Texture2D {
                DataVariance STATIC
                file "images\Istone2.tga"
                wrap_s CLAMP_TO_EDGE
                wrap_t CLAMP_TO_EDGE
                wrap_r CLAMP_TO_EDGE
                min_filter LINEAR_MIPMAP_LINEAR
                mag_filter LINEAR
                maxAnisotropy 1
                borderColor 0 0 0 0
                borderWidth 0
                useHardwareMipMapGeneration TRUE
                unRefImageDataAfterApply FALSE
                internalFormatMode USE_S3TC_DXT1_COMPRESSION
                resizeNonPowerOfTwo TRUE
              }
            }
          }
          useDisplayList TRUE
          useVertexBufferObjects FALSE
          PrimitiveSets 1
          {
            DrawArrays TRIANGLE_STRIP 0 4
          }
          VertexArray Vec3Array 4
          {
            -62.2449 61.4996 0
            -62.2449 -64.3256 0
            65.1337 61.4996 0
            65.1337 -64.3256 0
          }
          NormalBinding PER_VERTEX
          NormalArray Vec3Array 4
          {
            0 0 1
            0 0 1
            0 0 1
            0 0 1
          }
          TexCoordArray 0 Vec2Array 4
          {
            0 1
            0 0
            1 1
            1 0
          }
          TexCoordArray 1 Vec2Array 4
          {  
            0 1
            0 0
            1 1
            1 0
          }
                  VertexAttribBinding 5  PER_VERTEX
          VertexAttribArray 5 Vec4Array 25
          {
            0 0 1 0
            0 0 0 0
            1 0 1 0
            1 0 0 0
          }                    
          VertexAttribBinding 7 PER_VERTEX
          VertexAttribArray 7 Vec4Array 25
          {    
            0 1 0 0
            0 1 0 0
            0 1 0 0
            0 1 0 0    
          }            
          VertexAttribBinding 15 PER_VERTEX
          VertexAttribArray 15 Vec4Array 25
          {
            0 0 1 0
            0 0 0 0
            1 0 1 0
            1 0 0 0
          }            
        }
        enabled TRUE
        selectedTechnique AUTO_DETECT
        lightNumber 0
        diffuseUnit 0
        normalMapUnit 1
      }
    }
  }
  MatrixTransform {
    DataVariance STATIC
    name "Omni01"
    nodeMask 0xff
    cullingActive TRUE
    referenceFrame RELATIVE
    Matrix {
      1 0 0 0
      0 -4.37114e-008 1 0
      0 -1 -4.37114e-008 0
      23.9583 -17.8447 76.0575 1
    }
    num_children 1
    LightSource {
      DataVariance STATIC
      nodeMask 0xff
      cullingActive FALSE
      StateSet {
        DataVariance STATIC
        rendering_hint DEFAULT_BIN
        renderBinMode INHERIT
        GL_LIGHT0 ON
      }
      referenceFrame RELATIVE
      Light {
        DataVariance STATIC
        light_num 0
        ambient 0.3 0.3 0.3 1
        diffuse .9 .9 .9 1
        specular 1 1 1 1
        position 0 0 2 1
        direction 0 0 0
        constant_attenuation 1
        linear_attenuation 0
        quadratic_attenuation 0
        spot_exponent 0
        spot_cutoff 180
      }
      num_children 0     
      }
    }
  }
}
 





if those stupid pics don't go just use your own, and try the new object viewer in Delta 2.2 has a nice light you can move about

texture arrays do not come from exported osg from max or blender, basically 5-15 area texCoord numbers used in the form texCoord#, 0, texCoord#, 0
for 7 its just 0, 1, 0, 0

Mr. D
 
Profile Email
 Quote
assignmenthelp1
 01/27/2017 07:08AM  

Newbie

Status: offline
Forum User

Registered: 01/17/2017
Posts: 9
HND Assignment help is the leading assignment help company offering high quality assignment help services in UK, US and Australia. Connect with us for assignment help services at hndassignmenthelp@gmail.com or login to http://www.hndassignmenthelp.co.uk
 
Profile Email
 Quote
assignmenthelp1
 01/27/2017 07:13AM  

Newbie

Status: offline
Forum User

Registered: 01/17/2017
Posts: 9
HND Assignment help is the leading assignment help company offering high quality assignment help services in UK, US and Australia. Connect with us for assignment help services at hndassignmenthelp@gmail.com or login to http://www.hndassignmenthelp.co.uk
 
Profile Email
 Quote
Content generated in: 0.42 seconds New Topic Post Reply
 All times are UTC. The time is now 03:40 PM.
Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 

About delta3d

delta3d is a game and simulation engine appropriate for a wide variety of simulation and entertainment applications. delta3d uses best-of-breed open source technologies to create a fully integrated game engine and with content creation tools.MORE

Twitter

User Functions





Don't have an account yet? Sign up as a New User!

Lost your password?