Re: [osg-users] Increasing line width

2012-10-22 Thread Filip Arlet

Chris Hanson wrote:
 On Wed, Oct 17, 2012 at 9:18 AM, Tueller, Shayne R Civ USAF AFMC 519 
 SMXS/MXDEC  () wrote:
 
  Take a look at the createAxis() in the osgbillboard.cpp file for the
  osgbillboard example. There's code in there to set linewidth...
  
  
 
 
   Rather than altering the model (which break displaylists or other compiled 
 geometry representations and requires DYNAMIC datavariance) I recommend 
 re-drawing the highlighted part one more time, after the rest of the model 
 has drawn itself. You can usually use a nodemask to perform this trick. You 
 may wish to clone the original entity, set the line width wider, and draw 
 that clone, so you don't disrupt the state of the original.
 
 
   Set your Z-buffer depth test to GL_LEQUAL so that re-drawing the same part 
 actually draws it again, over top of the copy already represented in the 
 Z-buffer.
  
 
 -- 
 Chris 'Xenon' Hanson, omo sanza lettere.  http://www.alphapixel.com/ 
 (http://www.alphapixel.com/)
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • 
 GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • 
 LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
 
  --
 Post generated by Mail2Forum


Yes, cloning entity and setting linewidth to higher number works, only problem 
is with cloning big entity, its slow operation for realtime highlighting. I was 
wondering if this can be achieved without cloning entire entity.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50708#50708





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Increasing line width

2012-10-22 Thread Chris Hanson

 Yes, cloning entity and setting linewidth to higher number works, only
 problem is with cloning big entity, its slow operation for realtime
 highlighting. I was wondering if this can be achieved without cloning
 entire entity.



  Well, if you can use shaders or stencil buffers, you could write to a
separate mask channel (multiple render targets) during the original render
pass, and then do some sort of post-processing operation afterward.

  But it's probably just as easy to stick a stateset with an osg::LineWidth
(
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00391.html
)
above the selected model, with the stateset set to OVERRIDE.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Increasing line width

2012-10-17 Thread Filip Arlet
Hi,

I want to highlight part of CAD model. I have big symbol with lines, that have 
different line width. Now I want to render that lines with +4.0f linewidth 
according to original width of every line.

What is the best approach?

Thank you!

Cheers,
Filip

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50642#50642





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Increasing line width

2012-10-17 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Take a look at the createAxis() in the osgbillboard.cpp file for the
osgbillboard example. There's code in there to set linewidth...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Filip
Arlet
Sent: Wednesday, October 17, 2012 3:55 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Increasing line width

Hi,

I want to highlight part of CAD model. I have big symbol with lines,
that have different line width. Now I want to render that lines with
+4.0f linewidth according to original width of every line.

What is the best approach?

Thank you!

Cheers,
Filip

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50642#50642





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Increasing line width

2012-10-17 Thread Chris Hanson
On Wed, Oct 17, 2012 at 9:18 AM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:

 Take a look at the createAxis() in the osgbillboard.cpp file for the
 osgbillboard example. There's code in there to set linewidth...


  Rather than altering the model (which break displaylists or other
compiled geometry representations and requires DYNAMIC datavariance) I
recommend re-drawing the highlighted part one more time, after the rest of
the model has drawn itself. You can usually use a nodemask to perform this
trick. You may wish to clone the original entity, set the line width wider,
and draw that clone, so you don't disrupt the state of the original.

  Set your Z-buffer depth test to GL_LEQUAL so that re-drawing the same
part actually draws it again, over top of the copy already represented in
the Z-buffer.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org