Re: [osg-users] 3D Scene emulating a 2D environment

2010-07-07 Thread Martin Scheffler
theoribeiro: Just set your ortho projection values to your screen size: (0, 
1024, 0, 768) or whatever. Also set your camera viewport:
camera-setViewport(0, 0, 1024, 768).
Now the OSG units correspond to pixels on your screen.

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





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


Re: [osg-users] osgPPU and osgShadow::MinimalShadowMap

2010-07-07 Thread Serge Lages
Thanks Wojciech,

Currently we're only trying to make it work on NVidia cards (under Windows
7), but you're right that shadows seems to have problems with latest ATI
drivers, I've recently tested one of our application on a ATI and I saw some
strange artifacts.

Cheers,

On Tue, Jul 6, 2010 at 9:38 PM, Wojciech Lewandowski
lewandow...@ai.com.plwrote:

  Hi Serge,

 I am sorry I have no experience with osgPPU. Long ago (2 years ?) we tried
 it  with HDR and it seemed to work with LispSM shadows on our testbed. Have
 not tested since then. I could not help you at the moment, I am on vacations
 and my computer is a netbook. Send me a private email next week if you still
 have a problem, I will try to test it...

 Wojtek Lewandowski.

 PS. Do you by an chance test on ATI ? All techniques stemming from
 StandardShadowMap do not look good on latest Windows Catalyst drivers due to
 ATI VertexShader bugs (I can prove it).


  *From:* Serge Lages serge.la...@gmail.com
 *Sent:* Tuesday, July 06, 2010 7:37 PM
 *To:* OpenSceneGraph Users osg-users@lists.openscenegraph.org
 *Subject:* [osg-users] osgPPU and osgShadow::MinimalShadowMap

 Hi all,

 I am currently having troubles trying to make work osgPPU and specially HDR
 with osgShadow::MinimalShadowMap, you can find my test program attached (it
 comes from the list archive, I've made small modifications). Without
 shadows, it works fine, with MinimalShadowMap, I only have a black model (I
 am using cow.osg, with the teapot I have a white screen). Here is my command
 line :
  osgppu_viewer.exe Data\hdr.ppu Data\cow.osg

 Any idea where it comes from ?
 Thanks !

 --
 Serge Lages
 http://www.tharsis-software.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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] nofity in two files from two differents applications

2010-07-07 Thread David Callu
Hi Vincent

osg::nofify is a simple log system with only one logger. So you can't expect
have many logger or one logger per thread.



To do this, you need a strongest log library like
log4cpphttp://log4cpp.sourceforge.net/,
or the
incoming Boost.Log http://sourceforge.net/projects/boost-log/.

HTH
David Callu

2010/7/6 Vincent Bourdier vincent.bourd...@gmail.com

 Hi all,

 I'm using the osg::notify logs, but in two applications(threads) in the
 same process.
 Each application uses the notify logs of osg that are redirected into a log
 file, but when one application run and the second is started, it redirect
 each logs into a new common file...
 I would like to keep each log into a separate file, but keeping the
 osg::notify usage.

 Do you have any idea or suggestion ?

 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] How to make sure that both the back and the frontside of a polygon are lit...

2010-07-07 Thread Alberto Luaces
Jason Daly writes:

 Alberto Luaces wrote:

 If I reverse the normals the opposite side lights up as expected .. Am I 
 doing something wrong..


Just a clarification: I didn't wrote this, it was Sunil :)

Good point, Jason. I didn't thought about the case in that OP's light
could not be facing the surface he wanted to see...

-- 
Alberto

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


Re: [osg-users] FBX reading of GL_POLYGON

2010-07-07 Thread Sukender
Oh, right, sorry I didn't spot this. Thanks.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Michael Platings mplati...@gmail.com a écrit :

 I was referring to that by For quads I imagine it would be possible
 to write some fast specialised code to see if they should be split
 across vertices (0,2) or (1,3) so that loading times remain bearable.
 
 
 On 6 July 2010 09:02, Sukender  suky0...@free.fr  wrote:
 
 
 Oh... What about concave quads (I mean 4 points polygons)?
 
 
 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
 - Sukender  suky0...@free.fr  a écrit :
 
 
 
 
  OK. If you got time for this before I do... :)
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Michael Platings  mplati...@gmail.com  a écrit :
 
   Waht you could do is leave all the triangles and quads in one
   PrimitiveSet (like it is already), but put each polygon with =5
   vertices in it's own PrimitiveSet with Mode=POLYGON. Then run the
   Tesselator on the Geometry which should tesselate the polygons
   automagically.
  
  
   On 5 July 2010 13:49, Sukender  suky0...@free.fr  wrote:
  
  
   Hi Michael,
  
   Yes, sorry about OpenGL interpretation of polygons, I forgot that.
  
   Well actually, I guess the reader has to handle most (all?) cases.
  So
   I suggest to have something like:
   - If number of points = 4, use current code.
   - Else call GLU tesselation.
  
   Do you agree?
   The problem I have is that osgUtil::Tessellator is intended to
  operate
   on osg's structures. Any idea on how to make it work easily in the
   reader plugin?
  
  
   Sukender
   PVLE - Lightweight cross-platform game engine -
   http://pvle.sourceforge.net/
  
   - Michael Platings  mplati...@gmail.com  a écrit :
  
  
  
  
No, 1 to 1 mapping of primitives isn't possible because OpenGL
   doesn't
render concave polygons correctly (in practice GL_POLYGON is the
   same
as GL_TRIANGLE_FAN).
Tesselation is possible via GLU but very slow so we need to be
   careful
about how we use that. Most models I've come across have many
triangles and quads but few polygons =5 vertices. If we apply
triangulation to those few polygons then most models will be
unaffected. For quads I imagine it would be possible to write
 some
fast specialised code to see if they should be split across
  vertices
(0,2) or (1,3) so that loading times remain bearable.
However, if your content provider could just produce models that
  are
already suitable for real-time rendering that would be best ;)
   
   
On 5 July 2010 09:09, Sukender  suky0...@free.fr  wrote:
   
   
Hi all,
   
The FBX reader seems to interpret FBX polygons as triangles.
 Well
  I
guess this should not be, as 1-to-1 mapping of primitives is
   possible
(as far as I know), but this is not really an issue. What is an
   issue
is that concave polygons are not intepreted the right way. I
 think
about two solutions:
1. Use tessellation code to get correct splitting
2. Do the 1-to-1 mapping of primitives
   
Am I right ?
Other ideas?
Anyone having time for this?
   
Thanks folks!
   
Cheers,
   
Sukender
PVLE - Lightweight cross-platform game engine -
http://pvle.sourceforge.net/
___
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
 ___
 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] Intersection with a boundingBox

2010-07-07 Thread Baptiste Souli
Hello,

I have a scene  and i would like to clip considering a bounding box (i.e
cut the polygon at the border and eliminate the outside elements). 
Does there already exist in osg an implementation to calculate the 
interesection with a boudingbox (or a plane) or must I implement it? 
I have found PolytopeIntersector but I don't know if it calculate the 
intersection or just return the vertex in the boundingbox).

Thanks.
Aerkis.

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





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


Re: [osg-users] PageLOD externals

2010-07-07 Thread Robert Osfield
Hi Sebastian,

On Tue, Jul 6, 2010 at 9:28 PM, Sebastian Messerschmidt
sebastian.messerschm...@gmx.de wrote:
 But there should be no principal problem including PagedLOD nodes as childs
 of PagedLODs, right?

There shouldn't be a problem.  I doubt that such a scene graph will be
ideally balanced for paging, as paging really should be based on a
LOD'd quad tree hierarchy where the different branches are well
balanced in terms of geometry and texture complexity.

 The point is all source files are located in the same source in the same
 path and the external references are loaded if the sub-tile is loaded
 individually. But anyways, I'll go on and see what the parser is trying to
 pull.

I'm afraid only you will be able to debug this as your the only one
with the data and the application you are working with.

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


Re: [osg-users] Usage of the command line of osgTerrain

2010-07-07 Thread Robert Osfield
Hi Ting,

On Tue, Jul 6, 2010 at 10:37 PM, ting zhang bee...@sina.com wrote:
    Thank you very much. But I heard that the osgTerrain OSG example in osg 
 2.8.0 or even higher version has some features about the real-time generation 
 of terrains. Is this true or not? thank you again.

It all depends upon what you mean by real-time generation of
terrains as this is so open ended it could mean many different
things.  osgTerrain builds it's geometry and state it uses for
rendering from height fields and imagery, this is all done
automatically for you.  You can also control various parameters like
sample density and vertical exaggeration at runtime via the
osgTerrain::Terrain control node.

osgTerrain also works well with paged databases, either ones that are
created offline by the likes of VirtualPlanetBuilder, or on the fly by
3rd party NodeKits like osgEarth.

Whether this answers your question I have no idea.

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


Re: [osg-users] nofity in two files from two differents applications

2010-07-07 Thread Robert Osfield
Hi Vincent,

As David says osg::Notify is relatively simple and not designed to
handling multiple threads logging to different outputs.  You
potentially you write custom NotifyHandler (available in svn/trunk and
the 2.9.x series)  that checks the current thread using
OpenThreads::Thread::CurrentThread() and then redirect to the
appropriate user logging file.

Robert.

On Tue, Jul 6, 2010 at 10:02 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
 Hi all,

 I'm using the osg::notify logs, but in two applications(threads) in the same
 process.
 Each application uses the notify logs of osg that are redirected into a log
 file, but when one application run and the second is started, it redirect
 each logs into a new common file...
 I would like to keep each log into a separate file, but keeping the
 osg::notify usage.

 Do you have any idea or suggestion ?

 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] Intersection with a boundingBox

2010-07-07 Thread Robert Osfield
Hi Aerkis,

There is a osgUtil::PlaneIntersector that gives you the intersection
polygon between a plane and a scene, there is also the
PolytopIntersector but this tells you whether the scene contains any
geometry that has at least part of it in the polytop - it doesn't give
the intersection.

However, given your email I'm not sure either of these is what you are
after, and if you actually want to cut the polygons and create a whole
new geometry from the result then the OSG doesn't support this.
However, if you just want to do this for rendering then there is
OpenGL support for clip planes in the OSG so perhaps this is
sufficient.

Might I suggest explaining what you are after as a result rather than
focusing too much on the low level as doing so doesn't give us an idea
of what you are trying to do and why - advice for you will be much
more useful if you can provide a clearer to others.

Robert.

On Wed, Jul 7, 2010 at 9:14 AM, Baptiste Souli aer...@hotmail.fr wrote:
 Hello,

 I have a scene  and i would like to clip considering a bounding box (i.e
 cut the polygon at the border and eliminate the outside elements).
 Does there already exist in osg an implementation to calculate the 
 interesection with a boudingbox (or a plane) or must I implement it?
 I have found PolytopeIntersector but I don't know if it calculate the 
 intersection or just return the vertex in the boundingbox).

 Thanks.
 Aerkis.

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





 ___
 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] Intersection with a boundingBox

2010-07-07 Thread Riccardo Corsi
Hi Aerkis,

all the intersection routines you find under osgUtil are meant just to
find intersection (picking being the most common usage), not to clip
polygons.
For that purpose you should instead look at osg::ClipPlane/ClipNode
which implement GL clipping.

I don't think there's a routine which clips by a bb extents, you
should implement that by using 6 different clipping planes yourself.
See osgClip example for a reference.

HTH,
Ricky

On Wed, Jul 7, 2010 at 10:14, Baptiste Souli aer...@hotmail.fr wrote:
 Hello,

 I have a scene  and i would like to clip considering a bounding box (i.e
 cut the polygon at the border and eliminate the outside elements).
 Does there already exist in osg an implementation to calculate the 
 interesection with a boudingbox (or a plane) or must I implement it?
 I have found PolytopeIntersector but I don't know if it calculate the 
 intersection or just return the vertex in the boundingbox).

 Thanks.
 Aerkis.

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





 ___
 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] 3D terrain navigation query

2010-07-07 Thread Sanat Talmaki
Hi,

I looed the the tutorial on Billboards intersection in the tutorials section 
and that was really helpful in getting me along my way. 
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/Intersections

Thanks for the help to everyone.

Sanat.

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





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


[osg-users] Human 3d model animation/motion

2010-07-07 Thread Sanat Talmaki
Hi,

I am trying to create a scene in which I want to add 3d models of humans and 
control their motion through keyboard and/or automated.

However I am having trouble starting off as I'm not sure what exactly to do. 
This is what I've done so far:

1) I looked at the DOF node and tutorial and figured that I would need a human 
model with DOF nodes at the hands and legs linkages. I looked at 
http://www.makehuman.org/ but was not sure if this was the way to go to obtain 
3d human models with DOF nodes in them.

2) So far the models of other vehiclces I'm using in my scene are composed of a 
number of .lwo files that I link using PAT nodes and can move each part 
individually. But I believe that with models having DOF nodes, I would get a 
single file but with those nodes specified in them. Is my understanding correct 
?

3) I tried to convert a .flt model to .osg from the tutorials dataset using 
osgconv but got this message:

C:\tools\OpenSceneGraph-2.8.2_Release\binosgconv.exe  C:\Users\Sanat\Desktop\CE
M_Res_Software\OSG Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\t72-tank_des.
flt C:\Users\Sanat\Desktop\CEM_Res_Software\OSG Code\NPS_Tutorials_src\NPS_Data\
Models\t72-tank\tank.osg
Warning: Could not find plugin to read objects from file C:\Users\Sanat\Desktop
\CEM_Res_Software\OSG.
Error no data loaded.


So I was hoping to get some pointers as to how I can proceed ? (I have my 3d 
scene ready but just finding it hard to figure out how to get a human model to 
move)

Thanks

Regards,
Sanat

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





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


Re: [osg-users] FBX reading of GL_POLYGON

2010-07-07 Thread Sukender
Alright. I started working on it.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Sukender suky0...@free.fr a écrit :

 Oh, right, sorry I didn't spot this. Thanks.
 
 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
 - Michael Platings mplati...@gmail.com a écrit :
 
  I was referring to that by For quads I imagine it would be possible
  to write some fast specialised code to see if they should be split
  across vertices (0,2) or (1,3) so that loading times remain
 bearable.
 
 
  On 6 July 2010 09:02, Sukender  suky0...@free.fr  wrote:
 
 
  Oh... What about concave quads (I mean 4 points polygons)?
 
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Sukender  suky0...@free.fr  a écrit :
 
 
 
 
   OK. If you got time for this before I do... :)
  
   Sukender
   PVLE - Lightweight cross-platform game engine -
   http://pvle.sourceforge.net/
  
   - Michael Platings  mplati...@gmail.com  a écrit :
  
Waht you could do is leave all the triangles and quads in one
PrimitiveSet (like it is already), but put each polygon with =5
vertices in it's own PrimitiveSet with Mode=POLYGON. Then run
 the
Tesselator on the Geometry which should tesselate the polygons
automagically.
   
   
On 5 July 2010 13:49, Sukender  suky0...@free.fr  wrote:
   
   
Hi Michael,
   
Yes, sorry about OpenGL interpretation of polygons, I forgot
 that.
   
Well actually, I guess the reader has to handle most (all?)
 cases.
   So
I suggest to have something like:
- If number of points = 4, use current code.
- Else call GLU tesselation.
   
Do you agree?
The problem I have is that osgUtil::Tessellator is intended to
   operate
on osg's structures. Any idea on how to make it work easily in
 the
reader plugin?
   
   
Sukender
PVLE - Lightweight cross-platform game engine -
http://pvle.sourceforge.net/
   
- Michael Platings  mplati...@gmail.com  a écrit :
   
   
   
   
 No, 1 to 1 mapping of primitives isn't possible because OpenGL
doesn't
 render concave polygons correctly (in practice GL_POLYGON is
 the
same
 as GL_TRIANGLE_FAN).
 Tesselation is possible via GLU but very slow so we need to be
careful
 about how we use that. Most models I've come across have many
 triangles and quads but few polygons =5 vertices. If we apply
 triangulation to those few polygons then most models will be
 unaffected. For quads I imagine it would be possible to write
  some
 fast specialised code to see if they should be split across
   vertices
 (0,2) or (1,3) so that loading times remain bearable.
 However, if your content provider could just produce models
 that
   are
 already suitable for real-time rendering that would be best ;)


 On 5 July 2010 09:09, Sukender  suky0...@free.fr  wrote:


 Hi all,

 The FBX reader seems to interpret FBX polygons as triangles.
  Well
   I
 guess this should not be, as 1-to-1 mapping of primitives is
possible
 (as far as I know), but this is not really an issue. What is
 an
issue
 is that concave polygons are not intepreted the right way. I
  think
 about two solutions:
 1. Use tessellation code to get correct splitting
 2. Do the 1-to-1 mapping of primitives

 Am I right ?
 Other ideas?
 Anyone having time for this?

 Thanks folks!

 Cheers,

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 ___
 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
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
  ___
  osg-users mailing list
  

Re: [osg-users] Human 3d model animation/motion

2010-07-07 Thread Martin Scheffler
Hi nerazzuri,

You can check out Delta3D (www.delta3d.org).
It is a game engine based on OSG that has a lot of functionality for
controlling animated persons. The animations use the Cal3D format btw.
In the examples/ folder of the delta3d distro there are some examples on how to 
create and control animations.

Thank you!

Cheers,
Martin

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





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


Re: [osg-users] automatically minimize the viewer window

2010-07-07 Thread Trajce (Nick) Nikolov
are you under windows? If so there is a way to do that by setting a new
style with WS_MINIMIZE

http://msdn.microsoft.com/en-us/library/ms633591(VS.85).aspx

http://msdn.microsoft.com/en-us/library/ms633591(VS.85).aspx
-Nick


On Wed, Jul 7, 2010 at 3:45 AM, Thomas Canipel thomas.cani...@gmail.comwrote:

 Hi,

 Is there a way to modify the behavior of the window, like minimize it ,
 programmatically ?


 Thank you!

 Cheers,
 Thomas

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





 ___
 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] osgviewerd cow.osg ---no data loaded

2010-07-07 Thread Jean-Sébastien Guay

Hi Randy,


Thanks for your explicit response!
Yes, I've solved this problem and the cow could appear.
But another question now:
The command line shows an error after osgviewerd cow.osg: Error: [Screen #0] 
ChooseMatchingPixelFormat  -Unable to choose the requested pixel format
Any suggestion?
Thanks again!


Do you have OpenGL drivers installed for whatever graphics hardware your 
machine has? That should not happen for the window that osgviewer tries 
to open - it specifies a basic pixel format that should work pretty much 
everywhere.


Also - I notice you're using debug binaries, which won't be what causes 
the above problem, but for performance in the future you should also 
compile OSG in release, and generally use its own applications and 
examples in release mode, it gives a better impression of what OSG can do.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] Human 3d model animation/motion

2010-07-07 Thread Mourad Boufarguine
Hi Sanat,

A quick answer to the 3rd point :

On Wed, Jul 7, 2010 at 2:04 PM, Sanat Talmaki sanat.sch...@gmail.comwrote:

 Hi,

 I am trying to create a scene in which I want to add 3d models of humans
 and control their motion through keyboard and/or automated.

 However I am having trouble starting off as I'm not sure what exactly to
 do. This is what I've done so far:

 1) I looked at the DOF node and tutorial and figured that I would need a
 human model with DOF nodes at the hands and legs linkages. I looked at
 http://www.makehuman.org/ but was not sure if this was the way to go to
 obtain 3d human models with DOF nodes in them.

 2) So far the models of other vehiclces I'm using in my scene are composed
 of a number of .lwo files that I link using PAT nodes and can move each part
 individually. But I believe that with models having DOF nodes, I would get a
 single file but with those nodes specified in them. Is my understanding
 correct ?

 3) I tried to convert a .flt model to .osg from the tutorials dataset using
 osgconv but got this message:

 C:\tools\OpenSceneGraph-2.8.2_Release\binosgconv.exe
  C:\Users\Sanat\Desktop\CE
 M_Res_Software\OSG
 Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\t72-tank_des.
 flt C:\Users\Sanat\Desktop\CEM_Res_Software\OSG
 Code\NPS_Tutorials_src\NPS_Data\
 Models\t72-tank\tank.osg
 Warning: Could not find plugin to read objects from file
 C:\Users\Sanat\Desktop
 \CEM_Res_Software\OSG.
 Error no data loaded.

 


The spaces in your paths are causing the problem. try this :

osgconv.exe  C:\Users\Sanat\Desktop\CE
M_Res_Software\OSG
Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\t72-tank_des.
flt C:\Users\Sanat\Desktop\CEM_Res_Software\OSG
Code\NPS_Tutorials_src\NPS_Data\
Models\t72-tank\tank.osg


 So I was hoping to get some pointers as to how I can proceed ? (I have my
 3d scene ready but just finding it hard to figure out how to get a human
 model to move)

 Thanks

 Regards,
 Sanat



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


Re: [osg-users] 3D Scene emulating a 2D environment

2010-07-07 Thread Jean-Sébastien Guay

Hi Theo,


I'll have a camera that will be still for the whole time. 2D objects will be 
put in front of the camera as it was a 2D application. Although, sometimes 
these 2D objects will spin around an axis in 3D. So, I cannot use the Ortho 
projection.


Why not? Your objects are still in 3D space when you use an ortho 
projection, the difference is only that objects that are farther away 
from the camera will not become smaller. If all your objects will always 
be positioned on the same plane from the camera, and you just need to be 
able to rotate them, you can still use an ortho projection.


But perhaps you want to see perspective within your objects too, in 
which case you're right, you'll have to use a perspective projection.



However, I can't find out how to set the projection matrix so that I can work 
with my coordinates right. I need to know what are the maximum coordinates that 
fit my window, how many pixels there are, what real size are the objects, 
etc... Because I'm getting some window coordinates from screen touchs! As these 
coordinates are relative to the window I don't know how to relate them to my 
OSG objects!


To transform screen position to world position, use this code:

osg::Matrix MVPW( camera-getViewMatrix() *
  camera-getProjectionMatrix() *
  camera-getViewport()-computeWindowMatrix());

osg::Matrixd inverseMVPW = osg::Matrixd::inverse(MVPW);

osg::Vec3 near_point = osg::Vec3(x,y,0.0f) * inverseMVPW;
osg::Vec3 far_point  = osg::Vec3(x,y,1.0f) * inverseMVPW;

Note that what you get is actually a line that goes from the near plane 
to the far plane, since you're transforming 2D coordinates into 3D it 
means that a point in 2D becomes a line in 3D.


To transform a 3D position into 2D window coordinates you would just do 
the opposite of that, using the same MVPW as above:


osg::Vec3 posIn2D = posIn3D * MVPW;

Just make sure the posIn3D is in world space and not in some object's 
local coordinate system.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] osgAnimation : keyframe osg::Switch

2010-07-07 Thread Peter Wrobrl
Hi,

i need to switch on and off objects through an animation clip. The Idea is to 
use a switch node, but there is no boolean interpolator type, and also no 
keyword name for this kind of channel if I'm not wrong.

More over my constraint is to use osg 2.8.3 as it is, and I need to write out 
the animation data into an osg file.

How can this be accomplished ? 

Thank you!

Cheers,
PP

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





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


Re: [osg-users] Human 3d model animation/motion

2010-07-07 Thread Jean-Sébastien Guay

Hello Sanat,


I am trying to create a scene in which I want to add 3d models of humans and 
control their motion through keyboard and/or automated.

However I am having trouble starting off as I'm not sure what exactly to do.


You should look into osgAnimation. It is a sub-library of OSG (node kit) 
which provides animation functionality, and in particular it can animate 
skinned human meshes.


Before you can do anything with osgAnimation you need some human model 
it can work with. For this you can go two ways: either get a model that 
is rigged and animated already, or create one in a modeling tool 
(Blender is open source and can save Collada files, Softimage XSI Mod 
Tool can be used for non-commercial uses and can export Collada and FBX 
files, and then there are commercial modeling tools like XSI, Maya, 3DS 
Max etc). Then you would use one of the OSG plugins that supports 
animation to load it (the FBX and Collada plugins can load animations, 
not sure if others can too).


On the other hand, if you already have a human 3D model, you could 
either load it up in a modeling program to add bones and skinning to it, 
or do it programmatically based on any kind of transform nodes your 
model has (note that DOF nodes are not really different than other 
transform nodes (PAT, MatrixTransform, etc), the way you work with them 
is different but they're all transforms, their goal is to specify a 
local coordinate system).


Once your data can be loaded (you can use the osganimationviewer example 
to test if OSG and the plugin can load your model and animations 
correctly) you can programmatically start animations when events happen, 
such as input or some AI routines you would write.


It looks daunting, many things to do, but take it one step at a time and 
you'll get there :-)


Another thing:


3) I tried to convert a .flt model to .osg from the tutorials dataset using 
osgconv but got this message:

C:\tools\OpenSceneGraph-2.8.2_Release\binosgconv.exe  C:\Users\Sanat\Desktop\CE
M_Res_Software\OSG Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\t72-tank_des.
flt C:\Users\Sanat\Desktop\CEM_Res_Software\OSG Code\NPS_Tutorials_src\NPS_Data\
Models\t72-tank\tank.osg
Warning: Could not find plugin to read objects from file C:\Users\Sanat\Desktop
\CEM_Res_Software\OSG.
Error no data loaded.



As klortho would say: Look at the error message (though he'd be less 
polite about it, and would probably type it in all caps because he yells 
a lot). You can see that OSG tried to load


  C:\Users\Sanat\Desktop\CEM_Res_Software\OSG

and not

  C:\Users\Sanat\Desktop\CEM_Res_Software\OSG 
Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\t72-tank_des.flt


which is the path you specified. It stopped at the space character... 
You need to quote the path so that the Windows command line interpreter 
doesn't cut your path at spaces. Try this:


  osgconv.exe C:\Users\Sanat\Desktop\CEM_Res_Software\OSG 
Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\t72-tank_des.flt 
C:\Users\Sanat\Desktop\CEM_Res_Software\OSG 
Code\NPS_Tutorials_src\NPS_Data\Models\t72-tank\tank.osg


That should give you an .osg file.

Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] cull callbacks

2010-07-07 Thread Andy Skinner
What is the difference between the cull callback set on a Drawable and a 
NodeCallback set as a cull callback on a Node?

I saw one thread on the list where someone was confusing them, and the 
difference was mentioned, but not spelled out.  It appears the 
Drawable::CullCallback is used to decide whether to cull the drawable.  What 
does the cull callback on the Node do?

thanks
andy

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


Re: [osg-users] FBX reading of GL_POLYGON

2010-07-07 Thread Sukender
Hi Michael,

I managed to write the code, but I need testing. Moreover I can't update the 
FBX plugin because of the regression I told you in another thread, concerning 
images.
Can you, please:
- Merge changes to your working copy, and
- Make a few tests with your models?

Also feel free to commit if everything seems okay.
Attached file is against rev. 11322 of the trunk.

Many thanks.

For info, my implemtation looks like:
- Add points of the triangles
- Detect how to split quads (02 or 13), and add points for the two triangles
- Save polygons in a temporary array
- Add a primitive set for all triangles (DrawArray)
- Add polygons points AFTER the points of the triangles
- Add primitive sets for polygons
- Tessellate

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Sukender suky0...@free.fr a écrit :

 Alright. I started working on it.
 
 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 
 - Sukender suky0...@free.fr a écrit :
 
  Oh, right, sorry I didn't spot this. Thanks.
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Michael Platings mplati...@gmail.com a écrit :
 
   I was referring to that by For quads I imagine it would be
 possible
   to write some fast specialised code to see if they should be split
   across vertices (0,2) or (1,3) so that loading times remain
  bearable.
  
  
   On 6 July 2010 09:02, Sukender  suky0...@free.fr  wrote:
  
  
   Oh... What about concave quads (I mean 4 points polygons)?
  
  
   Sukender
   PVLE - Lightweight cross-platform game engine -
   http://pvle.sourceforge.net/
  
   - Sukender  suky0...@free.fr  a écrit :
  
  
  
  
OK. If you got time for this before I do... :)
   
Sukender
PVLE - Lightweight cross-platform game engine -
http://pvle.sourceforge.net/
   
- Michael Platings  mplati...@gmail.com  a écrit :
   
 Waht you could do is leave all the triangles and quads in one
 PrimitiveSet (like it is already), but put each polygon with
 =5
 vertices in it's own PrimitiveSet with Mode=POLYGON. Then run
  the
 Tesselator on the Geometry which should tesselate the polygons
 automagically.


 On 5 July 2010 13:49, Sukender  suky0...@free.fr  wrote:


 Hi Michael,

 Yes, sorry about OpenGL interpretation of polygons, I forgot
  that.

 Well actually, I guess the reader has to handle most (all?)
  cases.
So
 I suggest to have something like:
 - If number of points = 4, use current code.
 - Else call GLU tesselation.

 Do you agree?
 The problem I have is that osgUtil::Tessellator is intended to
operate
 on osg's structures. Any idea on how to make it work easily in
  the
 reader plugin?


 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Michael Platings  mplati...@gmail.com  a écrit :




  No, 1 to 1 mapping of primitives isn't possible because
 OpenGL
 doesn't
  render concave polygons correctly (in practice GL_POLYGON is
  the
 same
  as GL_TRIANGLE_FAN).
  Tesselation is possible via GLU but very slow so we need to
 be
 careful
  about how we use that. Most models I've come across have
 many
  triangles and quads but few polygons =5 vertices. If we
 apply
  triangulation to those few polygons then most models will be
  unaffected. For quads I imagine it would be possible to
 write
   some
  fast specialised code to see if they should be split across
vertices
  (0,2) or (1,3) so that loading times remain bearable.
  However, if your content provider could just produce models
  that
are
  already suitable for real-time rendering that would be best
 ;)
 
 
  On 5 July 2010 09:09, Sukender  suky0...@free.fr  wrote:
 
 
  Hi all,
 
  The FBX reader seems to interpret FBX polygons as triangles.
   Well
I
  guess this should not be, as 1-to-1 mapping of primitives is
 possible
  (as far as I know), but this is not really an issue. What is
  an
 issue
  is that concave polygons are not intepreted the right way. I
   think
  about two solutions:
  1. Use tessellation code to get correct splitting
  2. Do the 1-to-1 mapping of primitives
 
  Am I right ?
  Other ideas?
  Anyone having time for this?
 
  Thanks folks!
 
  Cheers,
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
  ___
  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] [vpb] .tif and .tfw

2010-07-07 Thread lucie lemonnier
Hi,

I have a file of elevation data DTED and an orthoimage .tif with a .tfw file. A 
.tfw file is used to georeference a .tif file. When I use osgdem -d data.dt1 
-l 3 -o data.osg, I get a terrain model without texture and when I use osgdem 
-d data.dt1 -t data.tif -l 3 -o data.osg, the projection of the orthoimage 
isn't correct. 
Does anyone know how to use .tif with .tfw with VPB?

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] cull callbacks

2010-07-07 Thread Tim Moore
On Wed, Jul 7, 2010 at 4:12 PM, Andy Skinner andy.skin...@mathworks.comwrote:

 What is the difference between the cull callback set on a Drawable and a
 NodeCallback set as a cull callback on a Node?

 I saw one thread on the list where someone was confusing them, and the
 difference was mentioned, but not spelled out.  It appears the
 Drawable::CullCallback is used to decide whether to cull the drawable.  What
 does the cull callback on the Node do?

 The difference stems from the fact that a Drawable isn't a first-class
scene graph node and exists below the bottom leaves of the scene graph. a
Node cull callback is responsible for continuing the traversal by calling
traverse() on its children if they are not culled. A Drawable cull callback
returns a true or false indication whether or not the Drawable should be
culled. You can actually do more than that in a Drawable cull callback, but
you would need to get down and dirty with the internals of the CullVisitor
class.

Tim

 thanks
 andy

 ___
 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] 3D Scene emulating a 2D environment

2010-07-07 Thread Theo Ribeiro
Hi Jean-Sebastien and Martin,
Thank you both for helping.

J-S, that's exactly it. I still want to have perspective within my objects. 

As for the coordinates, I can see where you are going but I still don't know 
how can I know the boundaries of my camera view on the xz plane. I mean, if I 
use the ortho projection I can set it and my viewport to the size of my screen 
and I'll know exactly what coordinates the boundaries of my camera will be. So 
if I draw a point to 1024,768 I'll know it will be on the corner of the screen. 
How can I do the same thing using the perspective projection?  


Thanks a lot!

Cheers,
Theo

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





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


Re: [osg-users] Human 3d model animation/motion

2010-07-07 Thread Sanat Talmaki
Hi Martin,

Thanks for your suggestion. I took a look at its website and I have one 
question about Delta3D. I am already working with an osg application in visual 
studio. So if I decide to go the Delta3D way, can I can continue using osg 
primarily and Delta3D for just certain aspects that make it more convenient to 
use than osg ? 

I am just beginning to get friendly with the osg api and wanted to know if 
Delta 3D would once again give me a new learning curve to scale ?

Thanks

Sanat.

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





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


Re: [osg-users] Human 3d model animation/motion

2010-07-07 Thread Sanat Talmaki
Hi Mourad ,

Yes, that helped. I have a .osg file of the tank now. Thanks for catching that 
out.  

-Sanat

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





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


Re: [osg-users] How to make sure that both the back and thefrontside of a polygon are lit...

2010-07-07 Thread Jason Daly

Alberto Luaces wrote:


Just a clarification: I didn't wrote this, it was Sunil :)
  


Sorry, I guess I snipped carelessly  :-)

--J

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


Re: [osg-users] Human 3d model animation/motion

2010-07-07 Thread Sanat Talmaki
Hi Jean,

As you mentioned, it is a lot of steps. But it got me thinking:
In one of the examples/tutorials, using a keyboard handler, the user can change 
which type of tank is being viewed i.e. whether a good  (intact) one or a 
destroyed (bad) one.
Using a similar mechanism, can one also use 2 states of a model- a static one 
and a rigged/walking one when the model is made to move ? 

Also, do you recommend any sources where to find 3d-models ?

Thanks,

Sanat.

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





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


[osg-users] osganimationsolid example

2010-07-07 Thread Gianni Ambrosio
Hi All,
I tried to look at the osganimationsolid example but I'm not sure to understand 
it correctly. Is seems to me that the way a channel is conected to an animation 
is string diven.

Example (from osganimationsolid):

osgAnimation::Vec3LinearChannel* channelAnimation2 = new 
osgAnimation::Vec3LinearChannel;
channelAnimation2-setTargetName(AnimatedCallback);
channelAnimation2-setName(euler);

channelAnimation2-getOrCreateSampler()-getOrCreateKeyframeContainer()-push_back(osgAnimation::Vec3Keyframe(0,
 osg::Vec3(0,0,0)));

channelAnimation2-getOrCreateSampler()-getOrCreateKeyframeContainer()-push_back(osgAnimation::Vec3Keyframe(1.5,
 osg::Vec3(2*osg::PI,0,0)));
osgAnimation::Animation* anim2 = new osgAnimation::Animation;
anim2-addChannel(channelAnimation2);
anim2-setPlaymode(osgAnimation::Animation::LOOP); 

So the name euler is the only way I see that states the channel values are 
related to a rotation. Is it correct? If so, where can I find the list of all 
strings available?

Regards
Gianni

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





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


Re: [osg-users] FBX Plugin: animation speed not as expected...

2010-07-07 Thread Michael Platings
Hi Alessandro, I can't reproduce the problem so I don't know why you're
seeing that, sorry.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] .tif and .tfw

2010-07-07 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Have you tried using the --geocentric flag? I've used .tif files before just
fine but they were georeferenced. Try running

gdalinfo data.tif

to see what projection the file is using. If it's not geocentric, you can
reproject the data by

gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear data.tif data2.tif

then try using

osgdem --geocentric -d data.dt1 -t data2.tif -l 3 -o data.ive

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie
lemonnier
Sent: Wednesday, July 07, 2010 9:29 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [vpb] .tif and .tfw

Hi,

I have a file of elevation data DTED and an orthoimage .tif with a .tfw
file. A .tfw file is used to georeference a .tif file. When I use osgdem -d
data.dt1 -l 3 -o data.osg, I get a terrain model without texture and when I
use osgdem -d data.dt1 -t data.tif -l 3 -o data.osg, the projection of the
orthoimage isn't correct. 
Does anyone know how to use .tif with .tfw with VPB?

Thank you!

Cheers,
lucie

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





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


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D Scene emulating a 2D environment

2010-07-07 Thread Jean-Sébastien Guay

Hi Theo,


As for the coordinates, I can see where you are going but I still don't know 
how can I know the boundaries of my camera view on the xz plane. I mean, if I 
use the ortho projection I can set it and my viewport to the size of my screen 
and I'll know exactly what coordinates the boundaries of my camera will be. So 
if I draw a point to 1024,768 I'll know it will be on the corner of the screen.
How can I do the same thing using the perspective projection?


Well a rectangle in 2D space will become what's known as a frustum in 
perspective-projected 3D space, i.e. a truncated pyramid. You can simply 
unproject your viewport's 4 corners (top-left, top-right, bottom-left 
and bottom-right) to get the frustum's 8 corners, using the same math I 
posted before. As you can see, that will give you two 3D points per 2D 
point, one near and one far. You can also do the opposite.


Then given that frustum you can find out where to place your objects.

I suggest you look up 3D projection math on Google, you will get more 
details. In particular I like this page, very complete and easy to 
navigate with the bar at the top: http://www.euclideanspace.com/


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] Human 3d model animation/motion

2010-07-07 Thread Jean-Sébastien Guay

Hello Sanat,


Using a similar mechanism, can one also use 2 states of a model- a static one 
and a rigged/walking one when the model is made to move ?


Yes of course, I don't know what tutorial you're talking about but 
generally you do that with node masks or Switch nodes, and that will 
work on any type of node, whether or not the node contains animation.



Also, do you recommend any sources where to find 3d-models ?


Not really, search the web or get some contractor to make some for you...

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] Can't pick HUD geometry under perspective projection

2010-07-07 Thread Don Leich

hi all,

I found a fix for my problem.  After making only very slow progress
trying to debug actions mainly taking place in inline functions, I found
that I merely needed to open up the near and far distances in 
setProjectionMatrixAsOrtho for my HUD camera.


If anyone has advice on debugging inline functions, I'm all ears.
Thanks to those who offered up possible solutions for this problem.

-Don

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


[osg-users] Convert pov into osg structures

2010-07-07 Thread Domingo López Oller
Hi, I don't know if this is possible. I have some files from GRASS with .pov 
extension and I don't know how to take them for osg.

Someone know the structure of a tga file?

For example:
An edifice:
polygon { 6, 
 464022.599606, 907.085815 , 4087154.860413
 464004.190265, 907.085815 , 4087142.339932
 464004.190265, 937.085815 , 4087142.339932
 464022.599606, 937.085815 , 4087154.860413
 464022.599606, 907.085815 , 4087154.860413
 464022.599606, 907.085815 , 4087154.860413
 
}

A river:
sphere_sweep { linear_spline 45,
 465739.968762, 1906.192505 , 4091458.499904, 3
 465791.468761, 1894.422974 , 4091452.250001, 3
 465821.250068, 1881.933472 , 4091422.250052, 3
 465860.593730, 1856.298828 , 4091382.249947, 3
 465892.375120, 1835.943359 , 4091347.19, 3
 465930.218784, 1816.068726 , 4091315.500061, 3
 465978.812602, 1801.638184 , 4091290.250017, 3
 466026.968878, 1793.834595 , 4091275.750128, 3
 466076.624893, 1786.617188 , 4091255.249991, 3
 466120.343720, 1770.884644 , 4091223.750044, 3
 466161.875093, 1742.642090 , 4091171.500047, 3
 466189.468689, 1710.575928 , 4091081.000114, 3
 466219.343810, 1704.088501 , 4091067.499878, 3
 466268.312628, 1696.643555 , 4091062.999886, 3
 466301.593757, 1684.553589 , 4091025.499950, 3
 466350.250118, 1668.899048 , 4091009.249891, 3
 466384.499888, 1657.378906 , 4091005.71, 3
 466438.343697, 1631.369019 , 4091002.750074, 3
 466494.156318, 1608.742310 , 4090996.499913, 3
 466546.906142, 1593.277832 , 4090985.249932, 3
 466588.906329, 1576.062622 , 4090959.749975, 3
 466618.093736, 1551.168579 , 4090918.999872, 3
 466659.343666, 1524.220459 , 4090896.499910, 3
 466689.250059, 1511.777832 , 4090889.58, 3
 466738.187606, 1496.778687 , 4090879.500111, 3
 466778.656265, 1482.590088 , 4090853.500069, 3
 466812.656122, 1460.842041 , 4090812.249881, 3
 466858.718759, 1430.692139 , 4090788.750007, 3
 466883.218803, 1414.062012 , 4090769.499954, 3
 466930.843722, 1400.582275 , 4090747.500077, 3
 466986.437443, 1388.464478 , 4090744.500082, 3
 467017.156377, 1384.399048 , 4090743.85, 3
 467045.781157, 1377.151001 , 4090732.29, 3
 467085.218633, 1362.496216 , 4090705.75, 3
 467134.499907, 1343.728149 , 4090706.500060, 3
 467193.062609, 1319.315430 , 4090726.500113, 3
 467244.687435, 1301.977539 , 4090737.250008, 3
 467287.91, 1298.845825 , 4090758.59, 3
 467319.781122, 1293.567383 , 4090798.250077, 3
 467364.031306, 1282.700684 , 4090843.499914, 3
 467408.187416, 1266.867310 , 4090874.500034, 3
 467457.843689, 1245.734619 , 4090893.88, 3
 467509.187589, 1222.203979 , 4090897.749994, 3
 467561.56, 1193.638428 , 4090893.750087, 3
 467614.875125, 1189.556030 , 4090899.499905, 3
 
}

Thanks!!

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





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


Re: [osg-users] Convert pov into osg structures

2010-07-07 Thread Gordon Tomlinson
http://en.wikipedia.org/wiki/Truevision_TGA



__
Gordon Tomlinson 

gor...@gordontomlinson.com IM: gordon3db...@3dscenegraph.com 
www.vis-sim.com
www.gordontomlinson.com
www.PhotographyByGordon.com

__

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Domingo
López Oller
Sent: Wednesday, July 07, 2010 10:10 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Convert pov into osg structures

Hi, I don't know if this is possible. I have some files from GRASS with .pov
extension and I don't know how to take them for osg.

Someone know the structure of a tga file?

For example:
An edifice:
polygon { 6, 
 464022.599606, 907.085815 , 4087154.860413
 464004.190265, 907.085815 , 4087142.339932
 464004.190265, 937.085815 , 4087142.339932
 464022.599606, 937.085815 , 4087154.860413
 464022.599606, 907.085815 , 4087154.860413
 464022.599606, 907.085815 , 4087154.860413
 
}

A river:
sphere_sweep { linear_spline 45,
 465739.968762, 1906.192505 , 4091458.499904, 3
 465791.468761, 1894.422974 , 4091452.250001, 3
 465821.250068, 1881.933472 , 4091422.250052, 3
 465860.593730, 1856.298828 , 4091382.249947, 3
 465892.375120, 1835.943359 , 4091347.19, 3
 465930.218784, 1816.068726 , 4091315.500061, 3
 465978.812602, 1801.638184 , 4091290.250017, 3
 466026.968878, 1793.834595 , 4091275.750128, 3
 466076.624893, 1786.617188 , 4091255.249991, 3
 466120.343720, 1770.884644 , 4091223.750044, 3
 466161.875093, 1742.642090 , 4091171.500047, 3
 466189.468689, 1710.575928 , 4091081.000114, 3
 466219.343810, 1704.088501 , 4091067.499878, 3
 466268.312628, 1696.643555 , 4091062.999886, 3
 466301.593757, 1684.553589 , 4091025.499950, 3
 466350.250118, 1668.899048 , 4091009.249891, 3
 466384.499888, 1657.378906 , 4091005.71, 3
 466438.343697, 1631.369019 , 4091002.750074, 3
 466494.156318, 1608.742310 , 4090996.499913, 3
 466546.906142, 1593.277832 , 4090985.249932, 3
 466588.906329, 1576.062622 , 4090959.749975, 3
 466618.093736, 1551.168579 , 4090918.999872, 3
 466659.343666, 1524.220459 , 4090896.499910, 3
 466689.250059, 1511.777832 , 4090889.58, 3
 466738.187606, 1496.778687 , 4090879.500111, 3
 466778.656265, 1482.590088 , 4090853.500069, 3
 466812.656122, 1460.842041 , 4090812.249881, 3
 466858.718759, 1430.692139 , 4090788.750007, 3
 466883.218803, 1414.062012 , 4090769.499954, 3
 466930.843722, 1400.582275 , 4090747.500077, 3
 466986.437443, 1388.464478 , 4090744.500082, 3
 467017.156377, 1384.399048 , 4090743.85, 3
 467045.781157, 1377.151001 , 4090732.29, 3
 467085.218633, 1362.496216 , 4090705.75, 3
 467134.499907, 1343.728149 , 4090706.500060, 3
 467193.062609, 1319.315430 , 4090726.500113, 3
 467244.687435, 1301.977539 , 4090737.250008, 3
 467287.91, 1298.845825 , 4090758.59, 3
 467319.781122, 1293.567383 , 4090798.250077, 3
 467364.031306, 1282.700684 , 4090843.499914, 3
 467408.187416, 1266.867310 , 4090874.500034, 3
 467457.843689, 1245.734619 , 4090893.88, 3
 467509.187589, 1222.203979 , 4090897.749994, 3
 467561.56, 1193.638428 , 4090893.750087, 3
 467614.875125, 1189.556030 , 4090899.499905, 3
 
}

Thanks!!

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





___
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] Windows 7 Aero Color Scheme issue

2010-07-07 Thread Guy Volckaert
I'm having the same problem on my laptop (single screen). When I launch the 
osgViewer application, the screen gets rendered for  1 frame and then the 
entire window becomes black. If I use ALT-TAB to cycle back and forth, then the 
scene gets rendered correctly. 

As you mentioned, it's very irritating. 

I was wondering if anyone looked into this since?

Cheers,
Guy

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





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


Re: [osg-users] find coordeinates in IVE

2010-07-07 Thread Tom Pearce
Hi Bruce,

I'm doing something similar to you, where I want to be able to click in a scene 
and add objects at that point.  I do it as JS suggests, using an event adapter 
to get the mouse coordinates, a line segment intersector using Window 
coordinates, and an intersection visitor.  If you want, you can use node masks 
to determine which objects in the scene the intersector will find.  From the 
intersector you can get Vec3s of position and normal vector of the surface that 
was found.  The normal can be used to orient an object you place on terrain, 
for example.


Code:

osg::ref_ptrosgUtil::LineSegmentIntersector lsi = new 
osgUtil::LineSegmentIntersector(osgUtil::Intersector::WINDOW, ea.getX(), 
ea.getY());
osgUtil::IntersectionVisitor iv(lsi.get());
iv.setTraversalMask(MY_MASK);
_camera-accept(iv);
osg::Vec3 position, normal;
if(lsi-containsIntersections())
{
position = mlsi-getFirstIntersection().getWorldIntersectPoint();
normal = mlsi-getFirstIntersection().getWorldIntersectNormal();
}


 

Good luck getting it working!

Cheers,
Tom

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





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


Re: [osg-users] osgviewerd cow.osg ---no data loaded

2010-07-07 Thread Tom Pearce
Hi,


 Error: [Screen #0] ChooseMatchingPixelFormat -Unable to choose the 
 requested pixel format 



I've had this error pop up while trying to run OSG applications on a remote 
machine via Windows remote desktop - don't know if that's what you're doing, 
but if so, it's probably where the issue is arising.

Cheers,
Tom

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





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


Re: [osg-users] Convert pov into osg structures

2010-07-07 Thread Ulrich Hertlein
On 8/07/10 7:09 , Domingo López Oller wrote:
 Hi, I don't know if this is possible. I have some files from GRASS with .pov 
 extension
 and I don't know how to take them for osg.

The 'polygon' looks straight forward enough, but converting higher-level object 
like a
sphere swept along a spline into triangles isn't easily done.

Cheers,
/ulrich

PS: tga files are supported by OSG, but they're image files and so not directly 
related to
pov.

 For example:
 An edifice:
 polygon { 6, 
  464022.599606, 907.085815 , 4087154.860413
  464004.190265, 907.085815 , 4087142.339932
  464004.190265, 937.085815 , 4087142.339932
  464022.599606, 937.085815 , 4087154.860413
  464022.599606, 907.085815 , 4087154.860413
  464022.599606, 907.085815 , 4087154.860413
 }
 
 A river:
 sphere_sweep { linear_spline 45,
  465739.968762, 1906.192505 , 4091458.499904, 3
  465791.468761, 1894.422974 , 4091452.250001, 3
  465821.250068, 1881.933472 , 4091422.250052, 3
  465860.593730, 1856.298828 , 4091382.249947, 3
  465892.375120, 1835.943359 , 4091347.19, 3
...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D Scene emulating a 2D environment

2010-07-07 Thread Theo Ribeiro
Hi J-S,

Now I see what you mean by world coordinates and your calculations! Stupid 
newbie me! =) I usually have a hard time relating OSG and OpenGL (which I'm no 
expert btw), but in the end the concepts are all the same!!!

I just have a small little question: when you multiply your screen coordinates 
by the inverse matrix you are using the z values of 0.0 and 1.0 for the points 
on the near and far planes, right? Are you using these values because they were 
previously set on your projection matrix or for some other reason?

All in all, I think my problem will be solved now! Thank you so very much 
again! I appreciate all your help and good will!


Cheers,
Theo

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





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


Re: [osg-users] osgviewerd cow.osg ---no data loaded

2010-07-07 Thread Randy
Hi Tom,
Thanks for your reply. But I didn't use it on remote machine.

Best regards,
Randy

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tom Pearce
Sent: Thursday, July 08, 2010 6:10 AM
To: osg-users@lists.openscenegraph.org
Subject: [!! SPAM] Re: [osg-users] osgviewerd cow.osg ---no data loaded

Hi,


 Error: [Screen #0] ChooseMatchingPixelFormat -Unable to choose the
requested pixel format 



I've had this error pop up while trying to run OSG applications on a remote
machine via Windows remote desktop - don't know if that's what you're doing,
but if so, it's probably where the issue is arising.

Cheers,
Tom

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





___
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] osgviewerd cow.osg ---no data loaded

2010-07-07 Thread Randy
Hi J-S,
I find the BUILD_OSG_PLUGINS  is OFF and FREETYPE_LIBRARY_DEBUG is not
found either. But according to the
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/V
isualStudio, If I have installed 3rdparty libraries, the two above should
be different. Does it means I have not got Freetype plugin?
I do really find that there is a warning :Could not find plugin to read
objects from file ...\arial.ttf...

Best regards,
Randy

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: Wednesday, July 07, 2010 9:09 PM
To: OpenSceneGraph Users
Subject: [!! SPAM] Re: [osg-users] osgviewerd cow.osg ---no data loaded

Hi Randy,

 Thanks for your explicit response!
 Yes, I've solved this problem and the cow could appear.
 But another question now:
 The command line shows an error after osgviewerd cow.osg: Error: [Screen
#0] ChooseMatchingPixelFormat  -Unable to choose the requested pixel
format
 Any suggestion?
 Thanks again!

Do you have OpenGL drivers installed for whatever graphics hardware your 
machine has? That should not happen for the window that osgviewer tries 
to open - it specifies a basic pixel format that should work pretty much 
everywhere.

Also - I notice you're using debug binaries, which won't be what causes 
the above problem, but for performance in the future you should also 
compile OSG in release, and generally use its own applications and 
examples in release mode, it gives a better impression of what OSG can do.

Hope this helps,

J-S
-- 
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org