Re: [osg-users] How to disable the continuous rotation of scencedata provided by TrackballManipulator?

2008-04-10 Thread Mattias Helsing
Hello Ke Li,

yes, if the mouse is moving when you release the button the model
rotates continously. This is a feature that is really nice for quick
presentations where you want the audience to look at the dazzling
stuff moving around on the screen instead of listening to your
rambling. It is part of the osgGA:TrackballManipulator and there is no
soft way of changing this behaviour.
However it is easy to subclass TrackballManipulator or write your own
cool Maniuplator, possibly using TrackballManip for reference. For the
feature you want to disable; look in the
TrackballManipulator::handle() method for a GUIEventAdapter::RELEASE
event.

Mattias

On 4/11/08, Ke Li <[EMAIL PROTECTED]> wrote:
>
> Hi all,In some
> OSG examples, if I drag the mouse quickly enough, the OSG nodes will 
> continuously rotate untill I click again. Can anybody kindly instruct me how 
> to disable this functionality? Thanks!Ke Li
> _
> Get in touch in an instant. Get Windows Live Messenger now.
> http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_getintouch_042008
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] how to speed drawing texts?

2008-04-10 Thread forest37
 
 
 hi all,
  
  when I use osg to draw texts,I find that the founction "osgText::setText()" 
requires 2ms .
  if I want to draw 5000 texts,I have to wait for 2S at least.
  what should I do to speed drawing texts?
 
  regards
  forest___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Summer Computer Simulation Conference Paper Compuetr Graphics / Scenegraph's paper track Deadline Extended to April 26

2008-04-10 Thread John F. Richardson
Hello,

Final Call for Papers for the Summer Computer Simulation Conference
(SCSC'08) conference in Edinburgh, Scotland on June 16-19, 2008. Paper
deadline has been extended to April 26, 2008.

The Society for Modeling and Simulation international (http://www.scs.org)
is the sponsor of a Simulation conference [Summer Computer Simulation
Conference (SCSC'08)] at the 2008 International Simulation Multi-conference
& 2008 Summer Simulation Multiconference (SummerSim'08). 
http://www.scs.org/confernc/summersim/summersim08/cfp/SCSC08.htm  
Other conferences in the multi-conference are the  International Symposium
on Performance Evaluation of Computer and Telecommunication Systems
(SPECTS'08) and the Grand Challenges in Modeling & Simulation (GCMS'08)
conference.

There is a "Computer Graphics for Simulation" Paper Track at the SCSC 08
conference. One of the main topic areas in the Track is Web3D and
Simulation.

http://www.scs.org/confernc/summersim/summersim08/cfp/SCSC08.htm

The conference is being held in Europe and so may be of particular interest
to European Web3D, Collada and Game researchers. Web3D, Collada and game
researchers, along with researchers in scenegraph's and scengraph
applications to simulation are encouraged to submit papers. Papers can be
full papers or "work in progress/short" papers related to Web3D, Collada,
Scenegraph's and games related to industrial or general simulation. Don't be
shy. You can also submit papers on general Computer Graphics Topics. Authors
can also submit High resolution images for a Scientific Visualization
Contest. Visit the above links for more details.

Topic Areas: (See official call for complete list of subtopics within topic
areas)
General Computer Graphics [Rendering / VE lighting / Science & Industrial
Visualization for Simulation / massive VE's / Terrain / Haptics /
Transportation / ...] Web3D and Simulation [VRML/ X3D / COLLADA / GAMES /
Scenegraphs / Data Acquisition / Web3D format interoperability / .]
Computational Grids for Simulation [Irregular / adaptive / parallel /
massive grids] 3-D Modeling and Animation Systems use in Simulation [open
source / Commercial / Sketching / ] Art and Esthetics in Simulation
[Color / realistic textures / art in architecture /...]

Key dates
Submission of Full Papers (full, short, applications)April 26, 2008
Notification of Acceptance   May 15, 2008
Final Camera-Ready Submission and Early Registration May 30, 2008

John F. Richardson


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


Re: [osg-users] SceneView error

2008-04-10 Thread Gordon Tomlinson
You need to call  cull() before you call draw otherwise you will have
nothing to draw, the cull sets up the draw records to be drawn for the
frame., so no cull nothing to draw .

 

__
Gordon Tomlinson 

Email   :   [EMAIL PROTECTED]
YIM/AIM : gordon3dBrit
MSN IM  :  
[EMAIL PROTECTED]
Website :   www.vis-sim.com
 www.gordontomlinson.com 

__

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, April 08, 2008 7:51 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] SceneView error

 

I try to use OpenSceneGraph and SceneView as shown in example when using an
existing renderer, but get an error when calling "SceneView->draw()" or more
spesific in 

 

"_localStateSet->setAttribute(getViewport());" 

 

The example code I use is as following:

 

int CMapRenderThread::InitOpenSceneGraph()

{

  root  = new osg::Group;

  pyramidGeode  = new osg::Geode;

  pyramidGeometry = new osg::Geometry;

 

  // Associate the pyramid geometry with the pyramid geode 

  // Add the pyramid geode to the root node of the scene graph.

  pyramidGeode->addDrawable(pyramidGeometry); 

  root->addChild(pyramidGeode);

 

  // Declare an array of vertices. 

  osg::Vec3Array* pyramidVertices = new osg::Vec3Array;

  pyramidVertices->push_back( osg::Vec3( 0, 0, 0) ); // front left 

  pyramidVertices->push_back( osg::Vec3(10, 0, 0) ); // front right 

  pyramidVertices->push_back( osg::Vec3(10,10, 0) ); // back right 

  pyramidVertices->push_back( osg::Vec3( 0,10, 0) ); // back left 

  pyramidVertices->push_back( osg::Vec3( 5, 5,10) ); // peak

  pyramidGeometry->setVertexArray( pyramidVertices );

 

  // Create a primitive set and add it to the pyramid geometry. 

  osg::DrawElementsUInt* pyramidBase = new
osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);

  pyramidBase->push_back(3);

  pyramidBase->push_back(2);

  pyramidBase->push_back(1);

  pyramidBase->push_back(0);

  pyramidGeometry->addPrimitiveSet(pyramidBase);

 

  // Repeat the same for each of the four sides. Again, vertices are 

  // specified in counter-clockwise order. 

  osg::DrawElementsUInt* pyramidFaceOne = new
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceOne->push_back(0);

  pyramidFaceOne->push_back(1);

  pyramidFaceOne->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceOne);

 

  osg::DrawElementsUInt* pyramidFaceTwo = new
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceTwo->push_back(1);

  pyramidFaceTwo->push_back(2);

  pyramidFaceTwo->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceTwo);

 

  osg::DrawElementsUInt* pyramidFaceThree = new
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceThree->push_back(2);

  pyramidFaceThree->push_back(3);

  pyramidFaceThree->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceThree);

 

  osg::DrawElementsUInt* pyramidFaceFour = new
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceFour->push_back(3);

  pyramidFaceFour->push_back(0);

  pyramidFaceFour->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceFour);

 

  // Declare and load an array of Vec4 elements to store colors. 

  osg::Vec4Array* colors = new osg::Vec4Array;

  colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red

  colors->push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1 green

  colors->push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2 blue

  colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3 white

 

  // Declare the variable that will match vertex array elements to color


  // array elements. 

  osg::TemplateIndexArray
*colorIndexArray;

  colorIndexArray = new osg::TemplateIndexArray;

  colorIndexArray->push_back(0); // vertex 0 assigned color array
element 0

  colorIndexArray->push_back(1); // vertex 1 assigned color array
element 1

  colorIndexArray->push_back(2); // vertex 2 assigned color array
element 2

  colorIndexArray->push_back(3); // vertex 3 assigned color array
element 3

  colorIndexArray->push_back(0); // vertex 4 assigned color array
element 0

 

  // The next step is to associate the array of colors with the
geometry, 

  // assign the color indices created above to the geometry and set the 

  // binding mode to BIND_PER_VERTEX.

  pyramidGeometry->setColorArray(colors);

  pyramidGeometry->setColorIndices(colorIndexArray);

  pyramidGeometry->setColorBinding(osg::Geometry::BIND_PER_VE

Re: [osg-users] ERROR BUILDING OSGGIS

2008-04-10 Thread Glenn Waldron
Luis,

Installing VS 2005 SP1 (service pack 1) will resolve the issue.

Glenn

On Thu, Apr 10, 2008 at 6:55 PM, Luis Camacho <[EMAIL PROTECTED]>
wrote:

>  Hi everybody,
> I have a problem while i´m building OSGGIS in Microsoft Visual Studio
> 2005,
>  my SO is Windows XP Professional Version 2002 SP2.
> I´m using the SVN version of OSG, the SVN version of OSGGIS,
>  the pre-built 3rd-party dependencies for Win32/VS2005 of the Web and the
> version of GDAL
>  that is included at FWTools 2.1.0. because I´ve used this version of GDAL
> for building OSG.
>
> The problem happens when it´s building OSGGIS project:
> .
> .
> Attribute.cpp
> Generating Code...
> Linking...
> fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2'
> version '20050411'
> LINK : fatal error LNK1257: code generation failed
> .
> .
>
> I´ve found at msdn web:
>
> Visual C++ Concepts: Building a C/C++ Program
> Fatal Error C1900
> Il mismatch between 'tool1' version 'number1' and 'tool2' version
> 'number2'
> Tools run in various passes of the compiler do not match. number1 and
> number2 refer to the dates on the files.
>  For example, in pass 1, the compiler front end runs (c1.dll) and in pass
> 2, the compiler back end runs (c2.dll).
> The dates on the files must match and if they do not, reinstall and use
> the current version of each tool.
>
> Anybody know what can i do to resolve the problem?
> Thanks in advance!
>
> --
> Tecnología, moda, motor, viajes,.suscríbete a nuestros boletines para
> estar siempre a la última MSN 
> Newsletters
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SceneView error

2008-04-10 Thread Ulrich Hertlein
Hi Erf,

Quoting [EMAIL PROTECTED]:
> i did get a runtime error at "_localStateSet->setAttribute(getViewport());"
> when calling SceneView->draw if not calling SceneView->cull first.  dont have

Makes sense doesn't it?  If you don't call cull() then draw() is kind-of in an
indeterminate state.

You're not using the API as expected and get an error.
(Is there a reason why you don't call cull()?)

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


[osg-users] How to disable the continuous rotation of scencedata provided by TrackballManipulator?

2008-04-10 Thread Ke Li

Hi all,In some OSG examples, if I drag the mouse quickly enough, the OSG nodes 
will continuously rotate untill I click again. Can anybody kindly instruct me 
how to disable this functionality? Thanks!Ke Li
_
Get in touch in an instant. Get Windows Live Messenger now.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_getintouch_042008___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] ERROR BUILDING OSGGIS

2008-04-10 Thread Luis Camacho

Hi everybody,
I have a problem while i´m building OSGGIS in Microsoft Visual Studio 2005,
 my SO is Windows XP Professional Version 2002 SP2.I´m using the SVN version of 
OSG, the SVN version of OSGGIS,
 the pre-built 3rd-party dependencies for Win32/VS2005 of the Web and the 
version of GDAL
 that is included at FWTools 2.1.0. because I´ve used this version of GDAL for 
building OSG.
 
The problem happens when it´s building OSGGIS project:
..Attribute.cppGenerating Code...Linking...fatal error C1900: Il mismatch 
between 'P1' version '20060201' and 'P2' version '20050411'LINK : fatal error 
LNK1257: code generation failed..
 
I´ve found at msdn web:
 
Visual C++ Concepts: Building a C/C++ ProgramFatal Error C1900
Il mismatch between 'tool1' version 'number1' and 'tool2' version 'number2'
Tools run in various passes of the compiler do not match. number1 and number2 
refer to the dates on the files.
 For example, in pass 1, the compiler front end runs (c1.dll) and in pass 2, 
the compiler back end runs (c2.dll). 
The dates on the files must match and if they do not, reinstall and use the 
current version of each tool.
 
Anybody know what can i do to resolve the problem?Thanks in advance!
_
MSN Noticias
http://noticias.msn.es/comunidad.aspx___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB ERROR 4: ".dem" not recognised as a supported file format

2008-04-10 Thread Luis Camacho

Hi Jason,
 
Thanks for your idea, but I´m sure that i´m using the same version of GDAL, I 
have only a version of GDAL in my computer.
I´m using the version of GDAL that it´s included in FWTools2.1.0. I´ve used 
this GDAL for linked VPB and OSG.
I tested with the version 1.5. of GDAL a few days ago, but the result was the 
same...ERROR 4 ...
I tested with the version 2.2.0 of OSG and the version 0.9.1 of VPB too, and i 
had the same problem again.
I use Microsoft Visual Studio 2005 for building VPB and OSG, and OSG runs 
without problems.
Maybe I´m doing something wrong with CMake or VS2005... I don´t know what can i 
test.
 
Thanks.
 
  
 


Date: Thu, 10 Apr 2008 10:36:29 -0400From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: Re: [osg-users] VPB ERROR 4: ".dem" not recognised as a supported 
file formatHi Luis,Are you sure that the version of GDAL you're calling 
gdalinfo with is the same as the version linked with VPB and OSG?Jason
On Wed, Apr 9, 2008 at 8:06 PM, Luis Alberto Camacho Girones <[EMAIL 
PROTECTED]> wrote:

Hi, I am trying to use the SVN version (April 09, 2008) of Virtual Planet 
Builder on Windows XP. I use the svn version of OSG too. I used the following 
osgdem -l 3 -d e020n40.dem -o e020n40.ive And the result is: -d e020n40.dem-o 
e020n40.iveAdding terrainTileDataSet::_run<> 0 0ERROR 4: "e020n40.dem" not 
recognised  as a supported file format I have seen (gdalinfo --formats) that 
USGSDEM is a format supported by GDAL. The file "e020n40.dem" isn´t corrupt 
(i´ve tested it several times). I have tested with other file but in HGT 
format, andeverything is ok.I tried to use the 0.9.1 version of VPB and i had 
the same problem.The examples that i have seen always use .tif format. Maybe, i 
have to translate (using gdal_translate) the .dem format to a .tif 
format?...Anybody got ideas for more tests I can run to pin down the problem? 
Thanks in advance!


Sigue de cerca las últimas tendencias y lo que más rompe MSN 
Vídeo___osg-users mailing [EMAIL 
PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_
MSN Noticias
http://noticias.msn.es/comunidad.aspx___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Cleaning up old textures.

2008-04-10 Thread Dorosky, Christopher G
 
If I have an IVE model, with texture, and I delete the model, what
happens to the texture memory the texture was using?

Is it freed?

What about if the model is on a switch, and I turn the switch off?

I am assuming that I have to do something manually to deal with this,
either way.
I seem to remember an osg::deleteOldTextureObjects() or something like
that.


Thanks,

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


Re: [osg-users] using Shader file call - what Shader version..Clarification

2008-04-10 Thread Mike Weiblen
Ok, I think that introduced a different error: try "/" rather than "\".

If all else fails, look at and derive from glsl_simple.osg.  It's a
known-working example.

-- mew


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Dunhour, Mike (CIV)
> Sent: Thursday, April 10, 2008 12:35 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] using Shader file call - what Shader
> version..Clarification
> 
> 
> 
> ok, a couple datapoints: the .osg format parser:
> 1) is case-sensitive
> 2) silently ignores anything is doesn't recognize.
> 
> Your example shows "File" when the actual keyword is "file".
> 
> Excerpt from the glsl_simple.osg example:
> 
> Shader {
>   DataVariance DYNAMIC
>   type VERTEX
>   file shaders/shader.vert
> }
> 
> -- mew
> 
> 
> Hopefully more helpful
> Using .osg file exported from 3DSmax_v8 using osgexporter
> Object is just a quad
> These lines edited into the file under Geode section
> 
> StateSet {
>   DataVariance STATIC
>   rendering_hint DEFAULT_BIN
>   renderBinMode INHERIT
>   Program {
> DataVariance STATIC
> name "Testy"
> num_shaders 1
> Shader {
>   DataVariance DYNAMIC
> type FRAGMENT
> code {
>   "void main (void)"
>   "{"
>   "gl_FragColor = vec4 ( 0.0, 0.0, 1.0, 1.0 );"
>   "}"
> }
>   }
> 
> Which does frag_color the quad blue
> 
> Tried to replace with
> 
> StateSet {
>   DataVariance STATIC
>   rendering_hint DEFAULT_BIN
>   renderBinMode INHERIT
>   Program {
> DataVariance STATIC
> name "Testy"
> num_shaders 1
> Shader {
>   DataVariance DYNAMIC
>   type FRAGMENT
>   file shaders\s.frag
> }
>   }
> 
> No error message, but quad just maintains color assign during creation
> in 3DSmax
> 
> 
> Thank you for your reply
> 
> Mr. D
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] vrml2.0

2008-04-10 Thread Jean-Sébastien Guay
Hello Wang,

> can the current version of osg load vrml2.0 model?

You need to compile in either the OpenVRML plugin or the Inventor 
plugin. Both can load VRML2/VRML97 files.

I think the OpenVRML plugin is the easier path, depending on which 
platform you're working on. For the Inventor plugin, you need either 
OpenInventor (which IIRC only compiles correctly on Linux/Unix variants, 
and is totally unsupported and old) or Coin3d (which is GPL). OpenVRML 
is LGPL and compiles well on Linux/Unix and Windows, but be careful you 
get the right version of it. See the wiki for Visual Studio instructions.

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPlugins

Hope this helps,

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Bryan Berg
Oops - my examples weren't built .

 

Thanks!

 

-Bryan

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, April 10, 2008 12:02 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] adding an icon to a scene

 

On Thu, Apr 10, 2008 at 7:58 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

Do any of the sample apps include billboards or point sprites?


As ever a bit cryptic... the examples are:

  osgbillboard
  osgpointsprite



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


[osg-users] vrml2.0

2008-04-10 Thread wangqin

Hello,
Just a question is,
can the current version of osg load vrml2.0 model?

thanks

greeting

wang,qin
 

_
新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!
http://im.live.cn/emoticons/?ID=18___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Directory not found

2008-04-10 Thread Renan Mendes
Thanks, Mattias. I have it all working, I just wanted to know why I had to
add those paths in two different locations. I think I have it all figured
out.

 Thanks again,

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


Re: [osg-users] Can I disable color buffer writes before a certain nodeand enable it after?

2008-04-10 Thread Paul Martz
Hi Judie -- If you have some subgraph (maybe a single Geode or something
more complex) that needs to have the color buffer masked off, just add a
ColorMask to the StateSet of the subgraph's parent node. Something like
this:
  node->getOrCreateStateSet()->setAttributeAndModes( 
new osg::ColorMask( false, false, false, false ) );
 
Take a look at the example code to see how other StateAttributes get set.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Judie
Stanley
Sent: Thursday, April 10, 2008 1:13 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Can I disable color buffer writes before a certain
nodeand enable it after?


Hi,
 
Can I do this?
 
I want to insert a state node in the scene graph before and after a certain
node (that has geometry) that will disable color buffer writes and then
enable them.
 
flow like this:
 
start->disable color buffer writes -> draw node ->enable color buffer writes
-> draw next node
 
Is this possible?
 
Thanks,
 
Judie

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


[osg-users] Can I disable color buffer writes before a certain node and enable it after?

2008-04-10 Thread Judie Stanley
Hi,

Can I do this?

I want to insert a state node in the scene graph before and after a certain
node (that has geometry) that will disable color buffer writes and then
enable them.

flow like this:

start->disable color buffer writes -> draw node ->enable color buffer writes
-> draw next node

Is this possible?

Thanks,

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


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Robert Osfield
On Thu, Apr 10, 2008 at 7:58 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

>  Do any of the sample apps include billboards or point sprites?
>

As ever a bit cryptic... the examples are:

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


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Bryan Berg
Thanks both for your responses,

 

I think I'll first look into the billboard or point sprite, as I don't have
the ossimPlanet libraries.

 

Actually, where would I get those?

 

Do any of the sample apps include billboards or point sprites?

 

Thanks again!  : * )

 

-Bryan

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, April 10, 2008 11:23 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] adding an icon to a scene

 

Hi Bryan,

A billboard or perhaps even a point sprite would do just fine.

Robert.

On Thu, Apr 10, 2008 at 7:00 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

Doh !

 

I sent the wrong link .sorry about that

 

I meant this one .

 

http://www.foxtons.co.uk/i/news_images/google_earth.jpg

 

(There should be f's on this link .)

 

(Something similar to adding a placemark in google-earth.

 

-Bryan

 

 

 

 

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, April 10, 2008 10:48 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] adding an icon to a scene

 

HI Bryan,

The URL doesn't give me any ideas to what you actually mean, I couldn't spot
any F anywhere.

There are many ways to create icons in the OSG, all will be based around
creating a textured quad, but how you place this in the scene totally
depends upon what you require.

Robert.

On Thu, Apr 10, 2008 at 6:17 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

Hi,

 

Does anyone know how to add an icon to a 3D scene.

 

Something like:

 

http://reactable.iua.upf.edu/

 

Here I'm referring to the yellow and green circular image of the letter F.

 

Thanks!

 

-Bryan

 


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

 


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

 

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


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Norman Vine
Bryan Berg writes:  
> 
> (Something similar to adding a placemark in google-earth.

http://svn.osgeo.org/ossim/trunk/ossimPlanet/src/ossimPlanet/ossimPlanetKmlP
lacemarkNode.cpp

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


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Robert Osfield
Hi Bryan,

A billboard or perhaps even a point sprite would do just fine.

Robert.

On Thu, Apr 10, 2008 at 7:00 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

>  Doh !
>
>
>
> I sent the wrong link …sorry about that
>
>
>
> I meant this one …
>
>
>
> http://www.foxtons.co.uk/i/news_images/google_earth.jpg
>
>
>
> (There should be f's on this link …)
>
>
>
> (Something similar to adding a placemark in google-earth.
>
>
>
> -Bryan
>
>
>
>
>
>
>
>
>
>
>  --
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Robert Osfield
> *Sent:* Thursday, April 10, 2008 10:48 AM
> *To:* OpenSceneGraph Users
> *Subject:* Re: [osg-users] adding an icon to a scene
>
>
>
> HI Bryan,
>
> The URL doesn't give me any ideas to what you actually mean, I couldn't
> spot any F anywhere.
>
> There are many ways to create icons in the OSG, all will be based around
> creating a textured quad, but how you place this in the scene totally
> depends upon what you require.
>
> Robert.
>
> On Thu, Apr 10, 2008 at 6:17 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
>
> Does anyone know how to add an icon to a 3D scene.
>
>
>
> Something like:
>
>
>
> http://reactable.iua.upf.edu/
>
>
>
> Here I'm referring to the yellow and green circular image of the letter F.
>
>
>
> Thanks!
>
>
>
> -Bryan
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Bryan Berg
Doh !

 

I sent the wrong link .sorry about that

 

I meant this one .

 

http://www.foxtons.co.uk/i/news_images/google_earth.jpg

 

(There should be f's on this link .)

 

(Something similar to adding a placemark in google-earth.

 

-Bryan

 

 

 

 

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, April 10, 2008 10:48 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] adding an icon to a scene

 

HI Bryan,

The URL doesn't give me any ideas to what you actually mean, I couldn't spot
any F anywhere.

There are many ways to create icons in the OSG, all will be based around
creating a textured quad, but how you place this in the scene totally
depends upon what you require.

Robert.

On Thu, Apr 10, 2008 at 6:17 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

Hi,

 

Does anyone know how to add an icon to a 3D scene.

 

Something like:

 

http://reactable.iua.upf.edu/

 

Here I'm referring to the yellow and green circular image of the letter F.

 

Thanks!

 

-Bryan

 


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

 

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


Re: [osg-users] Create new Image

2008-04-10 Thread Robert Osfield
HI Vincent,

What do you mean by an "error append"?

In your code have both a allocateImage and a setImage, you should just use
one or other.

Robert.

On Thu, Apr 10, 2008 at 5:46 PM, Vincent Bourdier <
[EMAIL PROTECTED]> wrote:

> Hi All,
>
> I'm making a loop which compute each pixel color for a RVB image...
>
> but sometimes, wen runing, an error append in :
>
> osg::ref_ptr image = new osg::Image;
> > image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_BYTE);
> > image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels on
> > the Bottom left of the picture
> > image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data,
> > osg::Image::USE_NEW_DELETE);
> >
> > osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
> >
>
> note : data is a unsigned char* of _x*_y*3 size
>
> Is there any specification or order to create a osg::Image from an
> unsigned char* ?
>
> Thanks.
>
> Regards,
>   Vincent.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] adding an icon to a scene

2008-04-10 Thread Robert Osfield
HI Bryan,

The URL doesn't give me any ideas to what you actually mean, I couldn't spot
any F anywhere.

There are many ways to create icons in the OSG, all will be based around
creating a textured quad, but how you place this in the scene totally
depends upon what you require.

Robert.

On Thu, Apr 10, 2008 at 6:17 PM, Bryan Berg <[EMAIL PROTECTED]> wrote:

>  Hi,
>
>
>
> Does anyone know how to add an icon to a 3D scene.
>
>
>
> Something like:
>
>
>
> http://reactable.iua.upf.edu/
>
>
>
> Here I'm referring to the yellow and green circular image of the letter F.
>
>
>
> Thanks!
>
>
>
> -Bryan
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] using Shader file call - what Shader version ..Clarification

2008-04-10 Thread Dunhour, Mike (CIV)


ok, a couple datapoints: the .osg format parser:
1) is case-sensitive
2) silently ignores anything is doesn't recognize.

Your example shows "File" when the actual keyword is "file".

Excerpt from the glsl_simple.osg example:

Shader {
  DataVariance DYNAMIC
  type VERTEX
  file shaders/shader.vert
}

-- mew


Hopefully more helpful
Using .osg file exported from 3DSmax_v8 using osgexporter
Object is just a quad 
These lines edited into the file under Geode section

StateSet {
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  Program {
DataVariance STATIC
name "Testy"
num_shaders 1 
Shader {
  DataVariance DYNAMIC
  type FRAGMENT
  code { 
"void main (void)" 
"{"
"gl_FragColor = vec4 ( 0.0, 0.0, 1.0, 1.0 );"
"}"
}
}

Which does frag_color the quad blue

Tried to replace with

StateSet {
  DataVariance STATIC
  rendering_hint DEFAULT_BIN
  renderBinMode INHERIT
  Program {
DataVariance STATIC
name "Testy"
num_shaders 1 
Shader {
  DataVariance DYNAMIC
  type FRAGMENT
  file shaders\s.frag
}
  }

No error message, but quad just maintains color assign during creation
in 3DSmax


Thank you for your reply

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


[osg-users] adding an icon to a scene

2008-04-10 Thread Bryan Berg
Hi,

 

Does anyone know how to add an icon to a 3D scene.

 

Something like:

 

http://reactable.iua.upf.edu/

 

Here I'm referring to the yellow and green circular image of the letter F.

 

Thanks!

 

-Bryan

 

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


Re: [osg-users] SceneView error

2008-04-10 Thread erf
i did get a runtime error at "_localStateSet->setAttribute(getViewport());" 
when calling SceneView->draw if not calling SceneView->cull first.  dont have 
the log file here right now, and i am in the middle of some other coding stuff, 
just thought you should know.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: 10. april 2008 18:08
To: OpenSceneGraph Users
Subject: Re: [osg-users] SceneView error

Hi Erf???

Can't make any sense of your email, and not about to go trying to sieve through 
your example code trying to work out what you might mean.

Please try and be specific, tell us what error you get, a compile, and link 
error, a runtime error

Also try telling us which version of the OSG you are talking about?  2.x 
doesn't have any SceneView examples for instance...

Robert.
On Tue, Apr 8, 2008 at 12:50 PM, <[EMAIL PROTECTED]> 
wrote:

I try to use OpenSceneGraph and SceneView as shown in example when using an 
existing renderer, but get an error when calling "SceneView->draw()" or more 
spesific in



"_localStateSet->setAttribute(getViewport());"



The example code I use is as following:



int CMapRenderThread::InitOpenSceneGraph()

{

  root  = new osg::Group;

  pyramidGeode  = new osg::Geode;

  pyramidGeometry = new osg::Geometry;



  // Associate the pyramid geometry with the pyramid geode

  // Add the pyramid geode to the root node of the scene graph.

  pyramidGeode->addDrawable(pyramidGeometry);

  root->addChild(pyramidGeode);



  // Declare an array of vertices.

  osg::Vec3Array* pyramidVertices = new osg::Vec3Array;

  pyramidVertices->push_back( osg::Vec3( 0, 0, 0) ); // front left

  pyramidVertices->push_back( osg::Vec3(10, 0, 0) ); // front right

  pyramidVertices->push_back( osg::Vec3(10,10, 0) ); // back right

  pyramidVertices->push_back( osg::Vec3( 0,10, 0) ); // back left

  pyramidVertices->push_back( osg::Vec3( 5, 5,10) ); // peak

  pyramidGeometry->setVertexArray( pyramidVertices );



  // Create a primitive set and add it to the pyramid geometry.

  osg::DrawElementsUInt* pyramidBase = new 
osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);

  pyramidBase->push_back(3);

  pyramidBase->push_back(2);

  pyramidBase->push_back(1);

  pyramidBase->push_back(0);

  pyramidGeometry->addPrimitiveSet(pyramidBase);



  // Repeat the same for each of the four sides. Again, vertices are

  // specified in counter-clockwise order.

  osg::DrawElementsUInt* pyramidFaceOne = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceOne->push_back(0);

  pyramidFaceOne->push_back(1);

  pyramidFaceOne->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceOne);



  osg::DrawElementsUInt* pyramidFaceTwo = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceTwo->push_back(1);

  pyramidFaceTwo->push_back(2);

  pyramidFaceTwo->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceTwo);



  osg::DrawElementsUInt* pyramidFaceThree = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceThree->push_back(2);

  pyramidFaceThree->push_back(3);

  pyramidFaceThree->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceThree);



  osg::DrawElementsUInt* pyramidFaceFour = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceFour->push_back(3);

  pyramidFaceFour->push_back(0);

  pyramidFaceFour->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceFour);



  // Declare and load an array of Vec4 elements to store colors.

  osg::Vec4Array* colors = new osg::Vec4Array;

  colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red

  colors->push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1 green

  colors->push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2 blue

  colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3 white



  // Declare the variable that will match vertex array elements to color

  // array elements.

  osg::TemplateIndexArray 
*colorIndexArray;

  colorIndexArray = new osg::TemplateIndexArray;

  colorIndexArray->push_back(0); // vertex 0 assigned color array element 0

  colorIndexArray->push_back(1); // vertex 1 assigned color array element 1

  colorIndexArray->push_back(2); // vertex 2 assigned color array element 2

  colorIndexArray->push_back(3); // vertex 3 assigned color array element 3

  colorIndexArray->push_back(0); // vertex 4 assigned color array element 0



  // The next step is to associate the array of colors with the geometry,

  // assign the color indices created above to the geometry and set the

  // binding mode to BIND_PER_VERTEX.

  pyramidGeometry->setColorArray(colo

Re: [osg-users] Examples for using image as a background

2008-04-10 Thread Thrall, Bryan
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Judie Stanley  
> 
> I have searched and see there is such a thing as a
> osg::ImageBackground object. However, I searched the osg solution
> (osg 2.0) and nothing was found has the name changed?  
> 
> http://www.opensg.org/doc-1.6.0/classosg_1_1ImageBackground.html
> 

Note this is not the OpenSceneGraph website; it is for OpenSG. The
OpenSceneGraph documentation is at
http://www.openscenegraph.org/projects/osg/wiki/Support

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Examples for using image as a background

2008-04-10 Thread erf
do this:

_sceneViewer->getCamera()->setClearMask(0);

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Judie Stanley
Sent: 10. april 2008 18:49
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Examples for using image as a background

Trying to add video capture as the background to a scene.

I am not very familiar with osg and am working in an existing code base. The 
render loop calls SceneView::Draw which apparently does all the traversal. 
Unfortunately for me, it also clears the color buffer so I don't see my video 
capture if I enable this call, but then if I disable it, I only see my video 
capture - drawn using OpenGL, because of course, the scene is not drawn.

Is there a way to disable clearing the color buffer?

Another way would be if I could set the video capture as the background.

I have searched and see there is such a thing as a osg::ImageBackground object. 
However, I searched the osg solution (osg 2.0) and nothing was found has the 
name changed?
http://www.opensg.org/doc-1.6.0/classosg_1_1ImageBackground.html

Does anybody know of some sample code?

Thanks,

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


[osg-users] Examples for using image as a background

2008-04-10 Thread Judie Stanley
Trying to add video capture as the background to a scene.

I am not very familiar with osg and am working in an existing code base. The
render loop calls SceneView::Draw which apparently does all the traversal.
Unfortunately for me, it also clears the color buffer so I don't see my
video capture if I enable this call, but then if I disable it, I only see
my video capture - drawn using OpenGL, because of course, the scene is not
drawn.

Is there a way to disable clearing the color buffer?

Another way would be if I could set the video capture as the background.

I have searched and see there is such a thing as a osg::ImageBackground
object. However, I searched the osg solution (osg 2.0) and nothing was found
has the name changed?
http://www.opensg.org/doc-1.6.0/classosg_1_1ImageBackground.html

Does anybody know of some sample code?

Thanks,

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


[osg-users] Create new Image

2008-04-10 Thread Vincent Bourdier
Hi All,

I'm making a loop which compute each pixel color for a RVB image...

but sometimes, wen runing, an error append in :

osg::ref_ptr image = new osg::Image;
> image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_BYTE);
> image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels on
> the Bottom left of the picture
> image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data,
> osg::Image::USE_NEW_DELETE);
>
> osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
>

note : data is a unsigned char* of _x*_y*3 size

Is there any specification or order to create a osg::Image from an unsigned
char* ?

Thanks.

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


Re: [osg-users] How to disable culling of a node

2008-04-10 Thread Paul Martz
I encourage the original poster to obtain a copy of the "red book": OpenGL
Programming Guide. And also maybe a copy of the Foley and Van Dam book,
Interactive Computer Graphics.
 
The question about how to disable the near/far plane implies a great lack of
experience with 3D graphics. These books will help; see also the
"Recommended Reading" section in the OpenSceneGraph Quick Start Guide for
other books that will provide a basis in 3D graphics.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com  
+1 303 859 9466
 
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Thursday, April 10, 2008 10:30 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to disable culling of a node


HI Emilo,

You can't switching of OpenGL clipping, you can only move the near and far
planes to encompass you model so it doesn't clip it - its the way that
graphics pipeline in hardware works.  The OSG by default will automatically
compute the near and far planes to prevent clipping, but since you have
switched this off you are on your own, if its clipping then its because
you've set the wrong values.

Robert.


On Thu, Apr 10, 2008 at 1:15 PM, Emilio Lozano <[EMAIL PROTECTED]> wrote:


Hi all,

I'`m trying to get a node always drawn without being affected by near
clipping plane defined in projection perspective. With the following simple
code what I expected to get is that the cow was not clipped by near or far
planes, but the cow is still clipped.

Could you give me any hints?

Thanks in advance to all.

int main( int argc, char **argv )
{
osg::ArgumentParser arguments(&argc,argv);

osg::Node* loadedModel = osgDB::readNodeFile("cow.osg");
 
// Although set as not culled, the model is still culled by near/far
planes
loadedModel->setCullingActive (false);

osg::Group* rootnode = new osg::Group();
rootnode->addChild (loadedModel);

// run optimization over the scene graph
osgUtil::Optimizer optimzer;
optimzer.optimize(rootnode);

osgViewer::Viewer viewer;
viewer.setUpViewInWindow (100, 100, 800, 600, 0);
   
// set the scene to render
viewer.setSceneData(rootnode);

viewer.getCamera ()->setProjectionMatrixAsPerspective (30.0, 40.0 /
30.0, 50.0, 2000.0);
viewer.getCamera ()->setComputeNearFarMode
(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);


return viewer.run();
}


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




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


Re: [osg-users] SceneView error

2008-04-10 Thread erf
ps, its the latest version, 2.3.7. its just an example i created myself.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: 10. april 2008 18:42
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] SceneView error


i did get a runtime error at "_localStateSet->setAttribute(getViewport());" 
when calling SceneView->draw if not calling SceneView->cull first.  dont have 
the log file here right now, and i am in the middle of some other coding stuff, 
just thought you should know.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: 10. april 2008 18:08
To: OpenSceneGraph Users
Subject: Re: [osg-users] SceneView error

Hi Erf???

Can't make any sense of your email, and not about to go trying to sieve through 
your example code trying to work out what you might mean.

Please try and be specific, tell us what error you get, a compile, and link 
error, a runtime error

Also try telling us which version of the OSG you are talking about?  2.x 
doesn't have any SceneView examples for instance...

Robert.
On Tue, Apr 8, 2008 at 12:50 PM, <[EMAIL PROTECTED]> 
wrote:

I try to use OpenSceneGraph and SceneView as shown in example when using an 
existing renderer, but get an error when calling "SceneView->draw()" or more 
spesific in



"_localStateSet->setAttribute(getViewport());"



The example code I use is as following:



int CMapRenderThread::InitOpenSceneGraph()

{

  root  = new osg::Group;

  pyramidGeode  = new osg::Geode;

  pyramidGeometry = new osg::Geometry;



  // Associate the pyramid geometry with the pyramid geode

  // Add the pyramid geode to the root node of the scene graph.

  pyramidGeode->addDrawable(pyramidGeometry);

  root->addChild(pyramidGeode);



  // Declare an array of vertices.

  osg::Vec3Array* pyramidVertices = new osg::Vec3Array;

  pyramidVertices->push_back( osg::Vec3( 0, 0, 0) ); // front left

  pyramidVertices->push_back( osg::Vec3(10, 0, 0) ); // front right

  pyramidVertices->push_back( osg::Vec3(10,10, 0) ); // back right

  pyramidVertices->push_back( osg::Vec3( 0,10, 0) ); // back left

  pyramidVertices->push_back( osg::Vec3( 5, 5,10) ); // peak

  pyramidGeometry->setVertexArray( pyramidVertices );



  // Create a primitive set and add it to the pyramid geometry.

  osg::DrawElementsUInt* pyramidBase = new 
osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);

  pyramidBase->push_back(3);

  pyramidBase->push_back(2);

  pyramidBase->push_back(1);

  pyramidBase->push_back(0);

  pyramidGeometry->addPrimitiveSet(pyramidBase);



  // Repeat the same for each of the four sides. Again, vertices are

  // specified in counter-clockwise order.

  osg::DrawElementsUInt* pyramidFaceOne = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceOne->push_back(0);

  pyramidFaceOne->push_back(1);

  pyramidFaceOne->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceOne);



  osg::DrawElementsUInt* pyramidFaceTwo = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceTwo->push_back(1);

  pyramidFaceTwo->push_back(2);

  pyramidFaceTwo->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceTwo);



  osg::DrawElementsUInt* pyramidFaceThree = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceThree->push_back(2);

  pyramidFaceThree->push_back(3);

  pyramidFaceThree->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceThree);



  osg::DrawElementsUInt* pyramidFaceFour = new 
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);

  pyramidFaceFour->push_back(3);

  pyramidFaceFour->push_back(0);

  pyramidFaceFour->push_back(4);

  pyramidGeometry->addPrimitiveSet(pyramidFaceFour);



  // Declare and load an array of Vec4 elements to store colors.

  osg::Vec4Array* colors = new osg::Vec4Array;

  colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red

  colors->push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1 green

  colors->push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2 blue

  colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3 white



  // Declare the variable that will match vertex array elements to color

  // array elements.

  osg::TemplateIndexArray 
*colorIndexArray;

  colorIndexArray = new osg::TemplateIndexArray;

  colorIndexArray->push_back(0); // vertex 0 assigned color array element 0

  colorIndexArray->push_back(1); // vertex 1 assigned color array element 1

  colorIndexArray->push_back(2); // vertex 2 assigned color array element 2

  colorIndexArray->push_back(3); // vertex 3 assigned color array element 3

  colorIndexArray->push_back(0); // vertex 4 assigned c

Re: [osg-users] How to retrieve a U, V texture coordinate from a picking action ?

2008-04-10 Thread Robert Osfield
Hi Jerome,

Have a look at the event handling in the osgmovie example as this does
exactly what you are looking for.

Robert.

On Thu, Apr 10, 2008 at 2:13 PM, Jerome Hummel <
[EMAIL PROTECTED]> wrote:

>  Hi,
>
>
>
> I guess this is a beginner question here but I was wondering if there was
> an easy way to retrieve a u,v coordinate from a ray with osg?
>
>
>
> The use case is the following:
>
> -a 3D Object  is loaded (let's say a cube)
>
> -it is textured with a glsl shader
>
> -The user picks a point on the cube (using the mouse)
>
>
>
> From the 3D point in world coordinate, how can I retrieve the uv point in
> the texture ?
>
> Thanks for your help,
>
>
>
> Regards,
>
> Jerome
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to disable culling of a node

2008-04-10 Thread Robert Osfield
HI Emilo,

You can't switching of OpenGL clipping, you can only move the near and far
planes to encompass you model so it doesn't clip it - its the way that
graphics pipeline in hardware works.  The OSG by default will automatically
compute the near and far planes to prevent clipping, but since you have
switched this off you are on your own, if its clipping then its because
you've set the wrong values.

Robert.

On Thu, Apr 10, 2008 at 1:15 PM, Emilio Lozano <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I'`m trying to get a node always drawn without being affected by near
> clipping plane defined in projection perspective. With the following simple
> code what I expected to get is that the cow was not clipped by near or far
> planes, but the cow is still clipped.
>
> Could you give me any hints?
>
> Thanks in advance to all.
>
> int main( int argc, char **argv )
> {
> osg::ArgumentParser arguments(&argc,argv);
>
> osg::Node* loadedModel = osgDB::readNodeFile("cow.osg");
>
> // Although set as not culled, the model is still culled by near/far
> planes
> loadedModel->setCullingActive (false);
>
> osg::Group* rootnode = new osg::Group();
> rootnode->addChild (loadedModel);
>
> // run optimization over the scene graph
> osgUtil::Optimizer optimzer;
> optimzer.optimize(rootnode);
>
> osgViewer::Viewer viewer;
> viewer.setUpViewInWindow (100, 100, 800, 600, 0);
>
> // set the scene to render
> viewer.setSceneData(rootnode);
>
> viewer.getCamera ()->setProjectionMatrixAsPerspective (30.0, 40.0 /
> 30.0, 50.0, 2000.0);
> viewer.getCamera ()->setComputeNearFarMode
> (osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
>
>
> return viewer.run();
> }
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Set Camera Manipulator coordinates to Geocentric coordinates

2008-04-10 Thread Robert Osfield
Hi CG,

On Thu, Apr 10, 2008 at 10:04 AM, CG <[EMAIL PROTECTED]> wrote:

> How do I set the initial camera manipulator's coordinates to a specific
> Geocentric/Geodetic coordinates (e.g. latitude: 33.3, longitude: -127.0)?
>

You can use the MatrixManipulator::setHomePosition(..) method, this will
take the eye, look and up vector as per gluLookAt.

As for lat/longs this isn't something that
MatrxManipulator::setHomePosition() supports so you'll need to compute this
yourself.  osg::EllipsoidModel could be used to help you.

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


Re: [osg-users] Highly detailed closed scene navigations...

2008-04-10 Thread Robert Osfield
Hi Neil,

PagedLOD is what you need to use to balance the load for really large
databases.  You databases are likely to huge though, gigabytes rather than
terrabytes, and the OSG' paging system allows you to scale to terrabyte
database pretty comfortably so you'll do just fine is you manage the scene
structure well.  Doing it well is not a trivial task though so expect to be
effort in learning about the issues and time experimenting with different
scene graph structures.

You might also want to use some high level cull callbacks that cull
subgraphs based on which room floor you are as this way you can get more
effective culling.  You can enclose each region with its own bounding mesh -
see osgSim::VisibilityGroup for this type of culling.   One thing you want
to be careful about is tricks like relaxing such culling to allow the pager
to start bringing in the new floor level prior to it becoming visible.

Robert.

On Thu, Apr 10, 2008 at 9:33 AM, <[EMAIL PROTECTED]> wrote:

> Hi All,
>
> Not sure if I've got the correct title for this question, but hopefully
> the forum might be able to help.
>
> Suppose that I wish to model a complete office in OSG. The office is on
> two floors, the downstairs split into many rooms, the upstairs open plan.
> Desks, computers, windows, doors and everything that you would find in an
> office needs to be modelled, down to the pencil on the desk and the clutter
> in the corner.
>
> Resource wise we are talking potentially a few thousand models, each with
> two LOD's, all with highly detailed, high resolution textures, and many many
> facets. In fact the design is so big that I can't load it all into memory.
>
> What are my options ?
>
> My client won't accept any delay in transiting from one area of a design
> to the next. So multiple design files for the individual areas seems a non
> starter, unless someone can tell me how I could do this without a delay
> moving from one area to the next. Some form of preemptive loading springs to
> mind, but is there an existing mechanism within OSG for handling that sort
> of thing ?
>
> My thoughts led to the database pager, but I haven't used this at all, and
> would hate to start looking at it only to find a few weeks later that it
> really isn't suitable for my needs.
>
> Can anyone suggest an approach given the constraints please ?
>
> Many thanks
>
> Neil.
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgviewerWx compile errors

2008-04-10 Thread spowers
That did it thanks!

I suspected it was a configure problem.

Steven Powers
General Dynamics Robotic Systems
Software Engineer
1234 Tech Court
Westminster, MD 21157-3029
(410) 876-9200 x3489 Fax:(410)-876-9470



Mario Valle wrote:
> Be sure to configure wxWidgets with OpenGL support.
> Ciao!
> mario
>
>
> spowers wrote:
>> I downloaded wxWidgets 2.8.7 (wxAll) from www.wxwidgets.org.
>>
>> The compile of wxWidgets seemed to work fine.
>> I ran:
>> ./configure
>> make
>> make install
>>
>> and didnt notice any errors
>>
>> I then configured/compiled OSG v2.2
>> cmake ../ -DDYNAMIC_OPENSCENEGRAPH=ON -DDYNAMIC_OPENTHREADS=ON 
>> -DCMAKE_BUILD_TYPE=Debug -DBUILD_OSG_EXAMPLES=ON
>> make
>>
>> and OSG came up with multiple compiler errors when compiling osgviewerWX
>> example WX_GL_DOUBLEBUFFER was not declared in this scope
>> example WX_GL_RGBA was not declared in this scope
>>
>> There are more but they all seem to be related to a faulty 
>> installation of wxWidgets or a bad configuration of OSG.
>>
>> Is there something that I'm missing or possibly a version mismatch?
>>
>> Thanks,
>>
>> -Steve
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>>
>>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph\osgUtil\StateGraph error C2593: 'operator !=' is ambiguous

2008-04-10 Thread Robert Osfield
Compiler? OS? OSG version

As Alberto says the code hasn't changed for a very long time so is likely
just fine, something else outside the OSG is likely to be the cause.

Robert.

On Thu, Apr 10, 2008 at 3:23 AM, IceSharK <[EMAIL PROTECTED]> wrote:

> Hi~All
>
> error C2593: 'operator !=' is ambiguous
>
> OpenSceneGraph\osgUtil\StateGraph
> 217
> 271
>
> for(std::vector::reverse_iterator itr=return_path.rbegin();
> *itr!=return_path.rend();*
> ++itr)
>
> IceSharK
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] runCameraSetUp not called after attaching new images to the camera

2008-04-10 Thread Robert Osfield
Hi Michael,

As Guy says the rendering back end is only doing an internal setup of first
entry into osg::Camera, once the rendering back objects are cached they are
reused.  Setting this cache to NULL will trigger a new update.

Ideally the code should automatically do this though, implementing it will
require adding a dirty mechnism to osg::Camera and the related code in
src/osgUtil/RenderStage.

Robert.

On Thu, Apr 10, 2008 at 12:24 AM, Guerrero, Michael (CIV) <[EMAIL PROTECTED]>
wrote:

>  Hi guys, I'm not sure if this is a bug or I'm not understanding
> something.  The first time I attach images to a camera, the runCameraSetUp
> function will be called in RenderStage which sets up the fbo to harvest the
> data.
>
>
>
> I do the following:
>
>
>
> texCam->attach(osg::Camera::COLOR_BUFFER, mReferenceColorImage);
>
> texCam->attach(osg::Camera::DEPTH_BUFFER, mReferenceDepthImage);
>
>
>
> This works just fine.  The problem is when I want to change the images
> that are attached.  For instance I later have the following:
>
>
>
> texCam->attach(osg::Camera::COLOR_BUFFER, mSceneColorImage);
>
> texCam->attach(osg::Camera::DEPTH_BUFFER, mSceneDepthImage);
>
>
>
> After setting the attachments to new images, runCameraSetUp will never get
> called to set up the frame buffer object.  Is there something I can do to
> make this happen?
>
>
>
> Thanks,
>
> Michael Guerrero
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SceneView error

2008-04-10 Thread Robert Osfield
Hi Erf???

Can't make any sense of your email, and not about to go trying to sieve
through your example code trying to work out what you might mean.

Please try and be specific, tell us what error you get, a compile, and link
error, a runtime error

Also try telling us which version of the OSG you are talking about?  2.x
doesn't have any SceneView examples for instance...

Robert.

On Tue, Apr 8, 2008 at 12:50 PM, <[EMAIL PROTECTED]> wrote:

>  I try to use OpenSceneGraph and SceneView as shown in example when using
> an existing renderer, but get an error when calling "SceneView->draw()" or
> more spesific in
>
>
>
> "_localStateSet->setAttribute(getViewport());"
>
>
>
> The example code I use is as following:
>
>
>
> int CMapRenderThread::InitOpenSceneGraph()
>
> {
>
>   root  = new osg::Group;
>
>   pyramidGeode  = new osg::Geode;
>
>   pyramidGeometry = new osg::Geometry;
>
>
>
>   // Associate the pyramid geometry with the pyramid geode
>
>   // Add the pyramid geode to the root node of the scene graph.
>
>   pyramidGeode->addDrawable(pyramidGeometry);
>
>   root->addChild(pyramidGeode);
>
>
>
>   // Declare an array of vertices.
>
>   osg::Vec3Array* pyramidVertices = new osg::Vec3Array;
>
>   pyramidVertices->push_back( osg::Vec3( 0, 0, 0) ); // front left
>
>   pyramidVertices->push_back( osg::Vec3(10, 0, 0) ); // front right
>
>   pyramidVertices->push_back( osg::Vec3(10,10, 0) ); // back right
>
>   pyramidVertices->push_back( osg::Vec3( 0,10, 0) ); // back left
>
>   pyramidVertices->push_back( osg::Vec3( 5, 5,10) ); // peak
>
>   pyramidGeometry->setVertexArray( pyramidVertices );
>
>
>
>   // Create a primitive set and add it to the pyramid geometry.
>
>   osg::DrawElementsUInt* pyramidBase = 
> newosg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
>
>   pyramidBase->push_back(3);
>
>   pyramidBase->push_back(2);
>
>   pyramidBase->push_back(1);
>
>   pyramidBase->push_back(0);
>
>   pyramidGeometry->addPrimitiveSet(pyramidBase);
>
>
>
>   // Repeat the same for each of the four sides. Again, vertices are
>
>   // specified in counter-clockwise order.
>
>   osg::DrawElementsUInt* pyramidFaceOne = 
> newosg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
>
>   pyramidFaceOne->push_back(0);
>
>   pyramidFaceOne->push_back(1);
>
>   pyramidFaceOne->push_back(4);
>
>   pyramidGeometry->addPrimitiveSet(pyramidFaceOne);
>
>
>
>   osg::DrawElementsUInt* pyramidFaceTwo = 
> newosg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
>
>   pyramidFaceTwo->push_back(1);
>
>   pyramidFaceTwo->push_back(2);
>
>   pyramidFaceTwo->push_back(4);
>
>   pyramidGeometry->addPrimitiveSet(pyramidFaceTwo);
>
>
>
>   osg::DrawElementsUInt* pyramidFaceThree = 
> newosg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
>
>   pyramidFaceThree->push_back(2);
>
>   pyramidFaceThree->push_back(3);
>
>   pyramidFaceThree->push_back(4);
>
>   pyramidGeometry->addPrimitiveSet(pyramidFaceThree);
>
>
>
>   osg::DrawElementsUInt* pyramidFaceFour = 
> newosg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
>
>   pyramidFaceFour->push_back(3);
>
>   pyramidFaceFour->push_back(0);
>
>   pyramidFaceFour->push_back(4);
>
>   pyramidGeometry->addPrimitiveSet(pyramidFaceFour);
>
>
>
>   // Declare and load an array of Vec4 elements to store colors.
>
>   osg::Vec4Array* colors = new osg::Vec4Array;
>
>   colors->push_back(osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f) ); //index 0 red
>
>   colors->push_back(osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) ); //index 1
> green
>
>   colors->push_back(osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f) ); //index 2
> blue
>
>   colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f) ); //index 3
> white
>
>
>
>   // Declare the variable that will match vertex array elements to
> color
>
>   // array elements.
>
>   osg::TemplateIndexArray
> *colorIndexArray;
>
>   colorIndexArray = new osg::TemplateIndexArray osg::Array::UIntArrayType,4,4>;
>
>   colorIndexArray->push_back(0); // vertex 0 assigned color array
> element 0
>
>   colorIndexArray->push_back(1); // vertex 1 assigned color array
> element 1
>
>   colorIndexArray->push_back(2); // vertex 2 assigned color array
> element 2
>
>   colorIndexArray->push_back(3); // vertex 3 assigned color array
> element 3
>
>   colorIndexArray->push_back(0); // vertex 4 assigned color array
> element 0
>
>
>
>   // The next step is to associate the array of colors with the
> geometry,
>
>   // assign the color indices created above to the geometry and set
> the
>
>   // binding mode to BIND_PER_VERTEX.
>
>   pyramidGeometry->setColorArray(colors);
>
>   pyramidGeometry->setColorIndices(colorIndexArray);
>
>   pyramidGeometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
>
>
>
>   // Declare and initial

Re: [osg-users] RenderingHint and CompositeViewer

2008-04-10 Thread Robert Osfield
Hi John,

I really don't know enough about the specifics of what you are doing and why
to know what the best way to tackle the problem is.

In your app you have full control over the frame loop, so you can place you
updates in the main loop before the viewer.renderingTraversals(), its the
renderingTraversals() that kicks off the cull and draw traversals.

Or you could simply use an update callback on each individual object you
want to control, or just have a single high level update callback that
updates all the individual objects itself.

Robert.

On Wed, Apr 9, 2008 at 10:52 PM, Argentieri, John-P63223 <
[EMAIL PROTECTED]> wrote:

>  Just looking around for an alternative, it looks like I'd have to set an
> UpdateCallback on all of the nodes, that contains a map from the
> osgViewer::View's Scene's UpdateVisitor to the states of the nodes in that
> Scene. I think this will work because the update traversal occurs before the
> cull traversal, and the cull traversal is the one that generates bins, no? I
> can check the NodeVisitor, if it is a UpdateVisitor of one of the scenes,
> then I apply those states to the node from the map. If I set a rendering
> hint to transparent at this time, then the rendering traversal should
> respect my setting, right?
>
> If this will work, I'll consider using osgViewer::CompositeViewer here.
> Can anyone confirm?
> **
> *John Argentieri*
> *Software Engineer*
> *GENERAL DYNAMICS*
> *C4 Systems *
> *(407) 281-5568*
> [EMAIL PROTECTED]
>
> *"This email message is for the sole use of the intended recipient(s) and
> may contain GDC4S confidential or privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not an
> intended recipient, please contact the sender by reply email and destroy all
> copies of the original message.*"
>
>  --
>  *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Argentieri,
> John-P63223
> *Sent:* Wednesday, April 09, 2008 4:14 PM
> *To:* [EMAIL PROTECTED]
> *Subject:* [osg-users] RenderingHint and CompositeViewer
>
>  Robert,
>
> There's one thing that I haven't been able to do with CompositeViewer.
> Previously, we had a predraw callback that occurred before the sceneview's
> update(), cull(), draw() calls. In that callback, we set some states on some
> objects, particularly if they are opaque/transparent in that view. With
> CompositeViewer, I've used the Camera's PreDrawCallback, but at that point
> it's too late to set the object's renderinghint to transparent. Is there
> something else I can do to get the effect that I want? The CompositeViewer
> is rendering all the views, so how do I issue a callback at the time that I
> need to?
>
> John
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] faster builds on multiproc systems - VisualStudio2005& 2008

2008-04-10 Thread sherman wilcox
Gordon - I do wonder if you disabled parallel project builds and
enabled /MP if the problems you experience would vanish. But, how much
would that hurt performance? That is, which is the bigger performance
boon - /MP or parallel builds.

On Thu, Apr 10, 2008 at 10:20 AM, Gordon Tomlinson
<[EMAIL PROTECTED]> wrote:
> Hi Mike
>
> Yes repeating can make the build work in most cases but not all
>
> We have some very large solutions and lots of dependencies, so there's
> certainly room to stretch this, but we have seen issues on small solutions
> as well
>
> As said for use it could be a combination of our environment with Network,
> and ClearCase which can be an issue as most of the source will live in
> ClearCase VOBS etc..
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
>
> [mailto:[EMAIL PROTECTED] On Behalf Of Mike
> Weiblen
> Sent: Thursday, April 10, 2008 11:13 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] faster builds on multiproc systems -
> VisualStudio2005& 2008
>
> Hi Gordon,
>
> So can good binaries be made by just repeating the build until successful
> completion, to bypass race issues?
> Or is there the more nefarious failure of bad binaries being created by an
> otherwise successful-looking process?
>
> -- mew
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:osg-users-
> > [EMAIL PROTECTED] On Behalf Of Gordon Tomlinson
> > Sent: Thursday, April 10, 2008 10:04 AM
> > To: 'OpenSceneGraph Users'
> > Subject: Re: [osg-users] faster builds on multiproc systems - Visual
> > Studio2005& 2008
> >
> > Hi Sherman
> >
> > For us he problems with the linker often not syncing correctly with
> the
> > compiler
> >
> > Then issue when adding manifests once linked would often have timing
> > issues and the process could fail ( not always )
> >
> > And when doing post build steps such as singing assemblies etc the
> > timing again would often be off and the process could fail ( not
> > always )
> >
> > This could be just our environment and ClearCase and maybe network
> > issues etc.
> >
> > Seems for others things work fine
> >
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > sherman wilcox
> > Sent: Wednesday, April 09, 2008 4:34 PM
> > To: OpenSceneGraph Users
> > Subject: [osg-users] faster builds on multiproc systems - Visual
> Studio
> > 2005& 2008
> >
> > This is sort of off-topic but I'm sure interesting to the community
> > none the less. I was on the phone with a fellow OSG developer earlier
> > today complaining how slow the builds are on Windows and how I have
> > this
> quad
> > core
> > sitting here not being fully utilized by my compiler.
> > He touted how his Mac could perform parallel builds and how much
> faster
> > it
> > was. So off I went to see if there's a way to do this with my
> compiler,
> > Visual Studio 2005. Lo and behold I found an undocumented way to
> enable
> > multi-processor builds using VS 2005. I couldn't believe it. It was
> > like someone gave me a gift.
> >
> >
> > http://blog.280z28.org/archives/2007/10/17/
> >
> > http://lahsiv.net/blog/?p=40
> >
> > So, could some of you guys try this as well and let me know how you
> get
> > on?
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> > openscenegraph.org
> >
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> > openscenegraph.org
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgviewerWx compile errors

2008-04-10 Thread Mario Valle
Be sure to configure wxWidgets with OpenGL support.
Ciao!
mario


spowers wrote:
> I downloaded wxWidgets 2.8.7 (wxAll) from www.wxwidgets.org.
> 
> The compile of wxWidgets seemed to work fine.
> I ran:
> ./configure
> make
> make install
> 
> and didnt notice any errors
> 
> I then configured/compiled OSG v2.2
> cmake ../ -DDYNAMIC_OPENSCENEGRAPH=ON -DDYNAMIC_OPENTHREADS=ON 
> -DCMAKE_BUILD_TYPE=Debug -DBUILD_OSG_EXAMPLES=ON
> make
> 
> and OSG came up with multiple compiler errors when compiling osgviewerWX
> example WX_GL_DOUBLEBUFFER was not declared in this scope
> example WX_GL_RGBA was not declared in this scope
> 
> There are more but they all seem to be related to a faulty installation 
> of wxWidgets or a bad configuration of OSG.
> 
> Is there something that I'm missing or possibly a version mismatch?
> 
> Thanks,
> 
> -Steve
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

-- 
Ing. Mario Valle
Data Analysis and Visualization Services | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)  | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] using Shader file call - what Shader version

2008-04-10 Thread Mike Weiblen
ok, a couple datapoints: the .osg format parser:
1) is case-sensitive
2) silently ignores anything is doesn't recognize.

Your example shows "File" when the actual keyword is "file".

Excerpt from the glsl_simple.osg example:

Shader {
  DataVariance DYNAMIC
  type VERTEX
  file shaders/shader.vert
}

-- mew


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Mike Weiblen
> Sent: Thursday, April 10, 2008 10:08 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] using Shader file call - what Shader version
> 
> Hi
> 
> "no luck" meaning what exactly?  file not found, shader code not
> loading
> correctly, .osg file parse error, etc?
> 
> if the former, do you have the OSG file path set so the file can be
> found?
> 
> -- mew
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:osg-users-
> > [EMAIL PROTECTED] On Behalf Of Dunhour, Mike (CIV)
> > Sent: Wednesday, April 09, 2008 8:55 PM
> > To: OpenSceneGraph Users
> > Subject: [osg-users] using Shader file call - what Shader version
> >
> ...
> > Still no luck getting a Shader to be called from a .osg file, but
was
> > told that calling up a Shader file with
> >
> > Shader {
> >
> >   File "do.frag"

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


Re: [osg-users] osg Image data

2008-04-10 Thread Gordon Tomlinson
HI
 
RGB can be saved to Jpegs straight forwardly using  the jpeg library, never
used the OSG write though always done this myself
you have to make sure you set the right format etc and the image if coming
from OGL may have to be sent bottom to top instead 
of top to bottom
 
Don't have access to code I can post write now
 
G.

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jean-Baptiste Authesserre
Sent: Thursday, April 10, 2008 8:08 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg Image data


Hi,

Have you tried to store your mage in an other format than jpg?
I have also difficulties to store in jpg format. I personally store
screenshots of a 3D scene, and it works well when I use png format, or bmp
format, but not with the jpg format. 

Maybe the libjpeg used by osg don't work with RGB image?

Jean-Baptiste.




2008/4/10, Vincent Bourdier <[EMAIL PROTECTED]>: 

Hi All,

I have a problem concerning writing image data.

My code is simple : 



const long size = _x*_y*3;

unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned
char));

for(long i=0; i < size ; i+= 3)
{
data[i] = 0;//red
data[i+1] = 0;//green
data[i+2] =0;//blue
}

osg::ref_ptr image = new osg::Image;
image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels on the
Bottom left of the picture
image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT, data,
osg::Image::NO_DELETE);

osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");




the result must be a black picture... but I've a totally different result
(see attached file)

Does anyone see a mistake ?

Thanks.

Regards,
   Vincent.

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





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


[osg-users] osgviewerWx compile errors

2008-04-10 Thread spowers
I downloaded wxWidgets 2.8.7 (wxAll) from www.wxwidgets.org.

The compile of wxWidgets seemed to work fine.
I ran:
./configure
make
make install

and didnt notice any errors

I then configured/compiled OSG v2.2
cmake ../ -DDYNAMIC_OPENSCENEGRAPH=ON -DDYNAMIC_OPENTHREADS=ON 
-DCMAKE_BUILD_TYPE=Debug -DBUILD_OSG_EXAMPLES=ON
make

and OSG came up with multiple compiler errors when compiling osgviewerWX
example WX_GL_DOUBLEBUFFER was not declared in this scope
example WX_GL_RGBA was not declared in this scope

There are more but they all seem to be related to a faulty installation 
of wxWidgets or a bad configuration of OSG.

Is there something that I'm missing or possibly a version mismatch?

Thanks,

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


Re: [osg-users] faster builds on multiproc systems - VisualStudio2005& 2008

2008-04-10 Thread Gordon Tomlinson
Hi Mike

Yes repeating can make the build work in most cases but not all 

We have some very large solutions and lots of dependencies, so there's
certainly room to stretch this, but we have seen issues on small solutions
as well

As said for use it could be a combination of our environment with Network,
and ClearCase which can be an issue as most of the source will live in
ClearCase VOBS etc..



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Weiblen
Sent: Thursday, April 10, 2008 11:13 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] faster builds on multiproc systems -
VisualStudio2005& 2008

Hi Gordon,

So can good binaries be made by just repeating the build until successful
completion, to bypass race issues?  
Or is there the more nefarious failure of bad binaries being created by an
otherwise successful-looking process?

-- mew


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users- 
> [EMAIL PROTECTED] On Behalf Of Gordon Tomlinson
> Sent: Thursday, April 10, 2008 10:04 AM
> To: 'OpenSceneGraph Users'
> Subject: Re: [osg-users] faster builds on multiproc systems - Visual 
> Studio2005& 2008
> 
> Hi Sherman
> 
> For us he problems with the linker often not syncing correctly with
the
> compiler
> 
> Then issue when adding manifests once linked would often have timing 
> issues and the process could fail ( not always )
> 
> And when doing post build steps such as singing assemblies etc the 
> timing again would often be off and the process could fail ( not 
> always )
> 
> This could be just our environment and ClearCase and maybe network 
> issues etc.
> 
> Seems for others things work fine
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> sherman wilcox
> Sent: Wednesday, April 09, 2008 4:34 PM
> To: OpenSceneGraph Users
> Subject: [osg-users] faster builds on multiproc systems - Visual
Studio
> 2005& 2008
> 
> This is sort of off-topic but I'm sure interesting to the community 
> none the less. I was on the phone with a fellow OSG developer earlier 
> today complaining how slow the builds are on Windows and how I have 
> this
quad
> core
> sitting here not being fully utilized by my compiler.
> He touted how his Mac could perform parallel builds and how much
faster
> it
> was. So off I went to see if there's a way to do this with my
compiler,
> Visual Studio 2005. Lo and behold I found an undocumented way to
enable
> multi-processor builds using VS 2005. I couldn't believe it. It was 
> like someone gave me a gift.
> 
> 
> http://blog.280z28.org/archives/2007/10/17/
> 
> http://lahsiv.net/blog/?p=40
> 
> So, could some of you guys try this as well and let me know how you
get
> on?
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] faster builds on multiproc systems - Visual Studio2005& 2008

2008-04-10 Thread Mike Weiblen
Hi Gordon,

So can good binaries be made by just repeating the build until
successful completion, to bypass race issues?  
Or is there the more nefarious failure of bad binaries being created by
an otherwise successful-looking process?

-- mew


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Gordon Tomlinson
> Sent: Thursday, April 10, 2008 10:04 AM
> To: 'OpenSceneGraph Users'
> Subject: Re: [osg-users] faster builds on multiproc systems - Visual
> Studio2005& 2008
> 
> Hi Sherman
> 
> For us he problems with the linker often not syncing correctly with
the
> compiler
> 
> Then issue when adding manifests once linked would often have timing
> issues
> and the process could fail ( not always )
> 
> And when doing post build steps such as singing assemblies etc the
> timing
> again would often be off and the process could fail ( not always )
> 
> This could be just our environment and ClearCase and maybe network
> issues
> etc.
> 
> Seems for others things work fine
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> sherman
> wilcox
> Sent: Wednesday, April 09, 2008 4:34 PM
> To: OpenSceneGraph Users
> Subject: [osg-users] faster builds on multiproc systems - Visual
Studio
> 2005& 2008
> 
> This is sort of off-topic but I'm sure interesting to the community
> none the
> less. I was on the phone with a fellow OSG developer earlier today
> complaining how slow the builds are on Windows and how I have this
quad
> core
> sitting here not being fully utilized by my compiler.
> He touted how his Mac could perform parallel builds and how much
faster
> it
> was. So off I went to see if there's a way to do this with my
compiler,
> Visual Studio 2005. Lo and behold I found an undocumented way to
enable
> multi-processor builds using VS 2005. I couldn't believe it. It was
> like
> someone gave me a gift.
> 
> 
> http://blog.280z28.org/archives/2007/10/17/
> 
> http://lahsiv.net/blog/?p=40
> 
> So, could some of you guys try this as well and let me know how you
get
> on?
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to retrieve a U, V texture coordinate from a picking action ?

2008-04-10 Thread Gordon Tomlinson
I thought one of Roberts examples shows this ( cannot rightly remember which
though), but I think that is with fix pipe line textures


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Art Tevs
Sent: Thursday, April 10, 2008 9:21 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to retrieve a U,V texture coordinate from a
picking action ?

Hi Jerome,

what you want to do is not an easy task. However here is a simple todo list
to achieve that:

- find intersection of the ray and a triangle
- the intersection computatiuon would give you back the barycentric
coordinates of the intersection point in the triangle domain
- use this coordinates and the uv coordinates of the vertices of the
triangle to interpolate the uv coordinates of the intersection point
(bilinear
interpolation)

Osg does already provide a capability to find the intersection between the
ray and geometry. However I am not sure if barycentric coordinates are also
provided or if you have to write your own intersector
;-)

Best regards,
Art



> Hi,
> 
>  
> 
> I guess this is a beginner question here but I was wondering if there 
> was an easy way to retrieve a u,v coordinate from a ray with osg?
> 
>  
> 
> The use case is the following:
> 
> -a 3D Object  is loaded (let's say a cube)
> 
> -it is textured with a glsl shader
> 
> -The user picks a point on the cube (using the
> mouse)
> 
>  
> 
> >From the 3D point in world coordinate, how can I
> retrieve the uv point in
> the texture ?
> 
> Thanks for your help,
> 
>  
> 
> Regards,
> 
> Jerome
> 
> > ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 



  __
Gesendet von Yahoo! Mail.
Der Lieblings-Mailbox der Welt.
http://de.overview.mail.yahoo.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] using Shader file call - what Shader version

2008-04-10 Thread Mike Weiblen
Hi

"no luck" meaning what exactly?  file not found, shader code not loading
correctly, .osg file parse error, etc?

if the former, do you have the OSG file path set so the file can be
found?

-- mew


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Dunhour, Mike (CIV)
> Sent: Wednesday, April 09, 2008 8:55 PM
> To: OpenSceneGraph Users
> Subject: [osg-users] using Shader file call - what Shader version
> 
...
> Still no luck getting a Shader to be called from a .osg file, but was
> told that calling up a Shader file with
> 
> Shader {
> 
>   File "do.frag"
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] faster builds on multiproc systems - Visual Studio 2005& 2008

2008-04-10 Thread Gordon Tomlinson
Hi Sherman

For us he problems with the linker often not syncing correctly with the
compiler

Then issue when adding manifests once linked would often have timing issues
and the process could fail ( not always )

And when doing post build steps such as singing assemblies etc the timing
again would often be off and the process could fail ( not always )

This could be just our environment and ClearCase and maybe network issues
etc.

Seems for others things work fine

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sherman
wilcox
Sent: Wednesday, April 09, 2008 4:34 PM
To: OpenSceneGraph Users
Subject: [osg-users] faster builds on multiproc systems - Visual Studio
2005& 2008

This is sort of off-topic but I'm sure interesting to the community none the
less. I was on the phone with a fellow OSG developer earlier today
complaining how slow the builds are on Windows and how I have this quad core
sitting here not being fully utilized by my compiler.
He touted how his Mac could perform parallel builds and how much faster it
was. So off I went to see if there's a way to do this with my compiler,
Visual Studio 2005. Lo and behold I found an undocumented way to enable
multi-processor builds using VS 2005. I couldn't believe it. It was like
someone gave me a gift.


http://blog.280z28.org/archives/2007/10/17/

http://lahsiv.net/blog/?p=40

So, could some of you guys try this as well and let me know how you get on?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] VPB ERROR 4: ".dem" not recognised as a supported file format

2008-04-10 Thread Jason Beverage
Hi Luis,

Are you sure that the version of GDAL you're calling gdalinfo with is the
same as the version linked with VPB and OSG?

Jason

On Wed, Apr 9, 2008 at 8:06 PM, Luis Alberto Camacho Girones <
[EMAIL PROTECTED]> wrote:

>  Hi, I am trying to use the SVN version (April 09, 2008) of Virtual Planet
> Builder on Windows XP. I use the svn version of OSG too.
>
> I used the following
>
> osgdem -l 3 -d e020n40.dem -o e020n40.ive
>
> And the result is:
>
> -d e020n40.dem
> -o e020n40.ive
> Adding terrainTile
> DataSet::_run<> 0 0
> ERROR 4: "e020n40.dem" not recognised  as a supported file format
>
> I have seen (gdalinfo --formats) that USGSDEM is a format supported by
> GDAL.
> The file "e020n40.dem" isn´t corrupt (i´ve tested it several times). I
> have tested with other file but in HGT format, and
> everything is ok.
> I tried to use the 0.9.1 version of VPB and i had the same problem.
> The examples that i have seen always use .tif format. Maybe, i have to
> translate (using gdal_translate) the .dem format to a .tif format?...
> Anybody got ideas for more tests I can run to pin down the problem?
> Thanks in advance!
>
> --
> Sigue de cerca las últimas tendencias y lo que más rompe MSN 
> Vídeo
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] examples bugs ?

2008-04-10 Thread J.P. Delport
Hi all,

Jean-Sébastien Guay wrote:
> Hi Frédéric,
> 
>> Concerning the depthpeeling example, I also tryed it under linux with a 
>> nvidia graphic card Quadro FX 3450/4000 SDI and it doesn't seem to work 
>> either ...
> 
> Just tried it on my machine, GeForce 8800GTX on Vista, and it ran at a 
> steady 60FPS (locked at vsync) and seemed to work. Though I'm running 
> OSG from SVN so there might have been some fixes between 2.2 and now.

On my laptop osgdepthpeeling cessna.osg provides a staggering 0.1fps :) 
Linux 169.12 NVidia driver, svn osg. It works fine on more powerful 
cards for me too.

> 
> Not sure how the Quadro model numbers relate to GeForce cards. It could 
> also be your Linux nVidia drivers, are they up to date? Too many 
> unknowns to say for sure.
> 
> J-S

jp

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


Re: [osg-users] examples bugs ?

2008-04-10 Thread Jean-Sébastien Guay
Hi Frédéric,

> Concerning the depthpeeling example, I also tryed it under linux with a 
> nvidia graphic card Quadro FX 3450/4000 SDI and it doesn't seem to work 
> either ...

Just tried it on my machine, GeForce 8800GTX on Vista, and it ran at a 
steady 60FPS (locked at vsync) and seemed to work. Though I'm running 
OSG from SVN so there might have been some fixes between 2.2 and now.

Not sure how the Quadro model numbers relate to GeForce cards. It could 
also be your Linux nVidia drivers, are they up to date? Too many 
unknowns to say for sure.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] examples bugs ?

2008-04-10 Thread Frédéric SPEISSER
Thank you,

Concerning the depthpeeling example, I also tryed it under linux with a 
nvidia graphic card Quadro FX 3450/4000 SDI and it doesn't seem to work 
either ...


Jean-Sébastien Guay a écrit :
> Bonjour Frédéric,
>
>   
>> If it can help, I have a mobility radeon 9000 as graphic card.
>> 
>
> The Mobility Radeon 9000 will not support shadows (I think even in the 
> fixed pipeline) since it has very limited FBO and pbuffer support. I 
> have a laptop with a Mobility Radeon 9600 and it doesn't support them 
> either. The RTT code has fallbacks, but apparently if none of the 
> fallbacks work it will just do nothing (not even display an error message).
>
> For the QT example I don't know. For the depth peeling one it could also 
> be a video card support issue.
>
> J-S
>   

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


Re: [osg-users] examples bugs ?

2008-04-10 Thread J.P. Delport
Hi,

the depthpeel example executes extremely slowly on my PC (GeForce Go 
7400), so you need a powerful card as far as I know.

jp

Frédéric SPEISSER wrote:
> Hello everyone !
> 
> * Firsteval,
> I recently installed OpenSceneGraph 2.2 with Mingw under Windows XP pro. 
> The installation worked without any problems and most of the examples 
> are running well but,
> I have problems with two examples :
>  - osgshadow where I cannot see the shadows
>  - osgviewerQT which crashes with a window pop up dialog box and the 
> message "the application could not initialize properly (0xc0005)"
> 
> If it can help, I have a mobility radeon 9000 as graphic card.
> 
> * Secondly,
> Since I'm interested in order-independent transparency, I've tryed to 
> launch osgdepthpeeling example and the example seems to freeze under 
> linux AND windows.
> 
> 
> Has someone already encountered same problems ? Could someone give me a 
> clue how to resolve these bugs ?
> 
> 
> Thank you all,
> 
> Frédéric.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


Re: [osg-users] examples bugs ?

2008-04-10 Thread Jean-Sébastien Guay
Bonjour Frédéric,

> If it can help, I have a mobility radeon 9000 as graphic card.

The Mobility Radeon 9000 will not support shadows (I think even in the 
fixed pipeline) since it has very limited FBO and pbuffer support. I 
have a laptop with a Mobility Radeon 9600 and it doesn't support them 
either. The RTT code has fallbacks, but apparently if none of the 
fallbacks work it will just do nothing (not even display an error message).

For the QT example I don't know. For the depth peeling one it could also 
be a video card support issue.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] examples bugs ?

2008-04-10 Thread Frédéric SPEISSER
Hello everyone !

* Firsteval,
I recently installed OpenSceneGraph 2.2 with Mingw under Windows XP pro. 
The installation worked without any problems and most of the examples 
are running well but,
I have problems with two examples :
 - osgshadow where I cannot see the shadows
 - osgviewerQT which crashes with a window pop up dialog box and the 
message "the application could not initialize properly (0xc0005)"

If it can help, I have a mobility radeon 9000 as graphic card.

* Secondly,
Since I'm interested in order-independent transparency, I've tryed to 
launch osgdepthpeeling example and the example seems to freeze under 
linux AND windows.


Has someone already encountered same problems ? Could someone give me a 
clue how to resolve these bugs ?


Thank you all,

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


Re: [osg-users] How to retrieve a U, V texture coordinate from a picking action ?

2008-04-10 Thread Art Tevs
Hi Jerome,

what you want to do is not an easy task. However here
is a simple todo list to achieve that:

- find intersection of the ray and a triangle
- the intersection computatiuon would give you back
the barycentric coordinates of the intersection point
in the triangle domain
- use this coordinates and the uv coordinates of the
vertices of the triangle to interpolate the uv
coordinates of the intersection point (bilinear
interpolation)

Osg does already provide a capability to find the
intersection between the ray and geometry. However I
am not sure if barycentric coordinates are also
provided or if you have to write your own intersector
;-)

Best regards,
Art



> Hi,
> 
>  
> 
> I guess this is a beginner question here but I was
> wondering if there was an
> easy way to retrieve a u,v coordinate from a ray
> with osg?
> 
>  
> 
> The use case is the following:
> 
> -a 3D Object  is loaded (let's say a cube)
> 
> -it is textured with a glsl shader
> 
> -The user picks a point on the cube (using the
> mouse)
> 
>  
> 
> >From the 3D point in world coordinate, how can I
> retrieve the uv point in
> the texture ?
> 
> Thanks for your help,
> 
>  
> 
> Regards,
> 
> Jerome
> 
> > ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 



  __
Gesendet von Yahoo! Mail.
Der Lieblings-Mailbox der Welt.
http://de.overview.mail.yahoo.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Multitexturing using shader

2008-04-10 Thread Johan Johnsson
Thank you very much for this awsome help dude !
Everything works as intended now ! :)

Mr. Johan Johnsson
Software Engineer / Computer Game Programmer
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no.


-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av J.P. Delport
Sendt: 10. april 2008 14:09
Til: OpenSceneGraph Users
Emne: Re: [osg-users] Multitexturing using shader

Hi,

you can supply uniforms to the shaders to point to your bounded 
textures, e.g.

(this is from the osgmultiplerendertargets example in svn)

in the shader:

uniform sampler2DRect textureID0;
uniform sampler2DRect textureID1;
uniform sampler2DRect textureID2;
uniform sampler2DRect textureID3;
void main(void)
{
gl_FragData[0] =
vec4(texture2DRect( textureID0, gl_TexCoord[0].st).rgb,1) +
vec4(texture2DRect( textureID1, gl_TexCoord[0].st ).rgb, 1) +
vec4(texture2DRect( textureID2, gl_TexCoord[0].st ).rgb, 1) +
-0.5*vec4(texture2DRect( textureID3, gl_TexCoord[0].st ).rgb, 1);
}

in the code:
  stateset->addUniform(new osg::Uniform("textureID0", 0));
  stateset->addUniform(new osg::Uniform("textureID1", 1));
  stateset->addUniform(new osg::Uniform("textureID2", 2));
  stateset->addUniform(new osg::Uniform("textureID3", 3));

hope it helps.

jp

Johan Johnsson wrote:
> Hi !
> 
>  
> 
> I am developing a shader and need to have acess to the optional textures 
> which is affected by the coordinates in tgl_TexCoord[1].
> 
> How do i do this, how do i send the second texture from the ive file 
> (the shadow map) into the shader, or how do i reach it in the shader if 
> its passed in automatic? should i set something in the stateset of the 
> specific node i run the shader on?
> 
>  
> 
> Tnx for advices.
> 
>  
> 
>  
> 
> // shaders without unreleveant code.
> 
> // vertex
> 
> void main()
> 
> {
> 
> gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
> 
> gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;
> 
> }
> 
>  
> 
> // fragment
> 
> void main()
> 
> {
> 
> vec4 color = texture2D(tex,   gl_TexCoord[0].st);
> 
> vec4 map  = texture2D(tex1, gl_TexCoord[1].st);
> 
> }
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


[osg-users] How to retrieve a U, V texture coordinate from a picking action ?

2008-04-10 Thread Jerome Hummel
Hi,

 

I guess this is a beginner question here but I was wondering if there was an
easy way to retrieve a u,v coordinate from a ray with osg?

 

The use case is the following:

-a 3D Object  is loaded (let's say a cube)

-it is textured with a glsl shader

-The user picks a point on the cube (using the mouse)

 

>From the 3D point in world coordinate, how can I retrieve the uv point in
the texture ?

Thanks for your help,

 

Regards,

Jerome

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


Re: [osg-users] faster builds on multiproc systems - Visual Studio 2005 & 2008

2008-04-10 Thread Jean-Sébastien Guay
Hi Brede,

> It's possible to set the maximum number of parallel builds under
> Tools->Options->Projects and Solutions->Build and Run.  This is for
> VS2008 but you should find it in a similar place in VS2005. This is a
> global setting so you don't have to change your project settings.

This setting enables building of multiple *projects* in parallel, as 
long as they don't have a dependency. This is enabled by default on 
multiproc / multicore systems.

What they are talking about with the /MP compiler flag is taking 
advantage of multiple CPUs/cores within a *single* project. Since the 
main time sinks when compiling OSG are the 2-3 main projects (osg, 
osgUtil, osgDB, ...), and all projects depend on them (therefore no 
other projects can be built in parallel), I can see where that kind of a 
flag would help. (if there are no other ill effects)

More testing is required I think, but it would be a cool addition to the 
default build options since multicore machines are so common these days.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Directory not found

2008-04-10 Thread Mattias Helsing
Hi Renan

As Guy wrote in a previous msg, using Tools-Options-Projects and
solutions-VC++ Directories will make your settings available to all (c++)
projects you ever open with VS, while adding to the projects props only
affect that project.
Successfully building osg is no guarantee that you had Tools->Options paths
configured correctly since osg don't need them. The CMake configuration
files make sure that osg projects get all paths set in the project
properties (unless you are building a really old version).
If you still need help send (off list) .vcproj, the location of your
openscenegraph include dir and the paths you have set in Tools->Options

regards,
Mattias

On Wed, Apr 9, 2008 at 12:07 PM, Renan Mendes <[EMAIL PROTECTED]>
wrote:

> The strange thing, Mattias, was that I had them all configured from the
> beginning. All my paths in vc++ directories were correctly added, but the
> building only worked when I've addeed the paths in the project properties.
> Again, what is the vc++ directories-adding-paths for?
>
> Renan
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to disable culling of a node

2008-04-10 Thread J.P. Delport
Hi,

Emilio Lozano wrote:
> Hi all,
> 
> I'`m trying to get a node always drawn without being affected by near 
> clipping plane defined in projection perspective. With the following 
> simple code what I expected to get is that the cow was not clipped by 
> near or far planes, but the cow is still clipped.
> 
> Could you give me any hints?
> 
> Thanks in advance to all.
> 
> int main( int argc, char **argv )
> {
> osg::ArgumentParser arguments(&argc,argv);
> 
> osg::Node* loadedModel = osgDB::readNodeFile("cow.osg");
>  
> // Although set as not culled, the model is still culled by near/far 
> planes
the model is still clipped...

> loadedModel->setCullingActive (false);
> 
> osg::Group* rootnode = new osg::Group();
> rootnode->addChild (loadedModel);
> 
> // run optimization over the scene graph
> osgUtil::Optimizer optimzer;
> optimzer.optimize(rootnode);
>
> osgViewer::Viewer viewer;
> viewer.setUpViewInWindow (100, 100, 800, 600, 0);
>   
> // set the scene to render
> viewer.setSceneData(rootnode);
> 
> viewer.getCamera ()->setProjectionMatrixAsPerspective (30.0, 40.0 / 
> 30.0, 50.0, 2000.0);
> viewer.getCamera ()->setComputeNearFarMode 
> (osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
> 
> 
> return viewer.run();
> }
> 
OSG->culling
OpenGL->clipping

If you want the cow, it'll have to be between the front/back clip planes 
of some camera along the way. E.g. you could draw the cow to a texture 
(it must be in the clipping planes) and paste is over your scene if you 
do not want the cow to influence the clipping of the rest of your scene.

jp

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

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


Re: [osg-users] osg Image data

2008-04-10 Thread Jean-Baptiste Authesserre
ok, i don't have seen the different answers...

sorry

Jean-Bapriste

2008/4/10, Jean-Baptiste Authesserre <[EMAIL PROTECTED]>:
>
> Hi,
>
> Have you tried to store your mage in an other format than jpg?
> I have also difficulties to store in jpg format. I personally store
> screenshots of a 3D scene, and it works well when I use png format, or bmp
> format, but not with the jpg format.
>
> Maybe the libjpeg used by osg don't work with RGB image?
>
> Jean-Baptiste.
>
>
>
> 2008/4/10, Vincent Bourdier <[EMAIL PROTECTED]>:
> >
> > Hi All,
> >
> > I have a problem concerning writing image data.
> >
> > My code is simple :
> >
> > const long size = _x*_y*3;
> > >
> > > unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned
> > > char));
> > >
> > > for(long i=0; i < size ; i+= 3)
> > > {
> > > data[i] = 0;//red
> > > data[i+1] = 0;//green
> > > data[i+2] =0;//blue
> > > }
> > >
> > > osg::ref_ptr image = new osg::Image;
> > > image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> > > image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels
> > > on the Bottom left of the picture
> > > image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT,
> > > data, osg::Image::NO_DELETE);
> > >
> > > osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
> > >
> >
> >
> > the result must be a black picture... but I've a totally different
> > result (see attached file)
> >
> > Does anyone see a mistake ?
> >
> > Thanks.
> >
> > Regards,
> >Vincent.
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> >
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to disable culling of a node

2008-04-10 Thread Emilio Lozano
Hi all,

I'`m trying to get a node always drawn without being affected by near
clipping plane defined in projection perspective. With the following simple
code what I expected to get is that the cow was not clipped by near or far
planes, but the cow is still clipped.

Could you give me any hints?

Thanks in advance to all.

int main( int argc, char **argv )
{
osg::ArgumentParser arguments(&argc,argv);

osg::Node* loadedModel = osgDB::readNodeFile("cow.osg");

// Although set as not culled, the model is still culled by near/far
planes
loadedModel->setCullingActive (false);

osg::Group* rootnode = new osg::Group();
rootnode->addChild (loadedModel);

// run optimization over the scene graph
osgUtil::Optimizer optimzer;
optimzer.optimize(rootnode);

osgViewer::Viewer viewer;
viewer.setUpViewInWindow (100, 100, 800, 600, 0);

// set the scene to render
viewer.setSceneData(rootnode);

viewer.getCamera ()->setProjectionMatrixAsPerspective (30.0, 40.0 /
30.0, 50.0, 2000.0);
viewer.getCamera ()->setComputeNearFarMode
(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);


return viewer.run();
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Multitexturing using shader

2008-04-10 Thread J.P. Delport
Hi,

you can supply uniforms to the shaders to point to your bounded 
textures, e.g.

(this is from the osgmultiplerendertargets example in svn)

in the shader:

uniform sampler2DRect textureID0;
uniform sampler2DRect textureID1;
uniform sampler2DRect textureID2;
uniform sampler2DRect textureID3;
void main(void)
{
gl_FragData[0] =
vec4(texture2DRect( textureID0, gl_TexCoord[0].st).rgb,1) +
vec4(texture2DRect( textureID1, gl_TexCoord[0].st ).rgb, 1) +
vec4(texture2DRect( textureID2, gl_TexCoord[0].st ).rgb, 1) +
-0.5*vec4(texture2DRect( textureID3, gl_TexCoord[0].st ).rgb, 1);
}

in the code:
  stateset->addUniform(new osg::Uniform("textureID0", 0));
  stateset->addUniform(new osg::Uniform("textureID1", 1));
  stateset->addUniform(new osg::Uniform("textureID2", 2));
  stateset->addUniform(new osg::Uniform("textureID3", 3));

hope it helps.

jp

Johan Johnsson wrote:
> Hi !
> 
>  
> 
> I am developing a shader and need to have acess to the optional textures 
> which is affected by the coordinates in tgl_TexCoord[1].
> 
> How do i do this, how do i send the second texture from the ive file 
> (the shadow map) into the shader, or how do i reach it in the shader if 
> its passed in automatic? should i set something in the stateset of the 
> specific node i run the shader on?
> 
>  
> 
> Tnx for advices.
> 
>  
> 
>  
> 
> // shaders without unreleveant code.
> 
> // vertex
> 
> void main()
> 
> {
> 
> gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
> 
> gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;
> 
> }
> 
>  
> 
> // fragment
> 
> void main()
> 
> {
> 
> vec4 color = texture2D(tex,   gl_TexCoord[0].st);
> 
> vec4 map  = texture2D(tex1, gl_TexCoord[1].st);
> 
> }
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


Re: [osg-users] osg Image data

2008-04-10 Thread Jean-Baptiste Authesserre
Hi,

Have you tried to store your mage in an other format than jpg?
I have also difficulties to store in jpg format. I personally store
screenshots of a 3D scene, and it works well when I use png format, or bmp
format, but not with the jpg format.

Maybe the libjpeg used by osg don't work with RGB image?

Jean-Baptiste.



2008/4/10, Vincent Bourdier <[EMAIL PROTECTED]>:
>
> Hi All,
>
> I have a problem concerning writing image data.
>
> My code is simple :
>
> const long size = _x*_y*3;
> >
> > unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned
> > char));
> >
> > for(long i=0; i < size ; i+= 3)
> > {
> > data[i] = 0;//red
> > data[i+1] = 0;//green
> > data[i+2] =0;//blue
> > }
> >
> > osg::ref_ptr image = new osg::Image;
> > image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> > image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels on
> > the Bottom left of the picture
> > image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT, data,
> > osg::Image::NO_DELETE);
> >
> > osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
> >
>
>
> the result must be a black picture... but I've a totally different result
> (see attached file)
>
> Does anyone see a mistake ?
>
> Thanks.
>
> Regards,
>Vincent.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg Image data

2008-04-10 Thread Vincent Bourdier
Yes It works better now !!

Thanks a lot !

Regards,
   Vincent

2008/4/10, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>  use GL_UNSIGNED_BYTE
>
>
>
> a char is 1 byte
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Vincent
> Bourdier
> *Sent:* 10. april 2008 13:33
> *To:* OpenSceneGraph Users
> *Subject:* Re: [osg-users] osg Image data
>
>
>
> Yes, but GL_UNSIGNED_CHAR doesn't exist.
>
> so I don't know what to use...
>
> 2008/4/10, J.P. Delport <[EMAIL PROTECTED]>:
>
> Hi,
>
> sizeof(unsigned char) != sizeof(GL_UNSIGNED_SHORT)
>
> try GL_UNSIGNED_CHAR
>
> jp
>
>
> Vincent Bourdier wrote:
> > Hi All,
> >
> > I have a problem concerning writing image data.
> >
> > My code is simple :
> >
> > const long size = _x*_y*3;
> >
> > unsigned char* data = (unsigned char*)calloc(size,
> > sizeof(unsigned char));
> >
> > for(long i=0; i < size ; i+= 3)
> > {
> > data[i] = 0;//red
> > data[i+1] = 0;//green
> > data[i+2] =0;//blue
> > }
> >
> > osg::ref_ptr image = new osg::Image;
> > image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> > image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting
> > pixels on the Bottom left of the picture
> > image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT,
> > data, osg::Image::NO_DELETE);
> >
> > osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
> >
> >
> >
> > the result must be a black picture... but I've a totally different
> > result (see attached file)
> >
> > Does anyone see a mistake ?
> >
> > Thanks.
> >
> > Regards,
> >Vincent.
> >
>
> > 
> >
> >
> > 
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean.  MailScanner thanks Transtec Computers for
> their support.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg Image data

2008-04-10 Thread erf
use GL_UNSIGNED_BYTE

a char is 1 byte

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Bourdier
Sent: 10. april 2008 13:33
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg Image data

Yes, but GL_UNSIGNED_CHAR doesn't exist.

so I don't know what to use...
2008/4/10, J.P. Delport <[EMAIL PROTECTED]>:
Hi,

sizeof(unsigned char) != sizeof(GL_UNSIGNED_SHORT)

try GL_UNSIGNED_CHAR

jp


Vincent Bourdier wrote:
> Hi All,
>
> I have a problem concerning writing image data.
>
> My code is simple :
>
> const long size = _x*_y*3;
>
> unsigned char* data = (unsigned char*)calloc(size,
> sizeof(unsigned char));
>
> for(long i=0; i < size ; i+= 3)
> {
> data[i] = 0;//red
> data[i+1] = 0;//green
> data[i+2] =0;//blue
> }
>
> osg::ref_ptr image = new osg::Image;
> image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting
> pixels on the Bottom left of the picture
> image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT,
> data, osg::Image::NO_DELETE);
>
> osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
>
>
>
> the result must be a black picture... but I've a totally different
> result (see attached file)
>
> Does anyone see a mistake ?
>
> Thanks.
>
> Regards,
>Vincent.
>

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

--
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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

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


Re: [osg-users] osg Image data

2008-04-10 Thread Vincent Bourdier
Yes, but GL_UNSIGNED_CHAR doesn't exist.

so I don't know what to use...

2008/4/10, J.P. Delport <[EMAIL PROTECTED]>:
>
> Hi,
>
> sizeof(unsigned char) != sizeof(GL_UNSIGNED_SHORT)
>
> try GL_UNSIGNED_CHAR
>
> jp
>
>
> Vincent Bourdier wrote:
> > Hi All,
> >
> > I have a problem concerning writing image data.
> >
> > My code is simple :
> >
> > const long size = _x*_y*3;
> >
> > unsigned char* data = (unsigned char*)calloc(size,
> > sizeof(unsigned char));
> >
> > for(long i=0; i < size ; i+= 3)
> > {
> > data[i] = 0;//red
> > data[i+1] = 0;//green
> > data[i+2] =0;//blue
> > }
> >
> > osg::ref_ptr image = new osg::Image;
> > image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> > image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting
> > pixels on the Bottom left of the picture
> > image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT,
> > data, osg::Image::NO_DELETE);
> >
> > osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
> >
> >
> >
> > the result must be a black picture... but I've a totally different
> > result (see attached file)
> >
> > Does anyone see a mistake ?
> >
> > Thanks.
> >
> > Regards,
> >Vincent.
> >
>
> > 
> >
> >
> > 
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean.  MailScanner thanks Transtec Computers for
> their support.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Multitexturing using shader

2008-04-10 Thread Johan Johnsson
Hi !

 

I am developing a shader and need to have acess to the optional textures
which is affected by the coordinates in tgl_TexCoord[1].

How do i do this, how do i send the second texture from the ive file
(the shadow map) into the shader, or how do i reach it in the shader if
its passed in automatic? should i set something in the stateset of the
specific node i run the shader on?

 

Tnx for advices.

 

 

// shaders without unreleveant code.

// vertex

void main() 

{

gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;

gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;

}

 

// fragment

void main()

{

vec4 color = texture2D(tex,   gl_TexCoord[0].st); 

vec4 map  = texture2D(tex1, gl_TexCoord[1].st);

}

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


Re: [osg-users] osg Image data

2008-04-10 Thread J.P. Delport
Hi,

sizeof(unsigned char) != sizeof(GL_UNSIGNED_SHORT)

try GL_UNSIGNED_CHAR

jp

Vincent Bourdier wrote:
> Hi All,
> 
> I have a problem concerning writing image data.
> 
> My code is simple :
> 
> const long size = _x*_y*3;
> 
> unsigned char* data = (unsigned char*)calloc(size,
> sizeof(unsigned char));
>
> for(long i=0; i < size ; i+= 3)
> {
> data[i] = 0;//red
> data[i+1] = 0;//green
> data[i+2] =0;//blue
> }
> 
> osg::ref_ptr image = new osg::Image;
> image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting
> pixels on the Bottom left of the picture
> image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT,
> data, osg::Image::NO_DELETE);
> 
> osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
> 
> 
> 
> the result must be a black picture... but I've a totally different 
> result (see attached file)
> 
> Does anyone see a mistake ?
> 
> Thanks.
> 
> Regards,
>Vincent.
> 
> 
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


[osg-users] osg Image data

2008-04-10 Thread Vincent Bourdier
Hi All,

I have a problem concerning writing image data.

My code is simple :

const long size = _x*_y*3;
>
> unsigned char* data = (unsigned char*)calloc(size, sizeof(unsigned
> char));
>
> for(long i=0; i < size ; i+= 3)
> {
> data[i] = 0;//red
> data[i+1] = 0;//green
> data[i+2] =0;//blue
> }
>
> osg::ref_ptr image = new osg::Image;
> image->allocateImage(_x, _y, 1, GL_RGB, GL_UNSIGNED_SHORT);
> image->setOrigin(osg::Image::BOTTOM_LEFT);//start counting pixels on
> the Bottom left of the picture
> image->setImage(_x, _y, 1, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT, data,
> osg::Image::NO_DELETE);
>
> osgDB::writeImageFile(*image, "Z:/autres/Gradient.jpg");
>


the result must be a black picture... but I've a totally different result
(see attached file)

Does anyone see a mistake ?

Thanks.

Regards,
   Vincent.
<>___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] faster builds on multiproc systems - Visual Studio 2005 & 2008

2008-04-10 Thread Brede Johansen
Hi,

It's possible to set the maximum number of parallel builds under
Tools->Options->Projects and Solutions->Build and Run.  This is for
VS2008 but you should find it in a similar place in VS2005. This is a
global setting so you don't have to change your project settings.

Regards,
Brede

On Wed, Apr 9, 2008 at 10:34 PM, sherman wilcox
<[EMAIL PROTECTED]> wrote:
> This is sort of off-topic but I'm sure interesting to the community
>  none the less. I was on the phone with a fellow OSG developer earlier
>  today complaining how slow the builds are on Windows and how I have
>  this quad core sitting here not being fully utilized by my compiler.
>  He touted how his Mac could perform parallel builds and how much
>  faster it was. So off I went to see if there's a way to do this with
>  my compiler, Visual Studio 2005. Lo and behold I found an undocumented
>  way to enable multi-processor builds using VS 2005. I couldn't believe
>  it. It was like someone gave me a gift.
>
>
>  http://blog.280z28.org/archives/2007/10/17/
>
>  http://lahsiv.net/blog/?p=40
>
>  So, could some of you guys try this as well and let me know how you get on?
>  ___
>  osg-users mailing list
>  osg-users@lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Set Camera Manipulator coordinates to Geocentric coordinates

2008-04-10 Thread CG
Hi,
 
How do I set the initial camera manipulator's coordinates to a specific 
Geocentric/Geodetic coordinates (e.g. latitude: 33.3, longitude: -127.0)?
 
Regards,
CG
_
Easily manage multiple email accounts with Windows Live Mail!
http://www.get.live.com/wl/all___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Some questions about the stategraph of osg

2008-04-10 Thread Schmidt, Richard, SDGE1
Hi Robert,

thanks for the quick reply.

 

I think one can solve the inheritance stuff regardless of the sorting of
the state graph. In the current implementation you already provide both
directions (inheritance and overriding of states) and in a bottom up
implementation of the stategraph one could do the same?! (Don't know,
but I think so).

 

But inheritance brings me to another example. By adding Transform Nodes
one adds transformations to the initial transformation of the model. You
'inherit' the transformation of the base model and add your own stuff by
adding an transformnode on top of it.

 

Exactly the same thing I like to do with shaders. The shader should be
attached to the geometry. By adding instance parameters on top of it I
like to change the behaviour of the shader. This is possible in the
current implementation, however one will loose the stategraph sorting,
possibly causing the shader to be rebind all the time.

 

To benefit from startgraphsorting one has to 'mix' the instance
parameters below the shader statesets in the graph, which is really
difficult, if you think about an abstract layer, like the plugin system.
(Is it?)

 

Richard

 

 



 

 

Hi Richard,

I'm afriad I'm not going to dive into a complex topic as I'm away on a
trip, I'll try to give a quick reply to one quetion.

> So the primary question is: Why is the stategraph build from the root
to
> the leafs of the scenegraph and not the other way around?

All OpenGL state in the OSG is inherited top down, and does so in the
same way that scene graph is structured from the root at the top to the
leaf at the bottom.  The osgUtil::StateGraph is built as mini graph that
mimics the scene graph structure and the inheritance that it implies,
but contains only the elements that are visible.  The state graph has to
built this way to achieve the standard model of inheritance that the OSG
adheres too, to do it any other way would break this inheritance
convention and break most features along with it.

Robert. 

On Wed, Apr 9, 2008 at 7:19 AM, Schmidt, Richard, SDGE1
<[EMAIL PROTECTED]> wrote:

Hi,
I got some questions about the stategraph build by osg while
culltraversal.

So the primary question is: Why is the stategraph build from the root to
the leafs of the scenegraph and not the other way around?

To explain it a bit, lets make an example:

You want to display a model (a car for example), which is available as
.ive file. The model itself has a complex stateset with many
texturebinds. For each instance of the model in your scene you add a
transform node and a stateset which sets the material color. By doing so
you will loose the ability of osg to build a proper stategraph, the
stategraph becomes 'fragmented' because of setting the material color in
the parent stateset of the models graph.

The general problem is: In the scenegraph, the parameters of the
instances are in the inner nodes (the transform nodes). In the
stategraph, the parameters of the instances are at the leaf nodes.

Just consider another example: Lets assume you want upload
positions/rotations through uniforms to a shader. The statesets of the
uniforms have to be placed under the shader stateset to get the
stategraph sorting work properly.

I am currently working on integrating speedtree into osg. I converted
the shaders to glsl and the parameters to uniforms. The geometry is
setup like the examples of speedtree. It's all working pretty well, but
I am stuck with the problem above.

I'd like to organize the scenegraph as shown at the attached image
(please ignore the PositionAttitudeTransform, the position and rotations
are part of the stateset InstancesParms).

Basics of speedtree:
*four different shaders( in the example above are just three of them)
*3 levels of statesets:
   *first level: the shaders
   *second level: the 'template' parameters of the model (like
texture and material properties
   *third level: the instance parameters (like scale, position,
windoffset, rotation)

Now consider adding level of detail to the graph and try to organize the
graph like osg needs it: The shaders at the root, than the 'template'
stateset and than the instances. The result is that one has to clone the
whole LOD hierarchy for each shader which is not a desired solution.

I would prefer, if the stategraph is build from bottom up, instead of
top down.

Greetings,
Richard


___
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] faster builds on multiproc systems - Visual Studio 2005& 2008

2008-04-10 Thread Anders Backman
If you have a few bucks to spare, Incredibuild REALLLY helps if you
have a bunch of computer doing nothing.
Takes 20sec to install, and saves HOURS...

Demo version available.
Just google incredibuild.

One of the most well built pieces of software I have ever come across.
It works as you would like all software should. It actually does what
you expect from it.
You install it on a bunch of computers in you network, in visual
studio you hit incredibuild->build and of it goes, I building on a
virtual 23GHz computer right now... :-)


/Anders

On Thu, Apr 10, 2008 at 10:44 AM, Colin Dunlop <[EMAIL PROTECTED]> wrote:
> Hi Sherman,
>
>
>   >> This is sort of off-topic but I'm sure interesting to the community
>  none the
>   >> less. I was on the phone with a fellow OSG developer earlier today
>   >> complaining how slow the builds are on Windows and how I have this
>  quad core
>   >> sitting here not being fully utilized by my compiler.
>
>  strangely enough I also discovered this blog post for 2005 two weeks
>  ago after poking around the 2008 documentation and changes. Like
>  Gordon we also get some manifest "mt.exe" odd problems, but in
>  general I can live with them given the 8x speed-up in compilation ;)
>  I don't generally see too many of these problems to make it painful.
>  I guess it depends how often it happens and for how many libraries
>  and I personally never see it unless doing a Solution build from
>  the top where there are loads of project interdependencies happening.
>
>   From my perspective the problems do not produce a bad or incorrect
>  build, just the odd library now and then failing to link which you
>  can manually re-link. Obviously if you miss the error then you'll
>  get a bad build or old library lying around although adding a pre
>  build event to remove the old version before the build can negate this.
>  We have one particular "legacy" library that contains 150 source files
>  and this /MT cuts full rebuild time from 80 to 11 minutes on my dual
>  quad-core.
>
>  Perhaps adding it to the cmake as an optional flag would let people
>  try it for themselves and decide on whether it works for them.
>
>  Gordon:
>
>  > Now back in the good old days on good SGI 32 processor monster
>   > parallel build work like a charm and screamed along ..
>
>  Yup it's only taken 10 years for me to have 1/4 of the build power
>  on Windows of that humming beast of an SGI towel dryer in the
>  basement ;)
>
>  Colin.
>
>
>
>  sherman wilcox wrote:
>  > Gordon, the issues you encountered - were they obvious issues as in
>  > linker errors or were they more subtle like random crashes and the
>  > like?
>  >
>  > On Wed, Apr 9, 2008 at 4:04 PM, Gordon Tomlinson
>  > <[EMAIL PROTECTED]> wrote:
>  >> Hi
>  >>
>  >> We avoid using this feature at work on our projects as we have found the 
> VS
>  >> linker and compiler do not always see eye to eye when using parallel 
> builds
>  >> and also find a lot of manifest issue, but that's our experience
>  >>
>  >> Now back in the good old days on good SGI 32 processor monster parallel
>  >> build work like a charm and screamed along ..
>  >>
>  >> Regards
>  >> Gordon
>  >>
>  >>
>  >> -Original Message-
>  >> From: [EMAIL PROTECTED]
>  >> [mailto:[EMAIL PROTECTED] On Behalf Of sherman
>  >> wilcox
>  >> Sent: Wednesday, April 09, 2008 4:34 PM
>  >> To: OpenSceneGraph Users
>  >> Subject: [osg-users] faster builds on multiproc systems - Visual Studio
>  >> 2005& 2008
>  >>
>  >> This is sort of off-topic but I'm sure interesting to the community none 
> the
>  >> less. I was on the phone with a fellow OSG developer earlier today
>  >> complaining how slow the builds are on Windows and how I have this quad 
> core
>  >> sitting here not being fully utilized by my compiler.
>  >> He touted how his Mac could perform parallel builds and how much faster it
>  >> was. So off I went to see if there's a way to do this with my compiler,
>  >> Visual Studio 2005. Lo and behold I found an undocumented way to enable
>  >> multi-processor builds using VS 2005. I couldn't believe it. It was like
>  >> someone gave me a gift.
>  >>
>  >>
>  >> http://blog.280z28.org/archives/2007/10/17/
>  >>
>  >> http://lahsiv.net/blog/?p=40
>  >>
>  >> So, could some of you guys try this as well and let me know how you get 
> on?
>  >> ___
>  >> osg-users mailing list
>  >> osg-users@lists.openscenegraph.org
>  >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>  >>
>  >>
>  >> ___
>  >> osg-users mailing list
>  >> osg-users@lists.openscenegraph.org
>  >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>  >>
>  > ___
>  > osg-users mailing list
>  > osg-users@lists.openscenegraph.org
>  > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>  _

Re: [osg-users] faster builds on multiproc systems - Visual Studio 2005& 2008

2008-04-10 Thread Colin Dunlop
Hi Sherman,

 >> This is sort of off-topic but I'm sure interesting to the community 
none the
 >> less. I was on the phone with a fellow OSG developer earlier today
 >> complaining how slow the builds are on Windows and how I have this 
quad core
 >> sitting here not being fully utilized by my compiler.

strangely enough I also discovered this blog post for 2005 two weeks
ago after poking around the 2008 documentation and changes. Like
Gordon we also get some manifest "mt.exe" odd problems, but in
general I can live with them given the 8x speed-up in compilation ;)
I don't generally see too many of these problems to make it painful.
I guess it depends how often it happens and for how many libraries
and I personally never see it unless doing a Solution build from
the top where there are loads of project interdependencies happening.

 From my perspective the problems do not produce a bad or incorrect
build, just the odd library now and then failing to link which you
can manually re-link. Obviously if you miss the error then you'll
get a bad build or old library lying around although adding a pre
build event to remove the old version before the build can negate this.
We have one particular "legacy" library that contains 150 source files
and this /MT cuts full rebuild time from 80 to 11 minutes on my dual 
quad-core.

Perhaps adding it to the cmake as an optional flag would let people
try it for themselves and decide on whether it works for them.

Gordon:
 > Now back in the good old days on good SGI 32 processor monster
 > parallel build work like a charm and screamed along ..

Yup it's only taken 10 years for me to have 1/4 of the build power
on Windows of that humming beast of an SGI towel dryer in the
basement ;)

Colin.

sherman wilcox wrote:
> Gordon, the issues you encountered - were they obvious issues as in
> linker errors or were they more subtle like random crashes and the
> like?
> 
> On Wed, Apr 9, 2008 at 4:04 PM, Gordon Tomlinson
> <[EMAIL PROTECTED]> wrote:
>> Hi
>>
>> We avoid using this feature at work on our projects as we have found the VS
>> linker and compiler do not always see eye to eye when using parallel builds
>> and also find a lot of manifest issue, but that's our experience
>>
>> Now back in the good old days on good SGI 32 processor monster parallel
>> build work like a charm and screamed along ..
>>
>> Regards
>> Gordon
>>
>>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of sherman
>> wilcox
>> Sent: Wednesday, April 09, 2008 4:34 PM
>> To: OpenSceneGraph Users
>> Subject: [osg-users] faster builds on multiproc systems - Visual Studio
>> 2005& 2008
>>
>> This is sort of off-topic but I'm sure interesting to the community none the
>> less. I was on the phone with a fellow OSG developer earlier today
>> complaining how slow the builds are on Windows and how I have this quad core
>> sitting here not being fully utilized by my compiler.
>> He touted how his Mac could perform parallel builds and how much faster it
>> was. So off I went to see if there's a way to do this with my compiler,
>> Visual Studio 2005. Lo and behold I found an undocumented way to enable
>> multi-processor builds using VS 2005. I couldn't believe it. It was like
>> someone gave me a gift.
>>
>>
>> http://blog.280z28.org/archives/2007/10/17/
>>
>> http://lahsiv.net/blog/?p=40
>>
>> So, could some of you guys try this as well and let me know how you get on?
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Highly detailed closed scene navigations...

2008-04-10 Thread neil.hughes
Hi All,

Not sure if I've got the correct title for this question, but hopefully the 
forum might be able to help. 

Suppose that I wish to model a complete office in OSG. The office is on two 
floors, the downstairs split into many rooms, the upstairs open plan. Desks, 
computers, windows, doors and everything that you would find in an office needs 
to be modelled, down to the pencil on the desk and the clutter in the corner.

Resource wise we are talking potentially a few thousand models, each with two 
LOD's, all with highly detailed, high resolution textures, and many many 
facets. In fact the design is so big that I can't load it all into memory.

What are my options ?

My client won't accept any delay in transiting from one area of a design to the 
next. So multiple design files for the individual areas seems a non starter, 
unless someone can tell me how I could do this without a delay moving from one 
area to the next. Some form of preemptive loading springs to mind, but is there 
an existing mechanism within OSG for handling that sort of thing ?

My thoughts led to the database pager, but I haven't used this at all, and 
would hate to start looking at it only to find a few weeks later that it really 
isn't suitable for my needs.

Can anyone suggest an approach given the constraints please ?

Many thanks

Neil.



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


Re: [osg-users] OpenSceneGraph\osgUtil\StateGraph error C2593: 'operator !=' is ambiguous

2008-04-10 Thread Alberto Luaces
El Jueves 10 Abril 2008ES 04:23:59 IceSharK escribió:
> *itr!=return_path.rend();*

Did you wrote those asterisks? Otherwise it should work, because that line 
isn't changed since October 2005.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org