Re: [osg-users] External threads and osgViewer

2010-02-15 Thread Stefan Eilemann

Hi JP,

On 15. Feb 2010, at 9:00, J.P. Delport wrote:

 if I remember correctly, the ReentrantMutex came into existence because on 
 Windows the normal Mutex was reentrant (a single thread could lock it more 
 than once). So ReentrantMutex was created to make a consistent mutex on all 
 platforms...

That may be so. The issue at hand is that the ReentrantMutex on pthreads only 
works if your threads are created using OpenThreads (it uses 
Thread::CurrentThread() which requires some TLS created by Thread::start()). 
Since in my case the render threads are already running, this mutex deadlocks. 
A plain Mutex doesn't need all this and works correctly.

In this use case the mutex does not need to be reentrant. Obviously it doesn't 
hurt if it is, so imo the change is ok.


Cheers,

Stefan.
-- 
http://www.eyescale.ch
http://www.equalizergraphics.com
http://www.linkedin.com/in/eilemann



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


Re: [osg-users] External threads and osgViewer

2010-02-15 Thread J.P. Delport

Hi Stefan,

Stefan Eilemann wrote:

Hi JP,

On 15. Feb 2010, at 9:00, J.P. Delport wrote:


if I remember correctly, the ReentrantMutex came into existence
because on Windows the normal Mutex was reentrant (a single thread
could lock it more than once). So ReentrantMutex was created to
make a consistent mutex on all platforms...


That may be so. The issue at hand is that the ReentrantMutex on
pthreads only works if your threads are created using OpenThreads (it
uses Thread::CurrentThread() which requires some TLS created by
Thread::start()). Since in my case the render threads are already
running, this mutex deadlocks. A plain Mutex doesn't need all this
and works correctly.


OK, I understand the issue better now. I've also had some issues with 
boost::thread and osg::Viewer:


http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/52734

Hopefully some of the issues would be addressed by the thread 
functionality in C++0x :)


jp



In this use case the mutex does not need to be reentrant. Obviously
it doesn't hurt if it is, so imo the change is ok.


Cheers,

Stefan.


--
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] Stereo with pre-split images streams

2010-02-15 Thread Robert Osfield
Hi Bruce,

You can use the bit masks as you suggest, although typically one would
just use the left or right eye for mono.

W.r.t Present3D, there isn't any editor beyond an off the shelf
xml/text editor.  You can read p3d files using the p3d plugin that is
now built as part of the core OSG.  This allows you to use
presentation directly in most standard osgViewer based apps like
osgviewer.  There is an simple example of .p3d file in
OpenSceneGaph-Data.

Robert.

On Fri, Feb 12, 2010 at 5:45 PM, Bruce Wheaton br...@spearmorgan.com wrote:
 OK, great, I figured this had been dealt with. That's a nice, full example,
 thanks. I'll get my head around it.

 I was a bit worried about this approach and the complexity of 'doubling' my
 graph, but it seems that all I have to do is double the one Geode - which is
 a leaf, so has no children I have to deal with, and then do some minor
 offsets, or supply a different texture in the update.

 And, as I read it, cullmasks are arbitrary masks that I can set up, then
 assign to different nodes and cameras for this exact purpose. So I can set
 up:

 Mono    0x0001
 Left            0x0002
 Right   0x0004
 Assign those to cameras,

 And then make the left node mask 0x0003 and the right 0x0004. And I
 should be able to get the node's cullmask and decide what to do in an update
 callback - ideally the same callback for each geode.

 I don't suppose you've a handy example for image streams as well, do you?

 And yes, I saw you did Present3D. It sounds fantastic, but there's no editor
 is there? That, and the 3D, makes it hard to see examples. If there was, I
 would try to support that format in my app, and then recommend the editor
 for clients. Thank you for putting that in the core.

 Oh, I see in the wiki, Present3D has stereo movie support. Very cool - I'll
 dig through there too - Have to update from OSG 2.8 anyway.

 Bruce


 On Feb 12, 2010, at 12:57 AM, Robert Osfield wrote:

 I've done lots of 3D video work with the OpenSceneGraph/Present3D over
 the years.  There is even an example osgstereoimage that shows how to
 do it using two subgraph each with their own NodeMask which is matched
 to the left eye/right eye cull masks.

 Robert.

 On Fri, Feb 12, 2010 at 1:08 AM, Bruce Wheaton br...@spearmorgan.com
 wrote:

 I'm about to drop OSG into an app and I'm looking at how to do various
 things. The built-in stereo support is great, but I'm not sure how to do
 something that's easy in my current code - handle pre-split images.

 I have to take a variety of images, mainly in streams, and handle them
 correctly in the left and right eye. The formats I deal with are:

 1. Dual-stream, for instance two images, or two tracks in a Quicktime
 movie
 or AVI file (3D Blu-ray too, someday),
 2. Left-Right,
 3. Top-Bottom,
 4. Possibly, interleaved.

 Right now I've dealt mostly with 2  3, by padding two sets of tex coords
 along with 3D images. I intend to deal with 1 and 4 by splitting
 textures,
 maybe using 2 FBO attachments.

 The issues/options seem to be:

 Draw the images billboarded and at screen depth, so there's no extra
 parallax introduced.

 It would be great to be able to mask or draw a frame 'in-front' of the
 image, even though it's at zero, so the edges appear to be at the same
 depth
 as the content (or can be manipulated).

 Then I can either use a cull callback, since I believe cull runs once per
 eye, and reset tex-coords and/or which texture (or attachment of an FBO)
 to
 use,
 or place a duplicate item of each 3D texture in the graph, set it
 correctly
 on update, then set the stereo cullsettings correctly.

 Any suggestions? Did I miss a better technique?

 Regards,

 Bruce Wheaton


 ___
 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] Stereo with pre-split images streams

2010-02-15 Thread Robert Osfield
Hi Bruce,

Forgot to mention, doing stereo movies is identical to doing static
stereo image pairs, you just assign your image to a texture than is
assigned to two quads each with different tex coords to pick out the
correct part of the image for each eye.  The only difference is that
the Image would be a ImageStream read from the ffmpeg/quicktime/xine
plugin.

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


Re: [osg-users] Trilinear vs Bilinear

2010-02-15 Thread Robert Osfield
Hi Guy,

This sounds rather odd.  Going from bilinear to trilinear should not
have a significant effect on performance, as it would suggest that the
texture filtering is a bottleneck to a massive degree, something I
wouldn't expect any card made in the last decade to show.

So what is going on?  Well you can start by telling us what
performance you are getting and what other settings you are using that
may effect texture filtering performance.

Robert.

On Sat, Feb 13, 2010 at 12:04 AM, Guy Volckaert
guy.volcka...@meggitt.com wrote:
 Hi,

 I was wondering was experiencing the same odd behavior I am. I created a 
 visitor that essentially iterates through all the textures of a terrain scene 
 graph to change their texture filtering from bilinear to trilinear.

 When I replace the filtering from bilinear to trilinear, I get a boost of 50% 
 in performance. If I completely bypass my texture visitor then I get a bad 
 performance.

 This is contrary to what I've been told. I was under the impression tha 
 bilinear filtering was essentially free (as far as performance goes), and 
 that trilinear was a little more expensive (but fairly negligeable).

 This is not was I am observing. I've tried this on several different graphic 
 cards (9500 GT, 8800 GTX, 260, etc). The driver version I am using is v195.x 
 but it also happens on 185.x.

 Can someone explain this to me? Someone told me that the new GPUs are built 
 with trilinear in mind, and therefore would perform better is trilinear. Is 
 this true?

 Regards,








 Cheers,
 Guy

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





 ___
 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] precreating all opengl objects

2010-02-15 Thread Robert Osfield
HI Guy,

The osgViewer::Viewer/CompositeViewer run the GLObjectsVisitor vistor
to compile GL objects on the first frame that the viewer runs, but if
you add scene graph elements after this then you'll need to compile
these.  You can force the viewer to do another GLObjectsVisitor by
getting the Renderer from the Camera(s) and
setCompileOnNextDraw(true);.  For a viewer with a single camera do:

  osgViewer::Renderer* render =
dynamic_castosgViewer::Renderer*(viewer.getCamera()-getRenderer());
  renderer-setCompileOnNextDraw(true);

If you are incrementally add objects and wish to compile them bit by
bit then then you can use the osgUtil::IncrementalCompileOperator that
can be attached the viewer.  This is a little more complicated to use
though.

Robert.

On Sat, Feb 13, 2010 at 3:30 PM, Guy Volckaert
guy.volcka...@meggitt.com wrote:
 I've bee experiencing momentary frame drops when I rotate my camera in my 
 scene. After look at the osg code, I noticed that many of the opengl objects 
 are created during runtime and not when the model is loaded. For example, 
 opengl texture objects are only created when the Texture2d::apply() is 
 traversed. A drawable display lists is only created when its 
 Drawable::drawImplementation() is called.

 I suspect that, in case,  these runtime object creations are the cause of my 
 momentory frame drops.

 Is there a way to precreate all open objects located define in a scene graph? 
 That way I can confirm my suspicion.

 One way would be to have a VERY big camera frustum that encloses the entire 
 scene and then renders one frame, but that seems a little *hacked* to me. I 
 am trying to look for an alternative and better way to do that.

 Guy,

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





 ___
 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] This month in IEEE Computer Graphicsand Applications

2010-02-15 Thread Robert Osfield
On Mon, Feb 15, 2010 at 3:11 AM, Jason Daly jd...@ist.ucf.edu wrote:
 Yeah, it ported over to OSG pretty easily.  It runs quite a bit quicker than
 on the old SGI Indigos, too  :-)

Ahh brings back memories of living on the cutting edge.  The first
proper graphics computer I worked on was an SGI Indigo back in 1992.
It was eventually upgrade to an Indigo Elan and oh yeah then it rocked
:-)

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


Re: [osg-users] osgCandidate::VirtualProgram performance

2010-02-15 Thread Wojciech Lewandowski
Hi Nick, 

I am curious whether this slowdown is due to CPU work (scanning shader maps and 
selecting used ones) or GPU work (shaders are recompiled or linked too often). 
Do you have any profiling data to share ?

I do expect some performance degredation while using it vs standard 
osg::program. Thats related to active shader selection process in 
Virtual::Program apply. I expect this could become nasty when one uses a lot of 
virtual programs with many shader changing frequently.

Lets say that VirtualProgram in current candidate release was mainly intended 
as working functional prototype. I expected that implementing this 
functionality in target osg version would also require some modifications and 
optimizations to program state handling and few modifications to speed it up by 
caching last used set of shaders and programs.

Cheers,
Wojtek

- Original Message - 
  From: Trajce Nikolov 
  To: OpenSceneGraph Users 
  Sent: Friday, February 12, 2010 10:30 AM
  Subject: [osg-users] osgCandidate::VirtualProgram performance


  Hi,


  I am using this in my app and facing really performance problems. When I 
replace it with osg::Program and Shaders, it is a huge difference. Like from 
30Hz to 100Hz. Any ideas why it is so slow ?



  -Nick



--


  ___
  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] Build Osg with 64Bit (dependency)

2010-02-15 Thread Alexandre Amalric
Hi osg-users,

I'm interested in compiling osg with 64bits support but it seems to be
difficult to find all dependencies  for 64bits. So I was wondering if
someone already has a package from pre-built dependencies with Visual 2008
for 64bits ?

It could be interesting for OSG future to make compiling in 64bits as easy
as in 32bits.

Kind regards,

2010/2/11 Mourad Boufarguine mourad.boufargu...@gmail.com


 Thanks for the hints. I confirm, it is quite easy to build freetype. The
 distribution comes with visual 2008 project file, you need just to add x64
 config and build !

 Mourad


 On Thu, Feb 11, 2010 at 8:13 PM, Anders Backman ande...@cs.umu.se wrote:

 it has been Collada that has caused most of my grief. Iconv seems to be
 one of the most introvert gcc projects on this planet.

 I was happy for a while when I found this:
 http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/

 But it turned out, that it does not link with VisualStudio.

 Collada requires, part of boost, libxml2 and iconv.

 I found this link:

 https://collada.org/public_forum/viewtopic.php?f=12t=1221

 Where iconv, libxml2, pcre and zlib is built with 64bit.

 So, that should now make the list just about complete. Building the part I
 need from boost in 64 bit should not cause problems I hope. jpeg, zlib, png
 can easily be built from code. I hope this goes for FreeType too, not there
 yet.
 This really was more of a mess than I anticipated.

 I heard that according to steam (which current connects to quite a few
 window pc:s around the world) that the number of 64bit installations (due to
 windows7) is increasing exponentially, so this means that we will soon leave
 the 32bit world of applications.
 Maybe we will be able to build these things without problem, just when all
 other platforms has moved over to 128 but ;-)

 /Anders


 On Wed, Feb 10, 2010 at 9:27 PM, Mourad Boufarguine 
 mourad.boufargu...@gmail.com wrote:

 Hi Anders,

 I  am also strugling to build OSG in 64 bits under Windows (MSVC9 SP1).
 For the moment, I have these 3rdParty libs built in 64 bits :

 - jpeg
 - png
 - tiff
 - jasper
 - zlib
 - ffmpeg

 The first 5 libs can be easily staticly built within the OpenCV project
 using CMake (http://sourceforge.net/projects/opencvlibrary/), the latter
 (ffmpeg) can be found here http://ffmpeg.arrozcru.org/autobuilds/

  If you don't have these libs yet, let me know, I'll send them to you. If
 you succeeded in building some others, please let me know.

 Regards,

 Mourad


 On Wed, Feb 10, 2010 at 10:30 AM, Anders Backman ande...@cs.umu.sewrote:

 I will, in case I succeed :-)

 /A


 On Wed, Feb 10, 2010 at 10:27 AM, Torben Dannhauer 
 z...@saguaro-fight-club.de wrote:

 Hi,

 I haven't seen this, but it would be great if you post your prebuild
 package on OSG website.

 Thank you!

 Cheers,
 Torben

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





 ___
 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




-- 
Alexandre AMALRIC   Ingénieur RD
===
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCandidate::VirtualProgram performance

2010-02-15 Thread Trajce (Nick) Nikolov
Hi Wojtek,

I took a look at the apply method and I think an improvement would be to do
the shader fusion on a text level and then work with the standard osg
constructs. It is on my list for this week so I will post the results


-Nick


On Mon, Feb 15, 2010 at 12:34 PM, Wojciech Lewandowski 
lewandow...@ai.com.pl wrote:

  Hi Nick,

 I am curious whether this slowdown is due to CPU work (scanning shader maps
 and selecting used ones) or GPU work (shaders are recompiled or linked too
 often). Do you have any profiling data to share ?

 I do expect some performance degredation while using it vs standard
 osg::program. Thats related to active shader selection process in
 Virtual::Program apply. I expect this could become nasty when one uses a lot
 of virtual programs with many shader changing frequently.

 Lets say that VirtualProgram in current candidate release was mainly
 intended as working functional prototype. I expected that implementing this
 functionality in target osg version would also require some modifications
 and optimizations to program state handling and few modifications to speed
 it up by caching last used set of shaders and programs.

 Cheers,
 Wojtek

 - Original Message -

 *From:* Trajce Nikolov nikolov.tra...@gmail.com
 *To:* OpenSceneGraph Users osg-users@lists.openscenegraph.org
 *Sent:* Friday, February 12, 2010 10:30 AM
 *Subject:* [osg-users] osgCandidate::VirtualProgram performance

 Hi,

 I am using this in my app and facing really performance problems. When I
 replace it with osg::Program and Shaders, it is a huge difference. Like from
 30Hz to 100Hz. Any ideas why it is so slow ?


 -Nick

 --

 ___
 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] Build Osg with 64Bit (dependency)

2010-02-15 Thread Robert Osfield
Hi Alexandre,

On Mon, Feb 15, 2010 at 10:50 AM, Alexandre Amalric
alex.pix...@gmail.com wrote:
 I'm interested in compiling osg with 64bits support but it seems to be
 difficult to find all dependencies  for 64bits. So I was wondering if
 someone already has a package from pre-built dependencies with Visual 2008
 for 64bits ?

I don't know if it tackles the 64bit build, but have a look at the
CMakePorts project, it may be of some help.

 It could be interesting for OSG future to make compiling in 64bits as easy
 as in 32bits.

Compiling the OSG under 64bit *is* just as easy as 32bits.  Under
Unices/Linux there is no differences between the 64bit and 32bit
builds.  Life under Linux is particularly easy with all almost the
possible dependencies pre-built for you.

The problem isn't the OSG, but the dependencies on specific platforms,
i.e. Windows and OSX, neither of which have easily joined the 64bit
world with ease.  If you want to use these platforms then you have to
accept there is various platform specific issues to deal with, the
dependencies in just one of them.   If you can pick a better
development platform then lots of these issues just disappear.

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


[osg-users] PagedLOD usage??

2010-02-15 Thread Ufuk
Hi all,
sorry, this question seems very odd but i could not solved the problem.
i need simple paged lod mechanism and i can see that there is a class for
this purpose in osg named osg::PagedLOD

i have terrain pages with different resolutions. since there are many of
them, i don't want to load all of them at the beginning of the program. i
want them to be loaded when the camera goes there. osg::LOD works perfect
but it loads all the models at the beginning of the program.
i call the functions like that:

//CALL OF osg::LOD
osg::Node* node = osgDB::readNodeFile(filename);
lod-addChild(node, min, max);

//CALL OF osg::PagedLOD
osg::Node* node = new osg::Node();
pagedLOD-addChild(node, min, max, filename);


when i use PagedLOD instead of LOD, i dont load the node file at the
beginning. but the problem is when i use pagedLOD i cant see anything. it
just works when i use LOD.

do you think i miss something? should i use PagedLOD for my purpose or i
should implement something different??*

any idea would be great :)

thanks

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


Re: [osg-users] osg-users Digest, Vol 32, Issue 33

2010-02-15 Thread Julien Valentin
Hello,
I would like to make a prerender camera that loop over the rendering of its
son's geometries until an event happens and then display the result as a
texture with the main camera..

mainloop(){
  while(condition){
   tex=prerender_camera.draw() //render to texture using fbo
 }
 maincamera.draw()  //render the main scene using texture tex
}

(The condition depends on the post draw opengl state : an occlusion query..
)
I have try a few tricks without success
Can you help me for this?.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg-users Digest, Vol 32, Issue 33

2010-02-15 Thread Trajce (Nick) Nikolov
post your code. someone might help you out

-Nick


On Mon, Feb 15, 2010 at 5:29 PM, Julien Valentin julienvalenti...@gmail.com
 wrote:

 Hello,
 I would like to make a prerender camera that loop over the rendering of its
 son's geometries until an event happens and then display the result as a
 texture with the main camera..

 mainloop(){
   while(condition){
tex=prerender_camera.draw() //render to texture using fbo
  }
  maincamera.draw()  //render the main scene using texture tex
 }

 (The condition depends on the post draw opengl state : an occlusion
 query..  )
 I have try a few tricks without success
 Can you help me for this?.
 ___
 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] OSG - QT

2010-02-15 Thread fausto
Hi Robert, all,
I've read a post (I think started by Robert, but I cannot find the link
anymore) of some months ago that proposed a development aimed to improve the
osg-Qt integration.
Is there anything being done on this subject?

Thanks.

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


Re: [osg-users] Lego Augmented Reality

2010-02-15 Thread Jason Daly

Chris 'Xenon' Hanson wrote:

http://www.youtube.com/watch?v=PGu0N3eL2D0

  This smells like OSG. Anyone know who did it or how it was done?
  


Very cool.  I'm wondering how they're doing the tracking (I don't see 
any fiducials or anything).


--J

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


Re: [osg-users] [3rdparty] Blender osgExport armature scale

2010-02-15 Thread Cedric Pinson
Hi Mark,

I tried to export your blender file with the last version of exporter
and the trunk and it works fine.
So just update the exporter and osg-trunk and it will work for you too.


Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Wed, 2010-02-10 at 14:54 +, Mark Evin wrote:
 Hi,
 
 Cedric, thanks again for your help last month on osgExport.   I have another 
 question that perhaps you (or anyone) can shed light on...
 
 The armature location and rotation animations done in Blender seem to 
 exporting perfectly, but when I try to do an armature scale animation, there 
 is no response when exported and rendered in osg .. (it renders the object as 
 if there is no scale animation at all).
 
 I'm attaching a simple blender file and exported .osg file demonstrating my 
 process.  Hopefully through this you can see what I'm doing wrong.   
 
 Thanks very much!
 
 Cheers,
 Mark
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=23939#23939
 
 
 
 
 Attachments: 
 http://forum.openscenegraph.org//files/cubescaletest_472.zip
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Lego Augmented Reality

2010-02-15 Thread Chris 'Xenon' Hanson
On 2/15/2010 9:08 AM, Jason Daly wrote:
 Very cool.  I'm wondering how they're doing the tracking (I don't see
 any fiducials or anything).

  I wondered that too. They are obviously recognizing the boxcover image 
somehow too, so
they must be running against a database of potential boxcover images and then 
using THAT
at the fiducial rectangle.

  Rather nice work. Gonna have to go visit my local Lego store and see if THEY 
have it.

 --J

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
There is no Truth. There is only Perception. To Perceive is to Exist. - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Ernie Smethurst

  a chain of PAT Notes 


I'm not really sure what PAT notes are, I've checked the OSG quick start guide 
and cant see anything regarding PAT Notes.

Thanks for any input.

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





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


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Torben Dannhauer
Hi,

ups... ;) I have corrected it.

Thank you!

Cheers,
Torben

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





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


[osg-users] change yellow active color osgManipulator

2010-02-15 Thread Matthias Asselborn
Hi,

how can i change the color ( yellow ) 
of an active manipulator

Thank you!

Cheers,
Matthias

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





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


Re: [osg-users] website down (UNCLASSIFIED)

2010-02-15 Thread Butler, Lee Mr CIV USA USAMC
Classification:  UNCLASSIFIED 
Caveats: NONE

I'll second the notion that it would be good to have a more reliable
website.  Can anyone (Jose Luis?) say what the usual failure modes are?  My
naive impression is that it usually isn't the web server, but rather the DB
backend of TRAC (dying somewhere in python) that is usually the issue.

Lee

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: Saturday, February 13, 2010 9:09 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] website down

Hi all, hi Robert,

It seems to me that the OSG site has not been very reliable in the past few
months. We see these kinds of posts pretty often (maybe once every two
weeks?) and the problem often lasts for a day or more, and is most of the
time corroborated by multiple posters so it's probably not due to connection
issues on the users' part.

Nothing personal, it's great that Jose Luis volunteered to host the site at
his university, but if it's not reliable (maybe it's even for reasons
outside his control, but the result is the same) perhaps we should find
another host?

I think it looks bad for the project when the site is down a non-negligible
portion of the time.

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
Classification:  UNCLASSIFIED 
Caveats: NONE


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


Re: [osg-users] Lego Augmented Reality

2010-02-15 Thread Nico Kruithof
It seems they used openAR (augmented reality). There is a link from the
openar.net site to the lego movies as well. Indeed quite a nice application.

Bests,
Nico Kruithof

On Mon, Feb 15, 2010 at 7:36 PM, Tomlinson, Gordon 
gtomlin...@overwatch.textron.com wrote:


 As to who, I would say this would be their internal Software/RD group,
 I was interested in joining that group a few years ago especially when I
 was still involved with Mulitgen and Smartscene, they  had a really cool
 virtual Lego land demo in Smartscene. SmartScene was a great concept
 which just arrived way to early for the technology especially at the
 consumer level


 Gordon Tomlinson
 Product Manager 3d Technology  Future Products
 Overwatch(r)
 An Operating Unit of Textron Systems

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris
 'Xenon' Hanson
 Sent: Monday, February 15, 2010 11:22 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Lego Augmented Reality

 On 2/15/2010 9:08 AM, Jason Daly wrote:
  Very cool.  I'm wondering how they're doing the tracking (I don't see
  any fiducials or anything).

  I wondered that too. They are obviously recognizing the boxcover image
 somehow too, so they must be running against a database of potential
 boxcover images and then using THAT at the fiducial rectangle.

  Rather nice work. Gonna have to go visit my local Lego store and see
 if THEY have it.

  --J

 --
 Chris 'Xenon' Hanson, omo sanza lettere  Xenon
 AlphaPixel.com
 PixelSense Landsat processing now available!
 http://www.alphapixel.com/demos/ There is no Truth. There is only
 Perception. To Perceive is to Exist. - Xen
 ___
 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

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


Re: [osg-users] External threads and osgViewer

2010-02-15 Thread Paul Martz

Stefan Eilemann wrote:

I'll do some more testing, and probably create an
OpenThreads::createForCurrentThread() if I hit more issues. Somebody
suggested using SceneView in an offline email to me, but I'm not sure
if this is a good approach since it is marked deprecated. Any
opinions?


There exist applications that still depend on SceneView, and I happen to 
be working on one of them. If/when SceneView is ever actually removed 
from OSG (something I have no control over), my plan is to simply copy 
the header and cpp file into the project I'm working on. There's no 
reason why it should ever stop working (unless OSG is completely 
rewritten to remove the update/cull/draw paradigm).


I think you'd be safe coding to the SceneView interface.
   -Paul


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


Re: [osg-users] External threads and osgViewer

2010-02-15 Thread Robert Osfield
Hi Stefan + Paul,

My plan is to deprecate SceneView and eventually move it out of the
OSG into the deprecated section of the osg svn.

osgViewer will itself have to be capable to replacing SceneView in the
context that SceneView is used right now, it's mostly there already
but not perfect.

The advantage of higher level viewer constructs than SceneView is that
it enables us to change the way that the scene graph is managed
without breaking end user applications, and it also enables more
seamless application development when targeting different types of
display formats.

SceneView as it stands to both too high level for a low level
renderer, and too low level for a viewer.  A better low level renderer
will just manager a single Camera, CullVisitor and main RenderStage
for managing the rendering backend.  The extra complexities that
SceneView has hacks back to the early days of the OSG when the viewers
were more primitive and it attempted to pick up the slack with provide
stereo support etc.

Perhaps we should put together a very simple low level render to
facilitate the removal of SceneView, this way users really wanting low
level controls can have it, while users need proper viewers can go for
osgViewer.

Robert.

On Mon, Feb 15, 2010 at 8:16 PM, Paul Martz pma...@skew-matrix.com wrote:
 Stefan Eilemann wrote:

 I'll do some more testing, and probably create an
 OpenThreads::createForCurrentThread() if I hit more issues. Somebody
 suggested using SceneView in an offline email to me, but I'm not sure
 if this is a good approach since it is marked deprecated. Any
 opinions?

 There exist applications that still depend on SceneView, and I happen to be
 working on one of them. If/when SceneView is ever actually removed from OSG
 (something I have no control over), my plan is to simply copy the header and
 cpp file into the project I'm working on. There's no reason why it should
 ever stop working (unless OSG is completely rewritten to remove the
 update/cull/draw paradigm).

 I think you'd be safe coding to the SceneView interface.
   -Paul


 ___
 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] Lego Augmented Reality

2010-02-15 Thread Buckley, Bob CTR MDA/DES
FYI,

Web Strategy by Jeremiah Owyang
Breakdown: Lego's Digital Box, an Augmented Reality Kiosk
http://www.web-strategist.com/blog/2009/11/16/video-augmented-reality-at-lego-store-digital-box/

Metaio in Munich, Germany, developed the Digital Box.
They have their own SDK called The Unifeye
http://www.metaio.com/products/

This type of Alternate Reality is called Augmented Virtuality.
http://en.wikipedia.org/wiki/Mixed_reality

Blair MacIntyre, Associate Professor at Georgia Tech, is doing this type of 
work, but mostly on handhelds (i.e., Zune).

Horst Bischof, Professor at Graz University of Technology, is doing this type 
of real-time computer vision ... and then some!

They were both keynote speakers at last falls nVidia GPU Conference.
Important Trends in Visual Computing (General Session)
https://nvidiagtc.wingateweb.com/scheduler/schedule/eventDayView.jsp
Check out the video for a kewl real-time real world tire and a virtual rim with 
shading based on a real-time real world light source

Blair was also involved in www.ismar09.org

SmartScene - one of the 2 engineers (way early on) ended up going to work for 
Lego in Denmark.
He did VR research work for them at their Corporate Headquarters.
I don't know if that effort turned into a product or not.
He hasn't been with them for some time now.

Bob

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, 
Gordon
Sent: Monday, February 15, 2010 11:36 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lego Augmented Reality


As to who, I would say this would be their internal Software/RD group,
I was interested in joining that group a few years ago especially when I
was still involved with Mulitgen and Smartscene, they  had a really cool
virtual Lego land demo in Smartscene. SmartScene was a great concept
which just arrived way to early for the technology especially at the
consumer level


Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)
An Operating Unit of Textron Systems

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris
'Xenon' Hanson
Sent: Monday, February 15, 2010 11:22 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lego Augmented Reality

On 2/15/2010 9:08 AM, Jason Daly wrote:
 Very cool.  I'm wondering how they're doing the tracking (I don't see 
 any fiducials or anything).

  I wondered that too. They are obviously recognizing the boxcover image
somehow too, so they must be running against a database of potential
boxcover images and then using THAT at the fiducial rectangle.

  Rather nice work. Gonna have to go visit my local Lego store and see
if THEY have it.

 --J

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon
AlphaPixel.com
PixelSense Landsat processing now available!
http://www.alphapixel.com/demos/ There is no Truth. There is only
Perception. To Perceive is to Exist. - Xen
___
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
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Lego Augmented Reality

2010-02-15 Thread Thomas Hogarth
I think this was made by Metaio based in Germany. They use an in house
tracking sdk called unifeye which does fiducial as well as natural
feature tracking. I seem to remember they use Orge for rendering.

We're about to use their mobile sdk for a project at work. For PC and Mac we
use ARToolKit and OSG.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] External threads and osgViewer

2010-02-15 Thread Doug McCorkle


On Feb 15, 2010, at 2:30 PM, Robert Osfield wrote:

[snip]




Perhaps we should put together a very simple low level render to
facilitate the removal of SceneView, this way users really wanting low
level controls can have it, while users need proper viewers can go for
osgViewer.


I like the idea. Sounds like a good plan.

Doug

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


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Ernie Smethurst
Thanks for pointing me toward the PositonAttidudeTransform class.

Below is what im trying:

Code:

MatrixTransform *rotate_planetFive = new MatrixTransform;
   rotate_planetFive-addChild( geode_planetFive );
   rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(2.0f, 0.0f, 0.0f), osg::Z_AXIS, 
inDegrees(-300.0f)) );

PositionAttitudeTransform *trans_planetFive = new 
PositionAttitudeTransform;
rotate_planetFive-addChild( geode_planetFive );
rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(0.0f, 0.0f, 0.0f), osg::Z_AXIS, 
inDegrees(25.0f)) );




The MatrixTransform makes the object spin on its own axis and then the 
PositionAttitudeTransform makes the object orbit around a central point. 

When i run each part separately, they work fine but now i need them to do both 
at the same time, ands the problem. I add them to my scene like this:

Code:

simpleGroup-addChild(trans_planetFive);
simpleGroup-addChild(rotate_planetFive);




But they cannot work together at the same time.

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





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


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread R Fritz

1. Put your sun at the origin of world co-ordinates.
2. Put the planet at the origin. Make its axis of rotation the z axis.
3. Use a rotate transform to rotate it around its axis. (You've got this part.)
4. Translate the planet along the x axis, to its orbital radius.
5. Use a rotation around the z to position the planet in the x-y plane. 
(If the planet's orbit is not in the x-y plane, you will need more 
transformations.)


These techniques are covered in most introductory computer graphics 
texts--that's where to go to learn about this kind of problem; studying 
software docs won't get you very far.


Randolph

On 2010-02-14 19:22:50 -0800, Ernie Smethurst said:

I am trying to create a scene of a planetary system, using textures, 
lighting and primitives and am currently stuck with a problem that I 
cant quite work out, How to apply to rotations to a sphere. As it is a 
planet that I am trying to model it will rotate around its own axis and 
also rotate around a central sun.



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


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Jason Daly

R Fritz wrote:

1. Put your sun at the origin of world co-ordinates.
2. Put the planet at the origin. Make its axis of rotation the z axis.
3. Use a rotate transform to rotate it around its axis. (You've got this part.)
4. Translate the planet along the x axis, to its orbital radius.
5. Use a rotation around the z to position the planet in the x-y plane. 
(If the planet's orbit is not in the x-y plane, you will need more 
transformations.)


These techniques are covered in most introductory computer graphics 
texts--that's where to go to learn about this kind of problem; studying 
software docs won't get you very far.
  


I agree that you should try to familiarize yourself with the basics of 
computer graphics before asking the list about things like this.


That said, I'll try to explain the relevant parts at a high level...


Graphical 3D objects are composed of polygons, which are specified by 
their vertices (points in space).  Each object is typically modeled 
relative to the origin of Euclidean space (0, 0, 0).  In order to place 
an object somewhere else in space, or rotate it to a different 
orientation, you need to transform its vertices.  This is done by 
multiplying each vertex by a 4x4 matrix (I won't get into why the matrix 
is 4x4, you can look that up :-) ).  Transformation matrices can be set 
up to do translation (move vertices to another location relative to the 
origin), rotate, scale, and do other kinds of operations.  You can also 
combine operations (a translate, followed by a rotate, for example), by 
simply multiplying the individual transformation matrices together.


One more thing to realize is that each transformation essentially sets 
up a new, local coordinate system relative to the previously established 
system.  When you translate an object, say along the X-axis first, then 
rotate it, you'll be rotating the translated coordinate system around 
the world's origin, so your object will effectively orbit the origin.  
Now, purists will argue that it's really the other way around, and the 
rotate is really happening first, followed by a translate along the new, 
rotated X-axis.  It's all matter of perspective, though.  Until you 
grasp the concepts (which might be a while, believe me), if you think 
you have the sequence right, but it's not working, just try reversing 
it, and that will usually fix it  :-)


In your case, you have two objects (a sun and a planet).  The sun is 
easy to handle, just draw it exactly as its modeled.  The planet needs a 
total of three operations, though.  First you need to rotate the planet 
around its own axis, then you need to translate it away from the sun 
(about 93,000,000 miles should do  :-) ), then you need to rotate it 
again to have it orbit the sun around it


Now, in a scene graph like OSG, all transforms are applied as the graph 
is traversed from the root of the graph to the leaves, where the 
geometry lives.  So, in order to draw the scene like you want, you'll 
need to attach the sun to the root of the scene (so it will be drawn at 
the origin), then you'll need to create your three transformations and 
attach them as children of each other, attaching the planet to the final 
transform.  Like this:



 (root)
  /   \
   (sun) (orbit rotation
\
  (translation)
  \
   (planet rotation)
\
  (planet)


Now, I did this off the top of my head, so if it doesn't work, just try 
reversing the order, like I said above  :-)


--J

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


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Tomlinson, Gordon
Nice job Jason... 


Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)
An Operating Unit of Textron Systems

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason
Daly
Sent: Monday, February 15, 2010 6:26 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Two rotations on an object?

R Fritz wrote:
 1. Put your sun at the origin of world co-ordinates.
 2. Put the planet at the origin. Make its axis of rotation the z axis.
 3. Use a rotate transform to rotate it around its axis. (You've got 
 this part.) 4. Translate the planet along the x axis, to its orbital
radius.
 5. Use a rotation around the z to position the planet in the x-y
plane. 
 (If the planet's orbit is not in the x-y plane, you will need more
 transformations.)

 These techniques are covered in most introductory computer graphics 
 texts--that's where to go to learn about this kind of problem; 
 studying software docs won't get you very far.
   

I agree that you should try to familiarize yourself with the basics of
computer graphics before asking the list about things like this.

That said, I'll try to explain the relevant parts at a high level...


Graphical 3D objects are composed of polygons, which are specified by
their vertices (points in space).  Each object is typically modeled
relative to the origin of Euclidean space (0, 0, 0).  In order to place
an object somewhere else in space, or rotate it to a different
orientation, you need to transform its vertices.  This is done by
multiplying each vertex by a 4x4 matrix (I won't get into why the matrix
is 4x4, you can look that up :-) ).  Transformation matrices can be set
up to do translation (move vertices to another location relative to the
origin), rotate, scale, and do other kinds of operations.  You can also
combine operations (a translate, followed by a rotate, for example), by
simply multiplying the individual transformation matrices together.

One more thing to realize is that each transformation essentially sets
up a new, local coordinate system relative to the previously established
system.  When you translate an object, say along the X-axis first, then
rotate it, you'll be rotating the translated coordinate system around
the world's origin, so your object will effectively orbit the origin.  
Now, purists will argue that it's really the other way around, and the
rotate is really happening first, followed by a translate along the new,
rotated X-axis.  It's all matter of perspective, though.  Until you
grasp the concepts (which might be a while, believe me), if you think
you have the sequence right, but it's not working, just try reversing
it, and that will usually fix it  :-)

In your case, you have two objects (a sun and a planet).  The sun is
easy to handle, just draw it exactly as its modeled.  The planet needs a
total of three operations, though.  First you need to rotate the planet
around its own axis, then you need to translate it away from the sun
(about 93,000,000 miles should do  :-) ), then you need to rotate it
again to have it orbit the sun around it

Now, in a scene graph like OSG, all transforms are applied as the graph
is traversed from the root of the graph to the leaves, where the
geometry lives.  So, in order to draw the scene like you want, you'll
need to attach the sun to the root of the scene (so it will be drawn at
the origin), then you'll need to create your three transformations and
attach them as children of each other, attaching the planet to the final
transform.  Like this:


  (root)
   /   \
(sun) (orbit rotation
 \
   (translation)
   \
(planet rotation)
 \
   (planet)


Now, I did this off the top of my head, so if it doesn't work, just try
reversing the order, like I said above  :-)

--J

___
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] precreating all opengl objects

2010-02-15 Thread Guy Volckaert
Thanks for your quick response. This forum is fantastic. 

Although I haven't tried it yet, I think that Render::setCompileOnNextDraw() is 
exactly what I am looking for. 

Paul, I can't seem to find the osgUtil::IncrementalCompileOperator class you 
mentioned in OSG v2.8.2. Is that a new class in OSG v2.9.6?

Regards,

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





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


Re: [osg-users] [osgPlugins] dxf Plugin

2010-02-15 Thread Guopan Sun
Hi,

I debugged this plugin. I found findBlock(s) return a NULL block, because the 
block s is not read. 

dxfInsert::assign(dxfFile* dxf, codeValue cv)
{
std::string s = cv._string;
if (_done || (cv._groupCode == 0  s != INSERT)) {
_done = true;
return;
}
if (cv._groupCode == 2  !_block) {
_blockName = s;
_block = dxf-findBlock(s);
..

}

I work around this problem to add the following code in drawScene, 


void
dxfInsert::drawScene(dxfFile* dxf, scene* sc)
{
// INSERTs can be nested. So pull the current matrix
// and push it back after we fill our context
// This is a snapshot in time. I will rewrite all this to be cleaner,
// but for now, it seems working fine 
// (with the files I have, the results are equal to Voloview,
// and better than Deep Exploration and Lightwave).

if (!_block)
{
_block = dxf-findBlock(_blockName);
}

// sanity check (useful when no block remains after all unsupported 
entities have been filtered out)

if (!_block)
{
return;
}

}

Cheers,
Guopan

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





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


Re: [osg-users] Two rotations on an object?

2010-02-15 Thread Ernie Smethurst
Thank you all for your replies, Much appreciated.

I understand about how 3D graphics works in regards to coordinate systems and 
such and i understand how I want the scene to act and work, its just getting 
the code to actually make this happen. Going about applying the two transforms 
to my sphere is where i am stuck because i dont have a firm grasp with the OSG 
language.

For example, below rotates a sphere that is originally placed as 10,0,0 around 
0,0,0 (imagine that is where a sun is placed), whilst it is doing that i also 
need it to rotate on its own central axis. As it will be spinning on its own 
XYZ which will change as it rotates i choose its current XYZ postion as the 
point on which to rotate using the getCenter() method, still cant get it 
working though.


Code:

PositionAttitudeTransform *rotate_planetFive = new PositionAttitudeTransform;
rotate_planetFive-addChild( geode_planetFive );
rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(0,0,0), osg::Z_AXIS, inDegrees(45.0f)) ); 
//ROTATE AROUND THE SUN

Vec3 central_point = primitive_planetFive-getCenter(); //GET THE CURRENT 
LOCATION OF THE CIRCLE WHILST IS ROTATES

PositionAttitudeTransform *rotate_planetFiver = new PositionAttitudeTransform;
rotate_planetFiver-addChild( geode_planetFive );
rotate_planetFiver-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(central_point), osg::Z_AXIS, inDegrees(45.0f)) 
); //USING THE SPHERE CURRENT LOCATION, ROTATE AROUND IT.




Doing this and, as expected, two spheres are shown, one that stays at its 
original location and just spins and another that orbits around 0,0,0.

Now I need to combine both of the transforms onto a single sphere, but i just 
cant figure out the code for that. I tried this:

Code:

PositionAttitudeTransform *rotate_planetFive = new PositionAttitudeTransform;
rotate_planetFive-addChild( geode_planetFive );
rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(0,0,0), osg::Z_AXIS, inDegrees(45.0f)) ); 
//ROTATE AROUND THE SUN
Vec3 central_point = primitive_planetFive-getCenter(); //GET THE CURRENT 
LOCATION OF THE CIRCLE WHILST IS ROTATES
rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(central_point), osg::Z_AXIS, inDegrees(45.0f)) 
);



But that doesnt work, it only applies the second setUpdateCallback() when i 
need both to run.

Sorry if it seems I am posting excessively, I just get a little bit obsessive 
when I cant get the coding correct, Apologies.

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





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


Re: [osg-users] letiste

2010-02-15 Thread Trajce (Nick) Nikolov
huh .. sorry guys  didnt wanned to post this here ...
-Nick


2010/2/16 Trajce (Nick) Nikolov nikolov.tra...@gmail.com

 ano doslo. vse v poradku. tady mas snapshot

 -Nick

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


Re: [osg-users] osg-users Digest, Vol 32, Issue 33

2010-02-15 Thread J.P. Delport

Hi,

use this as a starting point and look at the thread referenced there as 
well.


http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/49423

jp

Julien Valentin wrote:

Hello,
I would like to make a prerender camera that loop over the rendering of 
its son's geometries until an event happens and then display the result 
as a texture with the main camera..


mainloop(){
  while(condition){
   tex=prerender_camera.draw() //render to texture using fbo
 }
 maincamera.draw()  //render the main scene using texture tex
}

(The condition depends on the post draw opengl state : an occlusion 
query..  )

I have try a few tricks without success
Can you help me for this?.




___
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-users Digest, Vol 32, Issue 33

2010-02-15 Thread J.P. Delport

Also see this:
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/50502

J.P. Delport wrote:

Hi,

use this as a starting point and look at the thread referenced there as 
well.


http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/49423

jp

Julien Valentin wrote:

Hello,
I would like to make a prerender camera that loop over the rendering 
of its son's geometries until an event happens and then display the 
result as a texture with the main camera..


mainloop(){
  while(condition){
   tex=prerender_camera.draw() //render to texture using fbo
 }
 maincamera.draw()  //render the main scene using texture tex
}

(The condition depends on the post draw opengl state : an occlusion 
query..  )

I have try a few tricks without success
Can you help me for this?.




___
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] Lego Augmented Reality

2010-02-15 Thread Yann Le Paih

Hi,
It's probably : total immersion

http://www.t-immersion.com/

http://www.virtualworldsnews.com/2008/06/video-augmented.html

,Yann

Envoyé de mon iPhone

Le 15 févr. 2010 à 21:46, Buckley, Bob CTR MDA/DES bob.buckley@mda.m 
il a écrit :



FYI,

Web Strategy by Jeremiah Owyang
Breakdown: Lego's Digital Box, an Augmented Reality Kiosk
http://www.web-strategist.com/blog/2009/11/16/video-augmented-reality-at-lego-store-digital-box/

Metaio in Munich, Germany, developed the Digital Box.
They have their own SDK called The Unifeye
http://www.metaio.com/products/

This type of Alternate Reality is called Augmented Virtuality.
http://en.wikipedia.org/wiki/Mixed_reality

Blair MacIntyre, Associate Professor at Georgia Tech, is doing this  
type of work, but mostly on handhelds (i.e., Zune).


Horst Bischof, Professor at Graz University of Technology, is doing  
this type of real-time computer vision ... and then some!


They were both keynote speakers at last falls nVidia GPU Conference.
Important Trends in Visual Computing (General Session)
https://nvidiagtc.wingateweb.com/scheduler/schedule/eventDayView.jsp
Check out the video for a kewl real-time real world tire and a  
virtual rim with shading based on a real-time real world light  
source


Blair was also involved in www.ismar09.org

SmartScene - one of the 2 engineers (way early on) ended up going to  
work for Lego in Denmark.

He did VR research work for them at their Corporate Headquarters.
I don't know if that effort turned into a product or not.
He hasn't been with them for some time now.

Bob

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- 
boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon

Sent: Monday, February 15, 2010 11:36 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lego Augmented Reality


As to who, I would say this would be their internal Software/RD  
group,
I was interested in joining that group a few years ago especially  
when I
was still involved with Mulitgen and Smartscene, they  had a really  
cool

virtual Lego land demo in Smartscene. SmartScene was a great concept
which just arrived way to early for the technology especially at the
consumer level


Gordon Tomlinson
Product Manager 3d Technology  Future Products
Overwatch(r)
An Operating Unit of Textron Systems

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris
'Xenon' Hanson
Sent: Monday, February 15, 2010 11:22 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lego Augmented Reality

On 2/15/2010 9:08 AM, Jason Daly wrote:

Very cool.  I'm wondering how they're doing the tracking (I don't see
any fiducials or anything).


 I wondered that too. They are obviously recognizing the boxcover  
image

somehow too, so they must be running against a database of potential
boxcover images and then using THAT at the fiducial rectangle.

 Rather nice work. Gonna have to go visit my local Lego store and see
if THEY have it.


--J


--
Chris 'Xenon' Hanson, omo sanza lettere  Xenon
AlphaPixel.com
PixelSense Landsat processing now available!
http://www.alphapixel.com/demos/ There is no Truth. There is only
Perception. To Perceive is to Exist. - Xen
___
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
___
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] Ray intersection with ellipsoid model

2010-02-15 Thread Luc Claustres
Hi,

I'd like to compute the intersection between a ray and an ellipsoid model 
object. I think that the best idea will be to compute the 4x4 transformation 
that distorts a sphere into the ellipsoid model. However, I wonder how can I 
extract this matrix from the ellipsoid model ?

Any other (simple) idea is also welcome...

Thank you!

Cheers,
Luc

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





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


Re: [osg-users] precreating all opengl objects

2010-02-15 Thread Robert Osfield
Hi Guy,

On Mon, Feb 15, 2010 at 11:45 PM, Guy Volckaert
guy.volcka...@meggitt.com wrote:
 Thanks for your quick response. This forum is fantastic.

 Although I haven't tried it yet, I think that Render::setCompileOnNextDraw() 
 is exactly what I am looking for.

 Paul, I can't seem to find the osgUtil::IncrementalCompileOperator class you 
 mentioned in OSG v2.8.2. Is that a new class in OSG v2.9.6?

It was actually me who suggested it.  As for version this was added
back in March last year, but hasn't made it into the OSG-2.8.x branch.

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