[osg-users] Invisible light points

Andreas Ekstrand andreas.ekstrand at remograph.com
Fri Aug 4 04:12:04 PDT 2017


Hi,

I recently moved from OSG 3.2.1 to 3.5.6 and now I have problems with 
light points going invisible if rendered together with other geometry.

I managed to reproduce in a small test case - have a look at the 
attached lp and lp_poly models (both in 3.5.6 osgt and deprecated osg 
which I find easier to debug). With 3.5.6, I can only see the light 
points in the lp model and not in the lp_poly model - any idea why?

I tried disabling culling, changing render binds, removing all StateSets 
in the osg files. No matter what, it seems the geode causes the light 
points to be invisible. How can I fix this?

Regards,
Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170804/9f1125b1/attachment.htm>
-------------- next part --------------
Group {
  nodeMask 0xffffffff
  cullingActive FALSE
  num_children 1
  Group {
    nodeMask 0xffffffff
    cullingActive FALSE
    num_children 1
    osgSim::LightPointNode {
      nodeMask 0xffffffff
      cullingActive FALSE
      num_lightpoints 2
      minPixelSize 4
      maxPixelSize 14
      maxVisibleDistance2 3.40282e+038
      pointSprite FALSE
      lightPoint {
        isOn TRUE
        position 0.5 0.5 0.5
        color 1 1 1 1
        intensity 1
        radius 10
        blendingMode ADDITIVE
      }
      lightPoint {
        isOn TRUE
        position 1.5 1.5 0.5
        color 1 1 1 1
        intensity 1
        radius 10
        blendingMode ADDITIVE
      }
    }
  }
}
-------------- next part --------------
Group {
  nodeMask 0xffffffff
  cullingActive FALSE
  num_children 2
  Group {
    nodeMask 0xffffffff
    cullingActive FALSE
    num_children 1
    osgSim::LightPointNode {
      nodeMask 0xffffffff
      cullingActive FALSE
      num_lightpoints 2
      minPixelSize 4
      maxPixelSize 14
      maxVisibleDistance2 3.40282e+038
      pointSprite FALSE
      lightPoint {
        isOn TRUE
        position 0.5 0.5 0.5
        color 1 1 1 1
        intensity 1
        radius 10
        blendingMode ADDITIVE
      }
      lightPoint {
        isOn TRUE
        position 1.5 1.5 0.5
        color 1 1 1 1
        intensity 1
        radius 10
        blendingMode ADDITIVE
      }
    }
  }
  Geode {
    nodeMask 0xffffffff
    cullingActive FALSE
    num_drawables 1
    Geometry {
      supportsDisplayList FALSE
      useDisplayList FALSE
      useVertexBufferObjects FALSE
      PrimitiveSets 1
      {
        DrawArrays TRIANGLES 0 3
      }
      VertexArray Vec3Array 2
      {
        0 1 0
        0 -1 0
        1 0 0
      }
      ColorBinding PER_PRIMITIVE_SET
      ColorArray Vec4Array 1
      {
        1 1 1 1
      }
    }
  }  
}
-------------- next part --------------
#Ascii Scene 
#Version 148 
#Generator OpenSceneGraph 3.5.6 

osg::Group {
  UniqueID 1 
  Name "lp_poly.osg" 
CullingActive FALSE 
Children 2 {
osgSim::LightPointNode {
      UniqueID 2 
      CullingActive FALSE 
StateSet TRUE {
osg::StateSet {
          UniqueID 3 
          DataVariance STATIC 
RenderBinMode USE_RENDERBIN_DETAILS 
BinNumber 20 
BinName "DepthSortedBin" 
}
      }
LightPointList 2 {
LightPoint {
Position 0.5 0.5 0.5 
Color 1 1 1 1 
Attributes TRUE 0 1 10 
Sector FALSE BlinkSequence FALSE }
LightPoint {
Position 1.5 1.5 0.5 
Color 1 1 1 1 
Attributes TRUE 0 1 10 
Sector FALSE BlinkSequence FALSE }
}
MinPixelSize 4 
MaxPixelSize 14 
MaxVisibleDistance2 3.40282e+038 
}
    osg::Geode {
      UniqueID 4 
      CullingActive FALSE 
Drawables 1 {
osg::Geometry {
          UniqueID 5 
          DataVariance STATIC 
SupportsDisplayList FALSE 
UseDisplayList FALSE 
PrimitiveSetList 1 {
osg::DrawArrays {
              UniqueID 6 
              Mode TRIANGLES 
Count 3 
}
          }
VertexArray TRUE {
osg::Vec3Array {
              UniqueID 7 
              BufferObject TRUE {
osg::VertexBufferObject {
                  UniqueID 8 
                }
              }
Binding BIND_PER_VERTEX 
vector 3 {
0 1 0 
0 -1 0 
1 0 0 
}
}
          }
ColorArray TRUE {
osg::Vec4Array {
              UniqueID 9 
              Binding BIND_PER_PRIMITIVE_SET 
vector 1 {
1 1 1 1 
}
}
          }
}
      }
}
  }
}
-------------- next part --------------
#Ascii Scene 
#Version 148 
#Generator OpenSceneGraph 3.5.6 

osg::Group {
  UniqueID 1 
  Name "lp.osg" 
CullingActive FALSE 
Children 1 {
osgSim::LightPointNode {
      UniqueID 2 
      CullingActive FALSE 
StateSet TRUE {
osg::StateSet {
          UniqueID 3 
          DataVariance STATIC 
RenderBinMode USE_RENDERBIN_DETAILS 
BinNumber 20 
BinName "DepthSortedBin" 
}
      }
LightPointList 2 {
LightPoint {
Position 0.5 0.5 0.5 
Color 1 1 1 1 
Attributes TRUE 0 1 10 
Sector FALSE BlinkSequence FALSE }
LightPoint {
Position 1.5 1.5 0.5 
Color 1 1 1 1 
Attributes TRUE 0 1 10 
Sector FALSE BlinkSequence FALSE }
}
MinPixelSize 4 
MaxPixelSize 14 
MaxVisibleDistance2 3.40282e+038 
}
  }
}


More information about the osg-users mailing list