Re: [osg-users] OSG on Android ?

2010-06-10 Thread Ulrich Hertlein
On 10/06/10 14:32 , Vivek Kumar Dwivedi wrote:
 Don't send me messages

Unsubscribe and they'll go away:
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] Using osgAnimation for material animation?

2010-06-10 Thread Raymond de Vries

Hi Serge,

I am looking into nathan.osg and osganimationtimeline and see that the 
head diffuse should be animated. Is that correct? However, I don't see 
that the diffuse value is being animated (checked the values).


Can you please confirm that this demo is supposed to work? I am using 
svn of both osg and osg-data.


Cheers
Raymond



On 6/9/2010 3:02 PM, Raymond de Vries wrote:

Hi,

Ah, I did take a look at nathan but not close enough, obviously...

Any idea how to get it from 3dsmax?

thnx
Raymond


On 6/9/2010 2:51 PM, Serge Lages wrote:

Hi,

Have a look to the nathan.osg example file, one of the animations 
animates the material.


Cheers,

On Wed, Jun 9, 2010 at 2:48 PM, Raymond de Vries ree...@xs4all.nl 
mailto:ree...@xs4all.nl wrote:


Hi everyone,

I would like to find a way to animate my material (amb, diff,
spec, emiss), and more specifically for now: the alpha component.
Now that osgAnimation is very useful I would like to implement
this via osgAnimation. In the examples (svn) I don't see an
example, or else I am overlooking it maybe.

Is there such an example? Or else what's the best way to animate
the material colors?

Also, does anyone know a way to get an animated opacity from
3dsmax into osg?

thanks a lot
Raymond

___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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
   



___
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] OSGEXP 0.9.7 Crashing Max

2010-06-10 Thread Huan Wei
Hi,
I have experienced the same problem, I test in 3ds Max2009/WindowsXP/Windows7, 
it can popup the preview window, but error writing to file when exporting 
.osg, and no respond when exporting .ive.

can anyone help?
... 

Thank you!

Cheers,
Huan

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





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


[osg-users] hide shadow map receiver

2010-06-10 Thread Huan Wei
Hi,
i use osgshadow in osgart, the shadow map work fine. the model is standing on a 
plane, shadow cast to the plane, the plane is attach to the pattern, what i 
want is to make the plane invisible but the shadow remains, to make it looks 
like shadow on the top of pattern. i try alpha blending the plane, the result 
is not good, shadow become transparency too.
... 

Thank you!

Cheers,
weihuan

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





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


Re: [osg-users] OSGEXP 0.9.7 Crashing Max

2010-06-10 Thread Maxim Gammer
delete all osg*.dll and plugindir in system32

2010/6/10 Huan Wei kuta...@163.com:
 Hi,
 I have experienced the same problem, I test in 3ds 
 Max2009/WindowsXP/Windows7, it can popup the preview window, but error 
 writing to file when exporting .osg, and no respond when exporting .ive.

 can anyone help?
 ...

 Thank you!

 Cheers,
 Huan

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





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




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


[osg-users] strange problems about memory used

2010-06-10 Thread Kai Xia
Hi,

I currently do a car sim program, and I encount a problem about heigh memory  
CPU used when I add RTT camera:
I want add 3 back mirrors to the car, so I create 3 relative camera to render 
the scene to a texture, and use root-addChild(mirror_camera) to bind camera to 
root node, these mirror camera render the same scene but with different 
shader(which is more simple than main camera rendering), the struct of the root 
is like this:
root
 /  \
   mirror_camera0 group(complex shader)
 /   \
group(bind simple shader)  scene_node
 /
 scene_node
the scene is load from ive file which is about 10MB, when I render with no 
mirror camera, the memory left is about 900MB( I read from windows taskManager 
and the total memory of my computer is 2GB), and when I use 3 mirror cameras, 
the memory left is only about 80MB, and also high CPU used. and My scene is 
very simple which only contained 2 textures and 80 Geometry, with about 400,000 
tri_strip, In my opinion the scene_node can be shadered between diffferent sub 
cameras and main scene, is there anything wrong with my approach?

Thank you!

Cheers,
Kai

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





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


Re: [osg-users] Draw polyline from vertex array

2010-06-10 Thread Robert Osfield
Hi Manuel,

There isn't really enough code provided to pinpoint the problem.  Odd
things are that you assign a ColorBinding to BIND_OVERALL but then
don't provide any colour array for it to get it's colour from.

Have a look the osggeometry example as it has a code segment that does
a line strip.

Robert.

On Thu, Jun 10, 2010 at 5:40 AM, Manuel Garea m.garea...@gmail.com wrote:
 Hi,

 I need to draw a polyline from an array of vertex, that is, I have an array 
 of points, for example:

 vertex[1] = (1,3,4)
 vertex[2] = (7,4,0)
 vertex[3] = (5,5,1)
 vertex[4] = (1,2,9)

 and I need to join them making a line strip:

 For this I tried the following code, but it doest'n work, do someone know why 
 it doesnt show anything???


 Code:

 osg::Vec3Array* vertices = .

 osg::Geometry* geometry = new osg::Geometry;
 geometry-setVertexArray(vertices);
 geometry-addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP, 0, 
 vertices-size()));
 geometry-setColorBinding(osg::Geometry::BIND_OVERALL);

 geode-addDrawable(geometry);



 Thank you!

 Cheers,
 Manuel

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





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

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


[osg-users] How can I define the screen which show me my viewer?

2010-06-10 Thread Martin Großer

Hello,

I get the number of screens with the following lines:

_wsi = _gc-getWindowingSystemInterface();
std::cout  Detected Screens:   _wsi-getNumScreens()  std::endl;

My question is: How can I define the screen which show me my viewer?

Cheers

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


Re: [osg-users] How can I define the screen which show me my viewer?

2010-06-10 Thread Trajce (Nick) Nikolov
looks in the traits for setup your viewer. osgcompositeviewer example shows
usage of traits

-Nick


2010/6/10 Martin Großer grosser.mar...@gmx.de

 Hello,

 I get the number of screens with the following lines:

 _wsi = _gc-getWindowingSystemInterface();
 std::cout  Detected Screens:   _wsi-getNumScreens()  std::endl;

 My question is: How can I define the screen which show me my viewer?

 Cheers

 Martin
 ___
 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 can I define the screen which show me my viewer?

2010-06-10 Thread Torben Dannhauer
Hi LittleG,

you can control the screen which OSG should use with the env variable 
OSG_SCREEN screen number, beginning with 0

You could set this env variable in your software with putenv.

Thank you!

Cheers,
Torben

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





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


[osg-users] Raycasting

2010-06-10 Thread nikhil raprolu simha
Is there a way or a library to ray cast in OSG?

Thanks, 
Nikhil.

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





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


Re: [osg-users] Raycasting

2010-06-10 Thread Robert Osfield
Hi Nikhil,

On Thu, Jun 10, 2010 at 11:33 AM, nikhil raprolu simha
r.nikhilsi...@gmail.com wrote:
 Is there a way or a library to ray cast in OSG?

The OSG doesn't natively support ray casting of convention OpenGL
geometry.  The osgVolume NodeKIt does ray casting of 3d textures on
the GPU but I presume you don't mean this.

Members of the community have implemented their own ray casting
algorithms utilizing the OSG's KdTree/LineSegmentIntersector support,
but I can't comment in particular on these as I have had direct
experience with these projects.

One has to ask what one is trying to achieving, ray casting is such an
open ended topic, with so many different goals that different users
might require.  A simple statement like yours really doesn't help
people answer your question too well.

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


Re: [osg-users] Read texels from texture in GPU memory

2010-06-10 Thread Martin Aasen
OK, this is what I've done. I've Subclassed osg::Camera::DrawCallback and read 
from the texture in the operator() using osg::Image::readPixels, with an 
applied FBO with the texture i want to read from attached. The retrieved value 
seems to be correct. The callback object is set as final draw callback in a 
camera I create and add to the root of my scene graph.

Even though I am able to get the data I need this way, it seems to me that this 
is not a good solution. The only reason why I create a dummy camera which 
doesn't render anything is to get a valid osg::State object to apply the FBO in 
operator(). There must be a better way to do this? This way I have to request a 
value and wait untill the next frame to collect it (??) because readPixels is 
called in the operator() which I can't call in the update traversal were I need 
the value. Warning: detected OpenGL error 'invalid enumerant' at after 
RenderBin::draw(..) is printed each frame when the camera in the scene graph.  


class ReadBufferCallback: public osg::Camera::DrawCallback
{
public:
osg::Texture2D* tex;
osg::Image* image;
osg::FrameBufferObject* fbo;
osg::FrameBufferAttachment *fba;


ReadBufferCallback(osg::Texture2D *_tex){
tex = _tex;
image = new osg::Image;
fbo = new osg::FrameBufferObject();
fba = new osg::FrameBufferAttachment(tex);
fbo-setAttachment(osg::Camera::COLOR_BUFFER, *fba);

}

virtual void operator() (osg::RenderInfo renderInfo) const
{
fbo-apply(*(renderInfo.getState()), 
osg::FrameBufferObject::READ_FRAMEBUFFER);
image-readPixels(500, 500, 1, 1, GL_LUMINANCE, 
GL_FLOAT);
float* height = (float*)image-data();
cout  height:   *height  endl;
}
};


//Added to root of scene graph
osg::Camera* HeightTile::getHeightSampleCamera()
{
osg::Camera* cam = new osg::Camera;
cam-setRenderOrder(osg::Camera::PRE_RENDER);
cam-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
cam-setFinalDrawCallback(new ReadBufferCallback(m_elevation_tex));
return cam;
}

Any help is much appreciated!

Cheers,
Martin

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





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


Re: [osg-users] [vpb] resuming vpb build, revisited :)

2010-06-10 Thread Felix Morsdorf
Hi all,

thanks for your help so far. I tried the --machines (4 processes) switch 
together with manually settting the split level to 5, but still no luck; some 
parts of my DTM are not build.

Here is some more information:
OSG 2.8.3, VPB 0.9.10, OSX 10.6.3, Mac Pro 2.93 GHz Quad Core Xeon with 8 GB 
RAMS
The DTM is a 16bit grayscale (2100x6000) tif without worldfile, I am producing 
a flat (Switzerland...) DTM, and the vpbmaster command to build it is:

vpbmaster -d dtm.tif --machines machinepool.txt --split 5 --xx 1 --yy 1 -v 
0.006332397 -l 7 --default-color 0.7,0.7,0.7,1 -o laegeren.ive

The error of the logfiles that are not build is still the same.

Thank you for your help, it is much appreciated!

Cheers,

Felix

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





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


Re: [osg-users] [vpb] resuming vpb build, revisited :)

2010-06-10 Thread Robert Osfield
Hi Felix,

I don't know what is causing the stall, and can't really given the
information at hand.  Building to level 7 isn't a big build, and
osgdem on it's own should be able to build this without a problem.
The best I can suggest is run a single osgdem run within a debugger
and see if you can ascertain what is wrong.

As a general note, you shouldn't need the --xx and --yy settings if
you .tif file is a GeoTiff.  Using GeoTiff or other formats with
inbuilt geospatial coords are by far the most convenient way to work
with VPB so I would recommend using them over raw image formats that
you have to manually specific the coords.

Robert.

On Thu, Jun 10, 2010 at 12:59 PM, Felix Morsdorf
felix.morsd...@geo.uzh.ch wrote:
 Hi all,

 thanks for your help so far. I tried the --machines (4 processes) switch 
 together with manually settting the split level to 5, but still no luck; some 
 parts of my DTM are not build.

 Here is some more information:
 OSG 2.8.3, VPB 0.9.10, OSX 10.6.3, Mac Pro 2.93 GHz Quad Core Xeon with 8 GB 
 RAMS
 The DTM is a 16bit grayscale (2100x6000) tif without worldfile, I am 
 producing a flat (Switzerland...) DTM, and the vpbmaster command to build 
 it is:

 vpbmaster -d dtm.tif --machines machinepool.txt --split 5 --xx 1 --yy 1 -v 
 0.006332397 -l 7 --default-color 0.7,0.7,0.7,1 -o laegeren.ive

 The error of the logfiles that are not build is still the same.

 Thank you for your help, it is much appreciated!

 Cheers,

 Felix

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





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

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


Re: [osg-users] [vpb] resuming vpb build, revisited :)

2010-06-10 Thread Felix Morsdorf
Hi Robert,

thanks, will try that and see what is going wrong. 
Will post as soon as I have a clue what might be the problem.

Cheers,
Felix

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





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


Re: [osg-users] thanks for your quick reply

2010-06-10 Thread Jean-Sébastien Guay

Hello,

Once again, for OSG questions please post to the OpenSceneGraph mailing 
list (subscribe at 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) 
or on the Forum (http://forum.openscenegraph.org/). Please DO NOT send 
e-mail personally to one of the members of the list.



Thanks for your quick reply.Your speculation is correct.Your information
is very useful for me.Excuse me,professor.As a beginner of osg,could you
give me the corresponding code to show me how to?Any reply from you will
be apprecated.Thanks again!


Please do some research. Look for createGraphicsContext in the OSG 
examples (you need to download the sources package, and then search in 
the examples folder).


The general idea is that you set up an osg::GraphicsContext::Traits 
structure to represent what kind of graphics context you're requesting. 
In your case, you'll want to set a different ScreenIdentifier (with a 
screen num of 0, 1, or 2) to specify on which graphics card/screen you 
want the context to exist. Then you pass that Traits to 
createGraphicsContext which returns you a graphics context.


As I said in my previous message, once you have three contexts one on 
each card, you set up a Viewer/View with one master camera and three 
slave cameras. Each slave will have one of the graphics contexts, and 
its projectionOffset will be set to translate the projection up or down 
compared to the others.


But as I said, first try researching yourself, come up with something 
you think should work, try things out, and if you have more questions, 
post to the osg-users mailing list or the forum.


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] ffmpeg synchronisation

2010-06-10 Thread Tanguy Fautre
Hi Michael,

It's been a long time since I've touched the ffmpeg plugin, but here is how it 
was:
1/ when the video sound is being played, the video time is synchronized with 
the audio player (this tries to keep the video tightly synchronized with the 
audio track);
2/ when there is no video sound (or no audio player has been associated with 
this video), then the video used to be synchronized with an internal timer.

Quickly looking at the code on SVN, it does not seem to have changed.

Changing case 2 to be optionally synchronized with FrameStamp shouldn't be too 
hard (but will require code changes in the plugin).
Case 1 looks more problematic though.

Tanguy


From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Michael 
Platings
Sent: 09 June 2010 3:31 PM
To: OpenSceneGraph Users
Subject: [osg-users] ffmpeg synchronisation

I've been playing around with the ffmpeg plugin and I've been very impressed 
with how capable it is. The only problem I have with it is that its playback 
speed is decoupled from the timing of the main scene.
Does anyone know of an easy way to ensure that the time of the ffmpeg video is 
consistent with the time of the FrameStamp?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I define the screen which show me my viewer?

2010-06-10 Thread Jean-Sébastien Guay

Hi Martin,


I get the number of screens with the following lines:

_wsi = _gc-getWindowingSystemInterface();
std::cout  Detected Screens:   _wsi-getNumScreens()  std::endl;

My question is: How can I define the screen which show me my viewer?


If you're creating your window yourself using 
osg::GraphicsContext::createGraphicsContext, Nick's suggestion is the 
right track - you'll need to specify the screen you want in the Traits 
you pass to createGraphicsContext.


If you're not, then the Viewer is probably creating the graphics context 
/ window for you (using the osgViewer::View::setUpView*() methods). You 
can use osgViewer::View::setUpViewOnSingleScreen(screenNum) to get the 
equivalent behavior but be able to specify the screen you want. This 
will give you a fullscreen viewer - if you want it in a window use 
osgViewer::View::setUpViewInWindow(x,y,w,h,screenNum).


You can also check out the code for these methods if you're curious. 
They're there for convenience, if you want total flexibility you'll 
probably want to inspire yourself from the code there and create your 
graphics contexts yourself.


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] hide shadow map receiver

2010-06-10 Thread Jean-Sébastien Guay

Hi weihuan,


i use osgshadow in osgart, the shadow map work fine. the model is standing on a 
plane, shadow cast to the plane, the plane is attach to the pattern, what i 
want is to make the plane invisible but the shadow remains, to make it looks 
like shadow on the top of pattern. i try alpha blending the plane, the result 
is not good, shadow become transparency too.


You'll have to create your own shader based on the one that shadow map 
uses (you didn't specify which shadow map class you use, but the shader 
code is in the source files, see for example 
osg/src/osgShadow/ShadowMap.cpp, or osg/src/osgShadow/SoftShadowMap.cpp, 
or osg/src/osgShadow/StandardShadowMap.cpp for LISPSM).


Just copy the default shader code, and then change it to do what you 
want. For example, you could set a Uniform bool to false on your scene 
root, then to true on your plane, and in your shader you would test this 
value and if true, simply discard fragments if the shadow test fails and 
render the shadow color if the shadow test succeeds.


There could be other ways to do what you want, this is just off the top 
of my head.


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

2010-06-10 Thread nikhil raprolu simha
Hi,
Thanks Robert.

And @all sorry for being vague in my previous post.
I need to simulate range space of a sensor.
   (or more clearly)
I need to cast rays from a point(cone like beam) recognizing obstacles .

Thanks,
nikhil

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





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


Re: [osg-users] Raycasting

2010-06-10 Thread Jean-Sébastien Guay

Hi Nikhil,


I need to cast rays from a point(cone like beam) recognizing obstacles .


That's clearer. So what Robert said would probably work for you: look 
into LineSegmentIntersector, enabling kd-trees, and the osgintersection 
example in the OSG sources.


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] [osgPlugins] Porting FFMpeg to OSG 2.8.2

2010-06-10 Thread Vincent Ong
Hi,
Could you exactly tell me what to add in the CMakeLists.txt? I am rather new to 
Cmake as well as osg. 

... 

Thank you!

Cheers,
Vincent

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





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


Re: [osg-users] [osgPlugins] Porting FFMpeg to OSG 2.8.2

2010-06-10 Thread Jean-Sébastien Guay

Hello Vincent,


Could you exactly tell me what to add in the CMakeLists.txt? I am rather new to 
Cmake as well as osg.


Please do a bit of research on your side. A simple case-insensitive grep 
(or find in files) for ffmpeg in the OSG source tree would tell you 
what you need to know...


In particular, look in src\osgPlugins\CMakeLists.txt and search for 
ffmpeg. But a grep will also tell you that you need to modify the root 
CMakeLists.txt as well...


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] OSG on IPhone

2010-06-10 Thread Sean Sirigampola
Hi,

I am also interested in getting OSG to work on the iPhone. If there is a 
version that works on the iPhone, can someone point me in its direction?

Thank you!

Cheers,
Sean

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





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


Re: [osg-users] hide shadow map receiver

2010-06-10 Thread Huan Wei
Hi, Skylark
thanks a million for your advice. i was using shadow map, shadow volume did not 
work. one thing i was confuse, if i add an uniform bool varible to the scene 
node, is it can indicate which fragment(pixel) belong to shadow caster object 
or receiver object? maybe i just dont know that.

... 

Thank you!

Cheers,
Huan

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





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


Re: [osg-users] OSGEXP 0.9.7 Crashing Max

2010-06-10 Thread Farshid Lashkari
Hi,

On Tue, Jun 8, 2010 at 11:18 AM, Brad Acree brad.d.ac...@lmco.com wrote:

 When I export to IVE it crashes max, however when I export to osg it says
 “error writing to file”. The two machines are of similar hardware, but the
 second is slightly newer. Both machines are running windows Xp professional
 32 bit.

 Any advice or ideas would be greatly appreciated.


As Maxim already suggested, make sure you don't have any osg DLLs in your
system directory. Some applications annoyingly install osg binaries in the
system directory, which can cause problems for other osg apps.

Also, I've seen crashes during export due to certain optimizations being
checked (I think it was Tri Strip Geometry). Try disabling all the
optimizations in the export dialog and see if that helps.

If none of those help then you should try getting a stack trace of the
crash.

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


Re: [osg-users] OSGEXP 0.9.7 Crashing Max

2010-06-10 Thread Brad Acree
Hi,

I checked my computer for those files you mentioned, but I could not find any 
of the files you mentioned in my sys32 file. Any other ideas?

... 

Thank you!

Cheers,
Brad

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





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


Re: [osg-users] [osgPlugins] FBX texture export problem.

2010-06-10 Thread Dario Minieri
Hi,

anyone has any other information about this problem?

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Adam Smith
Hi,

I am still a newbie and I'm lost. :( 

I am using OpenSceneGraph 2.9.7 with MS VS 2005 on Windows 7.  I am trying 
perform  the demos in osgOcean.  I was able to build OSG 2.9.7 and osgOcean.  
But I am having troubles reading png and tiff files. (Cannot find plugin 
message).  I Have OSG_NOTIFY_LEVEL = DEBUG

So I've perused openscenegraph forums for others who have had difficulties 
reading png files and have found some sparse posts of problems.  I am aware of 
libpng13(d).lib, osgdb_png.dll and having to place them in certain directories 
to some extent.  But there is this lingering ambiguity that I am not building 
my projects properly (as evidenced by not finding the png and tiff plugins).

Can someone help me verify the macro steps below?   Then perhaps I can drill 
down further to isolate the problem.  As a return favor to each of you, when I 
get good at this (I hope), I will contribute more to the OSG activities.

Here is a five mile view of what I tried to do:

0) Build OSG 2.9.7 using CMAKE and VS 2005 (BTW JPEG,PNG,TIFF and other things 
are missing at this point as reported by CMAKE)

1) Build or obtain binaries [libpng13(d).* and zlib] (troubles linking during 
the build so I tried using the prebuilt stuff).

2) Obtain osgDB_png(d).dll file from somewhere(I have it but I'm not sure where 
I got it from or where it should come from).

3) Somehow cram 1) and 2) back into my OSG 2.9.7 project through the placement 
of files in directories and manipulation of VS 2005 project and build again.

4) Build osgOcean linking to OSG 2.9.7 which theoreticall should now have png 
file problem resolved.


Can someone give me a little guidance of what I might be doing wrong?  I don't 
want a solution as I'm sure you are all busy, I just need some guidance.  
Perhaps a link to look at?

I apologize if the description is a bit nebulous.   It is how I am feeling at 
the moment.

Thanks for whatever attention you can give this.

Cheers,
Adam

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





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


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Jean-Sébastien Guay

Hello Adam,

Reading your message, it seems to me that you don't have a clear idea of 
what you need to do to get to your desired goal. Key phrases like 
obtain ... from somewhere and somehow cram... scream to me that you 
need to understand a bit more instead of just going from one site to 
another trying to execute a list of steps someone might have posted 
somewhere...


First, is there some reason why you want to compile OSG from source? 
Version 2.8.3 is very recent, and there are prebuilt packages for Visual 
Studio 8 (2005) which you say you use. See:


http://www.openscenegraph.org/projects/osg/wiki/Downloads

And see this page about how to install and use the binary packages:

http://dwightdesign.com/2009/05/installing-openscenegraph-280/

You should have no problem compiling osgOcean with OSG 2.8.3.

If you really want to compile from source, I can't force you not to 
(it's what I do personally ;-) ) but using the binary packages would be 
easier while you get your feet wet... You can always try to build from 
source again later once you've gotten more experience.


--- Read below if you still want to go the source route ---

In order to be able to load png or jpeg images, you need three things:

1. OpenSceneGraph itself (specifically osgDB, but then you'll probably 
want to display what was read from the file in which case you need the 
rest too ;-) )
2. The OpenSceneGraph plugin for that file type (the osgdb_png.dll you 
mentioned, but see below)
3. The plugin's dependencies, which can be needed at compile time and/or 
at run time.


OSG and the plugin should be compiled together. Just getting 
osgdb_png.dll from some site and putting it in the directory where you 
put your compiled OSG DLLs is likely not to work (because the OSG or 
compiler versions don't match), or worse, it may seem to work but crash 
at random times.


The plugin's dependencies generally consist of includes (headers) and 
libraries, which are needed at compile time, and may or may not include 
dynamic libraries (DLLs) that will be needed at run time, if applicable. 
If you were to compile the dependencies yourself you'd generally have 
the choice to build either static or dynamic libraries, but you can 
download a package that contains the most frequently used dependencies 
for OSG (see link below) and in that package, some dependencies are 
static and some dynamic (tiff and jpeg are static, whereas png is 
dynamic, for example).


So, now that I've explained all that, I recommend you start over from 
scratch. Follow the instructions at


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

Get the prebuilt dependencies from here:

http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies

and make sure you follow the directory structure that's suggested in the 
PlatformSpecifics/VisualStudio link. If you do, CMake should find your 
includes and libs for libpng, libjpeg, libtiff, freetype and other 
dependencies that are needed to do anything useful at all with OSG... 
And since CMake will find them, the project files it generates will 
include these plugins (osgdb_png, osgdb_jpeg, osgdb_freetype, etc.) so 
they will be built at the same time as OSG itself.


BTW, make sure you specify the directory where you want OSG to be 
installed in the CMAKE_INSTALL_PREFIX variable in CMake, and that once 
you've generated the project files, you build the INSTALL project in 
both the Debug and Release configurations.


Then you can follow the latter few steps of the tutorial at

http://dwightdesign.com/2009/05/installing-openscenegraph-280/

Steps 1-7 only apply when you install binary packages - you built from 
source so they don't apply to you. Step 8 is included in the 
PlatformSpecifics/VisualStudio page. You do steps 9+10 to test the OSG 
you just compiled, and steps 11+12 to set up a project of your own using 
OSG.


Also, since libpng is compiled as a dynamic library in the prebuilt 
depdendencies package I linked to above, you'll need to make sure the 
program you want to read png images with will be able to get to 
libpng13.dll. I recommend just copying it into your OSG bin directory, 
i.e. the directory where osgXX-osg.dll, osgXX-osgDB.dll and others live.


At that point, if you want to compile osgOcean, again you should start 
with a fresh source tree, start CMake to generate project files and 
point it to your freshly compiled OSG. After compiling it, it should 
work without any problems.


If you have any more questions, feel free to ask, but as I said at the 
start, you should try to understand what you're doing instead of 
whizzing from one step to the other trying things that possibly won't work.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Adam Smith
J-S,

You are correct.  Other than getting my osgOcean demo to work, I am not clear 
on what I need to do.  I only have a vague idea of the build environment and 
can generally get things to work by tinkering(hacking).   This, fueled by a 
lack of patience on my part always ends in frustration and exhaustion. I need 
to take the extra time to understand what I am doing.

There is no need for me to compile from source, I just didn't know any better.  
As I am trying to become competent, perhaps I need to take smaller steps 
before jumping in this world.   And I used 2.9.7 because is seemed like the 
latest version but 2.8.3 is fine.

You have expended a considerable amount of time and effort in crafting your 
response.  I GREATLY  appreciate your efforts so for my part,  I will do as you 
say: I will start over and try to ensure I know what is going on at each step.  
It will take the time to view each link you have provided and hopefully I 
will be a more enlightened 8)  osg person at the end of it. ;) 

Back to the drawing board for me and thanks yet again for your help!!!  Wish me 
luck


Cheers,
Adam

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





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


Re: [osg-users] Small test program gets segmentation fault when doing own viewer loop in Qt environment

2010-06-10 Thread Thomas Canipel
Hi , I havent check the example of integration linked to Qt yet but I am 
usingOsg embedded n Qt since a long time . A solution that work fine is to 
create your own class that extend from QGLWidget qnd has a member 
osgViewer::Viewer, then you add a timer who is connected to the signal 
updateGL() , in the paintGL you call your osgviewer-frame() to repaint the 
scene.

for the event keyboard dont forget to map them between views since osg and Qt 
have different values for keys.


Cheers,
Thomas

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





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


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Jean-Sébastien Guay

Hello again Adam,


I need to take the extra time to understand what I am doing.


Just a note: it usually takes less time when you take it step by step 
and make sure you're doing it right, than when you just try tinkering 
until you get it right. This is true for anything, and I also have to 
watch myself sometimes. Whenever I'm writing shaders and I notice I'm 
tinkering with the code to get it to work, I force myself to take a step 
back and perhaps work things out on paper, and it's always helpful.



There is no need for me to compile from source, I just didn't know any better.


That's what I thought ;-)

Go with the binary packages, it'll be easier to get up and running, and 
you'll get results up on your screen faster, which will motivate you to 
go on with learning even more!



And I used 2.9.7 because is seemed like the latest version but 2.8.3 is fine.


The OSG release cycle is kind of like the Linux kernel: the second 
number in the version number is even for stable releases, and odd for 
development versions. So 2.9.x are the development versions on the road 
to 2.10 (or 3.0), and 2.8.3 is the latest stable release. Unless you 
really need the features / bug fixes in the development versions, you 
can stick to the stable releases. Besides, the development versions are 
kind of bleeding edge, so you might run into other problems along the way.


Oh, and you can usually switch back and forth between stable / 
development at will. So if in the future you want to compile a 
development version from source, your application's code shouldn't have 
to change much to work with the new OSG version.



You have expended a considerable amount of time and effort in crafting your 
response.  I GREATLY  appreciate your efforts


It's my pleasure, I enjoy helping the people on this mailing list since 
I think the community that exists around OSG is one of its strong 
points. And whenever I have questions others are always ready to help me 
too.



I will start over and try to ensure I know what is going on at each step.


I think that's the way to go. Let us know how it goes!

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] scene data and manipulator

2010-06-10 Thread Thomas Canipel
its normal that when you set an osg::Group as the SceneData that when you add a 
child the viewer is notify and update the graphic, imaging that you have to 
create 1000 of objects, if you have to recreate a  a root and set it to the 
viewer each time its a pain... ,  for the detail you can lok the function 
insertCHild() of osg::Group , you will see that there is a a call to a callback 
to traverse the new scene updated.  If you want to keep something not Display , 
its simple  just keep it in a Node , group that is not linked to the SceneData, 
and when you want to use it define it as your SceneData . THe problem you get 
with the manipulator is pretty odd , can you give more detail ?


Cheers,
Thomas

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





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


Re: [osg-users] [osgPlugins] reading png files in OSG

2010-06-10 Thread Adam Smith
J-S,

Will definitely let you know! :D   I am working on it as we speak.  Thanks 
again and stay tuned


Cheers,
Adam

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





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


Re: [osg-users] old QOSGWidget and new trunk Manipulators : mouse event problem

2010-06-10 Thread Thomas Canipel
Try to use the function grabMouse() in the construstor of your viewer.


Cheers,
Thomas

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





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


Re: [osg-users] OSGEXP 0.9.7 Crashing Max

2010-06-10 Thread Huan Wei
Hi,

i solved it by remove myosgroot\bin\osgPlugins-2.8.3  from the path  
environment variable, or you can add yourOSGExproot\bin to the path, make 
sure it is in front of myosgroot\bin\osgPlugins-2.8.3, you can check these 2 
folder, they have same name dlls, might be the reason cause conflict.
i thought the best way is to compile osgExp by ourselves. 

Thank you!

Cheers,
Huan

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





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


Re: [osg-users] hide shadow map receiver

2010-06-10 Thread Huan Wei
Hi, Skylark 

thank you for the detailed explanation. i'll try it.

... 

Thank you!

Cheers,
Huan

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





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


[osg-users] I don't want OSG to rescal textures, how can I avoid it?

2010-06-10 Thread Manuel Garea
Hi, I have a problem with textures: my textures have sizes that are not power 
of two, and I don't want OSG to rescale them. 

OSG show me a message like:

 Scalling image '...' from (200x200) to (256x256)


although I'm calling the function texture-setResizeNonPowerOfTwoHint(false);

The code I'm using is:


Code:

osg::Image* image = osgDB::readImageFile(texturePath);

osg::Texture2D* texture = new osg::Texture2D;

texture-setDataVariance(osg::Object::DYNAMIC);

texture-setResizeNonPowerOfTwoHint(false);

texture-setFilter(osg::Texture::MIN_FILTER, 
osg::Texture::LINEAR_MIPMAP_LINEAR);

texture-setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);

texture-setImage(image);




Could someone tell me the reason of the problem and how can I solve it???

Thank you!

Cheers,
Manuel

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





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


Re: [osg-users] I don't want OSG to rescal textures, how can I avoid it?

2010-06-10 Thread Ulrich Hertlein
On 11/06/10 15:13 , Manuel Garea wrote:
 Hi, I have a problem with textures: my textures have sizes that are not power 
 of two,
 and I don't want OSG to rescale them.
 
 OSG show me a message like:
 
 Scalling image '...' from (200x200) to (256x256)
  
 although I'm calling the function texture-setResizeNonPowerOfTwoHint(false);
... 

Does your OpenGL driver support non-power-of-two textures?
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org