[osg-users] picking node and arraging to it proper location

2010-01-04 Thread manish Choudhary
Hi,

I'm working on problem in which user develop  simple shape like building , hut 
, table etc.  by arranging basic shape like cylinder,cube,hemisphere etc.
using mouse .
Thus my application allow user to design there own shape from basic model using 
mouse .

I'm facing problem in picking node , arranging and transfer that node according 
to my requirement .
If there is some example related to this kindly let  me know?



... 

Thank you!

Cheers,
manish

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





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


Re: [osg-users] PBOs for images and textures

2010-01-04 Thread Guy
Hi J.P.

 First of all, I haven't tried anything yet. It seems to me more than a
minor change so I didn't want to start messig up OSG code with my own
gibrish :)

 Second, I've looked at the screen capture examples, but it's not a
generic solution (no offense, it's only my opinion).

 Third, about gaining performance, what is the format of RTT you are
using? I remember I once implemented DMA access to textures in an OpenGL
application. For RGB images it was slower than the glReadPixel, but for
RGBA images it was faster. I assume it depends on the driver.

I wonder if I should try and code the DMA access to the draw callback
after you already have done it. I trust you did a good job and if it
didn't gain performance I doubt I could do something better.

Currently the read-back is THE slowest section of my application.

Thanks for the answer, if I'll have time I'll try it also and share the
results with the forum.

Guy. 

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
Delport
Sent: Monday, January 04, 2010 9:20 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] PBOs for images and textures

Hi,

I've been fiddling with some of this at the end of last year for fast 
GPU to CPU. You could insert your code into the draw callback. Have you 
tried it? How is the performance? I could not make anything faster than 
the default readimage. You could also look at osgscreencapture for
examples.

jp

Guy wrote:
 Hi all,
 
  I was wondering why when there is an image attached to an FBO camera 
 buffer, the data transfer is made by glReadImage from the READ_BUFFER 
 and not by glMapBuffer after copying the READ_BUFFER to PBO?
 
  
 
 The same question goes in the other direction for updating textures
with 
 glTexSubImage.
 
  
 
 Wouldn't that be faster (using the DMA)? Is there a scenario which it 
 wouldn't be better that I miss.
 
 If it is the best way I don't mind trying to help doing so, but I
guess 
 I'd need help designing it.
 
 My initial approach is:
 
 1. Add PBO object to image. (could be null)
 
 2. Change image readpixels function to the following:
 
 If( PBO )
 
 {
 
 Copy pixels from READ_BUFFER to PBO
 
 Get PBO address
 
 Memcopy(data, address)
 
 }
 
 Else
 
OldImageReadPixels
 
 3. When attaching image to camera buffer automatically allocate PBO to

 that image.
 
  
 
 That way there will be no change in render stage or any other part of
OSG.
 
  
 
 For textures there can be something similar. The Texture has PBO
object, 
 the function apply will check for the PBO if exists then copy data to 
 the PBO address, then bind it and use glTexSumImage and in similar way

 change the copyTex to copy to the PBO and then from it's mapped
address 
 to a CPU address.
 
 In textures maybe part of it could be implemented in subload callback.
 
  
 
 Is it the correct path?
 
 Does it already exists and I missed it? If so I'm sorry for the
noise... :)
 
  
 
 Thanks,
 
  Guy.
 
  
 
  
 
 


 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g

-- 
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.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Node::Description intoageneralized propertymechanism?

2010-01-04 Thread Thrall, Bryan
Ulrich Hertlein wrote on 2009-12-31: 
 I have coded up a proposal for a general-purpose property system for
 osg::Object and would
 like to present it for comments and discussion.

Looks very cool!

 For data that is not derived from osg::Referenced (like floats, int,
 strings) instead of
 using a variant class I've created the following template class:
 
 template typename T class Property : public Referenced {
 public:
 //...
 void set(const T data) { _data = data; }
 const T get() const { return _data; }
 T get() { return _data; }
 private:
 T _data;
 };
 
 Data is stored like this:
 osg::Propertyint* ip = new osg::Propertyint(42);
 obj-setProperty(my.int, ip);
 
 and retrieved like this:
 osg::Propertyint* ip0 = dynamic_castosg::Propertyint (obj-
 getProperty(my.int));
 ip0-get() == 42;

The assignment and comparison syntax is a little odd; I think adding 
operator=(), operator==(), etc. to osg::Property would be better, so you could 
do

*obj-getPropertyint(my.int) = 42;
if (*obj-getPropertyint(my.int) == 42) { ...}

Thanks for the hard work, I'm looking forward to seeing this in OSG :)
--
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
  

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


Re: [osg-users] Node::Description into ageneralized propertymechanism?

2010-01-04 Thread Chris 'Xenon' Hanson
On 12/31/2009 4:22 AM, Ulrich Hertlein wrote:
 Hi guys,
 I have coded up a proposal for a general-purpose property system for 
 osg::Object and would
 like to present it for comments and discussion.

  I'd like to take another day or so to digest this, as I'm very interested in 
it. Are you
planning on implementing this yourself, or are you writing it in hopes someone 
else will
code it?

-- 
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


[osg-users] Error moving in Z-axis

2010-01-04 Thread Wagner Dias
Hi,

Using WindowManager I can't move the geometry in Z-axis. Even setting MASC_3D 
on WindowManager and setProjectionMatrixAsOrtho on camera
I have no problem whit others axis.

Thank you!

Cheers,
Wagner

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





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


[osg-users] [build] Build problem

2010-01-04 Thread Andy Garrison
Hi,

I have been trying to build OpenScenGraph on RedHat Linux 5 64 bit and get the 
error missiing glu.h and glut.h files. They are suppose to reside in the 
/usr/local/include/GL directory. I have installed all the packages with RedHat 
and those files do not exist. I had OSG on a 32 bit version with RedHat 4 and 
it worked fine Has anyone seen this problem and where and how do I go about 
resolving this to get it installed?

Thank you!

Cheers,
Andy

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





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


Re: [osg-users] [build] Build problem

2010-01-04 Thread Leif Delgass
On Mon, Jan 4, 2010 at 12:26 PM, Andy Garrison garrison_tho...@bah.com wrote:
 Hi,

 I have been trying to build OpenScenGraph on RedHat Linux 5 64 bit and get 
 the error missiing glu.h and glut.h files. They are suppose to reside in the 
 /usr/local/include/GL directory. I have installed all the packages with 
 RedHat and those files do not exist. I had OSG on a 32 bit version with 
 RedHat 4 and it worked fine Has anyone seen this problem and where and how do 
 I go about resolving this to get it installed?

 Thank you!

 Cheers,
 Andy

Hi Andy,

You need to install 2 packages:
% yum install mesa-libGLU-devel freeglut-devel

This will give you /usr/include/GL/glu.h and /usr/include/GL/glut.h,
along with the 64-bit libraries for GLU and glut in /usr/lib64.

Note that the mesa libGLU package is independent of the Mesa/DRI
OpenGL hardware drivers, so it won't cause any conflict with the
NVIDIA or AMD/ATI proprietary drivers if you use them.

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


Re: [osg-users] [osgPlugins] New ffmpeg plugin checked into svn/trunk

2010-01-04 Thread Chris Rodgers
Hi Robert,

Would there be any chance that the AudioStream class and ImageStream interface 
changes can be added to OSG 2.8.x?

In one of our projects we had been using the QuickTime plugin without a 
problem. However, we have a requirement from our customer to remove the 
QuickTime dependency. The FFmpeg plugin looks to be the solution to our 
problems, though we have to keep OSG at version 2.8 (unless 2.10 or 3.0 is 
coming very soon).

Best regards,

Chris

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





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


Re: [osg-users] Write to texture file for lightning

2010-01-04 Thread Dominic Stalder

Sorry for hesitating, but the time of our project is running ;-)

Someone any idea what I did wrong with the texture / image camera? Or is 
there a problem with the addChild hirarchy?


Thanks a lot

Am 03.01.10 12:05, schrieb Dominic Stalder:

Hi Ulrich

thanks a lot, big mistake ;-)

Now the color is not black any more, but it only takes the gl clear 
color of the the camera. Do I have to set some view matrices?


Dominic

Am 03.01.10 11:50, schrieb Ulrich Hertlein:

Hi Dominic,

a happy new year to you too.

On 2/01/10 10:00 PM, Dominic Stalder wrote:

 Image* image = new Image;
 image-allocateImage(osgViewer-width(), osgViewer-height(), 1,
GL_RGBA, GL_UNSIGNED_BYTE);

 // creates a new camera that will render into the image and 
sets the

rendering settings
 ref_ptrCamera  imgCamera = new Camera;
...
 imgCamera-addChild(rootLighting.get());

 root-addChild(imgCamera.get());

 osgDB::writeImageFile(*image, /Users/xyz/tmp/test.bmp);

It allocates the image with the right size (1400 x 736) and writes 
it to

disk. But the image is all black.
Did you omit some code between 'root-addChild()' and 
'writeImageFile'?  There should be a
call to render the frame (like 'osgViewer-frame()') otherwise the 
Image will remain black.



Does anybody see an error or what could be the problem? I also tried
with GL_INT instead of GL_UNSIGNED_BYTE but this didn't work too. Is
there a problem with the hirachy:

GL_U_B is fine, this will probably also give you better performance.

Cheers,
/ulrich
___
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] OSG Max Exporter Modifications

2010-01-04 Thread Chris Rodgers
Hi Robert,

Several months ago I had modified the OSG Max Exporter to address some issues 
artists were running into. More about the changes can be read on the Delta3D 
forum post at delta3d org - Forum - Artists' Studio - OSG Exporter for 3DS 
Max 2010.

In short, the changes allow OSG helpers to become parts of model hierarchies, 
prevent doubly referencing objects, and overall simplify helper assignments via 
the 3DS Max Schematic View and Link tool.

Currently the code is accessible as a project with the Delta3D source code. 
With a few tweaks the project can be OSG-ready. Please let me know if would 
like me to send the the source you way.

Cheers :)

Chris

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





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


[osg-users] [osgPPU] CMake error in FindOSG.cmake

2010-01-04 Thread Thrall, Bryan
The last two paths in OSG_SEARCH_PATHS in osgPPU's FindOSG.cmake don't properly 
escape backslashes, causing CMake (I'm using version 2.6) to error when trying 
to configure on Windows and osgPPU is not right next to OSG:

C:\Program Files\OpenSceneGraph
C:\Program Files (x86)\OpenSceneGraph

Should be:

C:\\Program Files\\OpenSceneGraph
C:\\Program Files (x86)\\OpenSceneGraph

Fixed FindOSG.cmake is attached.

--
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
  




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


Re: [osg-users] [osgPPU] CMake error in FindOSG.cmake

2010-01-04 Thread Paul Martz
That was my mistake, found it after I posted the addition of these 
paths, but forgot to contact Art about it.


Forward slashes also work.

(Not sure why CMake is treating these as literal char strings... Seems 
like a bug in how CMake is parsing the file...)


Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466



Thrall, Bryan wrote:

The last two paths in OSG_SEARCH_PATHS in osgPPU's FindOSG.cmake don't properly 
escape backslashes, causing CMake (I'm using version 2.6) to error when trying 
to configure on Windows and osgPPU is not right next to OSG:

C:\Program Files\OpenSceneGraph
C:\Program Files (x86)\OpenSceneGraph

Should be:

C:\\Program Files\\OpenSceneGraph
C:\\Program Files (x86)\\OpenSceneGraph

Fixed FindOSG.cmake is attached.

--
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
  







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

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


Re: [osg-users] [osgPPU] CMake error in FindOSG.cmake

2010-01-04 Thread Thrall, Bryan
Paul Martz wrote on 2010-01-04: 
 That was my mistake, found it after I posted the addition of these
 paths, but forgot to contact Art about it.
 
 Forward slashes also work.
 
 (Not sure why CMake is treating these as literal char strings... Seems
 like a bug in how CMake is parsing the file...)

Apparently, CMake allows escaping inside strings using backslash (see 
http://www.cmake.org/cmake/help/syntax.html), hence the need to escape the 
backslashes.

 Thrall, Bryan wrote:
 The last two paths in OSG_SEARCH_PATHS in osgPPU's FindOSG.cmake
 don't properly escape backslashes, causing CMake (I'm using version
 2.6) to error when trying to configure on Windows and osgPPU is not
 right next to OSG:
 
 C:\Program Files\OpenSceneGraph
 C:\Program Files (x86)\OpenSceneGraph
 
 Should be:
 
 C:\\Program Files\\OpenSceneGraph
 C:\\Program Files (x86)\\OpenSceneGraph
 
 Fixed FindOSG.cmake is attached.

--
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
  


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


Re: [osg-users] picking node and arraging to it proper location

2010-01-04 Thread Martin Beckett
Take a look at the osgpick example and osgkeyboardmouse.

If you are picking an object with a size (a surface) look at line interesect 
visitor, there is a tutorial here 
http://www.openscenegraph.org/documentation/NPSTutorials/osgIntersect.htm

Martin

ps. it seems horribly complex but when you get it -  OSG makes a lot of sense

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





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


Re: [osg-users] Write to texture file for lightning

2010-01-04 Thread J.P. Delport

Hi,

have you tried writing the image in the camera callback? Maybe have a 
look at osgprerender and osgscreencapture.


jp

Dominic Stalder wrote:

Sorry for hesitating, but the time of our project is running ;-)

Someone any idea what I did wrong with the texture / image camera? Or is 
there a problem with the addChild hirarchy?


Thanks a lot

Am 03.01.10 12:05, schrieb Dominic Stalder:

Hi Ulrich

thanks a lot, big mistake ;-)

Now the color is not black any more, but it only takes the gl clear 
color of the the camera. Do I have to set some view matrices?


Dominic

Am 03.01.10 11:50, schrieb Ulrich Hertlein:

Hi Dominic,

a happy new year to you too.

On 2/01/10 10:00 PM, Dominic Stalder wrote:

 Image* image = new Image;
 image-allocateImage(osgViewer-width(), osgViewer-height(), 1,
GL_RGBA, GL_UNSIGNED_BYTE);

 // creates a new camera that will render into the image and 
sets the

rendering settings
 ref_ptrCamera  imgCamera = new Camera;
...
 imgCamera-addChild(rootLighting.get());

 root-addChild(imgCamera.get());

 osgDB::writeImageFile(*image, /Users/xyz/tmp/test.bmp);

It allocates the image with the right size (1400 x 736) and writes 
it to

disk. But the image is all black.
Did you omit some code between 'root-addChild()' and 
'writeImageFile'?  There should be a
call to render the frame (like 'osgViewer-frame()') otherwise the 
Image will remain black.



Does anybody see an error or what could be the problem? I also tried
with GL_INT instead of GL_UNSIGNED_BYTE but this didn't work too. Is
there a problem with the hirachy:

GL_U_B is fine, this will probably also give you better performance.

Cheers,
/ulrich
___
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



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


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


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


[osg-users] [build] How to compile OSG examples with OSX 10.5 / XCode 3.0 binaries?

2010-01-04 Thread Roger Wehage
Hi,

I downloaded and installed the OpenSceneGraph OSX 10.5 / XCode 3.0 binaries, 
but I can't find the example programs. I assume they are not included with that 
download.

I can get the example programs by downloading the source, but I can't batch 
compile them using cmake. Can they be batch compiled using Xcode 3.1?

Thank you!

Cheers,
Roger

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





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


Re: [osg-users] OSG on IPhone

2010-01-04 Thread Changhoon Park
Hello

Is there are anyone who know about license problem when modifying osg for 
iphone?  Should I open source code or object file and overall or a part related 
to OSG?


In the case of cocos2d, there is a special license for iPhone like the below.

cocos2d for iPhone was originally licensed under the GNU LGPL v3 license.
But since it is impossible to distribute 3rd party dynamic libraries
for the iPhone, this license extends the GNU LGPL v3 license by allowing you: 
  a) to use cocos2d for iPhone as a static library
  b) to include all or part of the cocos2d for iPhone sources inside your 
project

This means that if you do a) and/or b) you are NOT forced to release your 
source code under the GNU LGPL v3 license.

Changhoon

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





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


Re: [osg-users] [osgPPU] CMake error in FindOSG.cmake

2010-01-04 Thread Art Tevs
Hi Bryan,

Thank you for the patch. Changes are submitted to svn.
Hmm, I wonder why on my machine with cmake-2.6-patch4 installed I didn't get 
any issues with the backslash. Maybe I forgot to try to create just fresh build 
directory, so that cached paths were in use.


Art

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





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