Re: [osg-users] [osgOcean] osgOcean - Render to Texture Camera

2018-07-12 Thread Robert Osfield
On Wed, 11 Jul 2018 at 23:39, Rob Ewbank  wrote:
>
> Thanks Robert, I have been looking through the code and have merged two 
> branches, one which has been changed to work with OSG 3.4.1 and the master.
>
> Osgocean seems to do a few weird tricks with shaders and rendering that cause 
> issues in places such as transparency, when it works, its really nice.
>
> Do you know if the author kbale has been around these parts lately?

I haven't seen him post for quite a few years.  I believe osgOcean was
related to a university research project, folk move on.

> This should prob be in another post, but anyway. When using the primitives 
> such as sphere, box etc in OSG 3.6 they don't respond to changing position, 
> size etc. Works fine in 3.4.

In 3.6 the osg::ShapeDrawable is now implemented as an osg::Geometry,
broadly it should work the same, if there is a usage case that it
isn't working the same could you create a small test example (such as
modifying an existing OSG example) to illustrate the problem, it could
well be a bug that we can fix once we know what might be amiss.

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


Re: [osg-users] [osgOcean] osgOcean - Render to Texture Camera

2018-07-11 Thread Rob Ewbank
Thanks Robert, I have been looking through the code and have merged two 
branches, one which has been changed to work with OSG 3.4.1 and the master. 

Osgocean seems to do a few weird tricks with shaders and rendering that cause 
issues in places such as transparency, when it works, its really nice.
 
Do you know if the author kbale has been around these parts lately? 

This should prob be in another post, but anyway. When using the primitives such 
as sphere, box etc in OSG 3.6 they don't respond to changing position, size 
etc. Works fine in 3.4. 

Love the framework, I'll post some pics of some of the stuff we're using it for.

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





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


Re: [osg-users] [osgOcean] osgOcean - Render to Texture Camera

2018-07-09 Thread Robert Osfield
Hi Rob,

I am afraid that osgOcean is a 3rd party NodeKit that was written a
long time ago and as far as I'm aware has seen active development or
widespread use across the OSG community, so the chances of having
others that have the knowledge to help will be quite low.  I don't
know if the original authors are still active, they would be the best
ones to ask.

It might be that if you want to use osgOcean you'll need to work how
it works and maintain it yourself.

Best of luck,
Robert.
On Fri, 6 Jul 2018 at 13:44, Rob Ewbank  wrote:
>
> Hi,
>
> I'm building an interactive projection mapping using osgOcean to simulate the 
> sea, for this I need to render to texture. The RTT camera I'm using works 
> fine on other scenes, however, when using osgOcean, it does not render 
> properly: see attached images.
>
> I've tried setting the render order to pre, nested and post, none of these 
> work. When using a slave camera rather than main I get the results in images, 
> without that it's even worse.
>
> Changing glare on the scene seems to have a big impact on the result and I've 
> tried turning on / off all other features, such as reflection, refraction, 
> etc. with no luck.
>
> What steps should I take in order to successfully render this scene to 
> texture?
>
>
> Thank you!
>
> Cheers,
> Rob
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74256#74256
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/ocean_rtt_glare_130.png
> http://forum.openscenegraph.org//files/ocean_rtt_no_glare_110.png
>
>
> ___
> 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] [osgOcean] osgOcean - Render to Texture Camera

2018-07-06 Thread Rob Ewbank
Hi,

I'm building an interactive projection mapping using osgOcean to simulate the 
sea, for this I need to render to texture. The RTT camera I'm using works fine 
on other scenes, however, when using osgOcean, it does not render properly: see 
attached images. 

I've tried setting the render order to pre, nested and post, none of these 
work. When using a slave camera rather than main I get the results in images, 
without that it's even worse. 

Changing glare on the scene seems to have a big impact on the result and I've 
tried turning on / off all other features, such as reflection, refraction, etc. 
with no luck.

What steps should I take in order to successfully render this scene to texture?


Thank you!

Cheers,
Rob

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




Attachments: 
http://forum.openscenegraph.org//files/ocean_rtt_glare_130.png
http://forum.openscenegraph.org//files/ocean_rtt_no_glare_110.png


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


[osg-users] [osgOcean] osgOcean and Stereo view.

2017-06-08 Thread Dario Minieri
Hi,

I'm looking to run an osgOcean based application in a Stereo mode (split or 
anaglyphic). Doesn't work because multiple rendering pass, I think...Someone 
have suggestions about this problem? Have you tried stereo mode with osgOcean?


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] OsgOcean

2016-11-28 Thread Nickolai Medvedev
Hi, Rambabu.

In the osgOcean example use both osgViewer::Viewer and osgViewer::View.

You need use osgViewer::Viewer only.

oceanExample:

//
// Set up the viewer
//

//osg::ref_ptr viewer;
//osgViewer::View* view = 0;


osgViewer::Viewer* viewer = new osgViewer::Viewer;
//viewer = singleViewer;
//view = singleViewer;

viewer->setUpViewOnSingleScreen(0); //this function tell osg work with 
one screen
//view->setUpViewOnSingleScreen(0);
// Otherwise, a window with a single view.
//view->setUpViewInWindow( 0, 0, 1600, 900, 0 );
viewer->getCamera()->setViewport(new osg::Viewport(0, 0, 1920, 1080));

then you need:

viewer->realize();

return viewer->run();

I hope it helps. Good Luck!

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





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


[osg-users] OsgOcean

2016-11-28 Thread Rambabu Repaka
Hi,In osgocean ocean output part is limited to particular size how to get the 
full screen ocean part,Where i have to change the code.

... 

Thank you!

Cheers,
Rambabu

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





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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2016-11-22 Thread Alberto Luaces
"Rambabu Repaka" writes:

> Hi,Can anyone have the source code of latest version of osg ocean (except osg 
> ocean 1.0).

Hi Rambabu, inspecting the available forks in github, there is one that
seems to be updated at least to OSG 3.4.0, though I have not personally
tried it:

https://github.com/repagh/osgocean

-- 
Alberto

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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2016-11-21 Thread Rambabu Repaka
Hi,Can anyone have the source code of latest version of osg ocean (except osg 
ocean 1.0).

...


Thank you!

Cheers,
Rambabu

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





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


[osg-users] [osgOcean] Geocentric Support

2016-03-23 Thread Cheng Guan
Hi all,

What are the changes needed to support geocentric coordinates? I want to add 
ships using latitude, longitude and hope to see them at a much further distance 
than now.

Thank you!

Cheers,
CG

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





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


Re: [osg-users] [osgOcean] BK patches to osgOcean for stability, up to osg 3.4.0 compilation and more

2015-12-01 Thread Tony Vasile
Would it be possible to get the patches so the software compiles against 
OpenSceneGraph 3.4.0, rather than reinventing the wheel.


Tony V

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





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


Re: [osg-users] [osgOcean] BK patches to osgOcean for stability, up to osg 3.4.0 compilation and more

2015-10-07 Thread jamie robertson
Hi,

Just to reply to my own last message. I have now managed to get it working 
properly. The mistakes were my own...

Thanks

jamie

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





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


Re: [osg-users] [osgOcean] BK patches to osgOcean for stability, up to osg 3.4.0 compilation and more

2015-10-06 Thread jamie robertson
Hi Fabrizio,

I'd be interested to see your patches to get osgOcean working with osg 3.4.0. 

I'm just in the process of trying to get it working. I've changed a few things 
and got it to compile at least, but there's quite a few glitches, garbled 
statesets etc.  I've had slightly more success with version 1.1 than with the 
current trunk version.

Best regards

Jamie

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





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


Re: [osg-users] [osgOcean] BK patches to osgOcean for stability, up to osg 3.4.0 compilation and more

2015-10-01 Thread Fabrizio Sciarra
Dear Robert,
first of all thank you very much for taking your precious time to answer and 
give your advice: we appreciate very much.
Looks like there's not too much interest in osgOcean progress in this period.
Or maybe for other people it works nicely as it is.
Our environment, as I've explained to you a few days ago, is a complex 
application scenario with terrestrial, above and underwater articulated 
vehicles, all interactive or driven by internal simulations or external 
telemetries, all fully dynamic with a few scenario's options preconfigured.

And for sure our own powerful bugs (they come for free but s... don't tell 
anybody or people will ask only for those).

For what regards opening a github, well, in this moment we don't have the means 
to give the right assistance to people who may download ocean from our 
repository and consequently might need to have explanations on topics and usage 
of the whole, which is far beyond our current knowledge and time availability.

Let's say that, for now, everybody can read we have some patches to compile 
osgOcean with 3.4.0 and that we've found some bugs on the code which affects 
overall stability.
If anyone has similar troubles can try to contact us.
In the mean time we'll wait to see what happens.

For what regards OSG we're still in the process of modifying stuff so we need 
more time.
But thank you very much for indicating the way to proceed.

I'm at your disposal for any question.
Best regards,
Cheers!
  Fabrizio

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





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


Re: [osg-users] [osgOcean] BK patches to osgOcean for stability, up to osg 3.4.0 compilation and more

2015-09-30 Thread Robert Osfield
Hi Fabrizio,

For changes to the core OSG just send them along to the osg-submissions
mailing list.  The best way to post them are as whole modified files.

I don't know what the current development status of osgOcean is so can't
comment on the best way to progress with this.  One route might be to
create a github repository and let others pull the changes from there.

Robert.

On 30 September 2015 at 15:33, Fabrizio Sciarra 
wrote:

> Hi,
>
> we are an Italian software company working with OSG and osgOcean in
> simulation scenarios.
> We currently have some minor/major changes to c++ code and shaders to take
> into account several aspects in osgOcean we had troubles with.
> We would like to give back to the community by submitting our code, and
> some of you has already found messages posted on various forum topics by
> one of our employee, Paradox (dr. Dario Maggiari).
>
> We understand this has to be taken into account via an evaluation process
> and we're ready to afford the evaluation and discussion on that.
>
> Now, how to submit these code changes?
>
> Thank you!
>
> Cheers,
> Fabrizio
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65260#65260
>
>
>
>
>
> ___
> 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] [osgOcean] BK patches to osgOcean for stability, up to osg 3.4.0 compilation and more

2015-09-30 Thread Fabrizio Sciarra
Hi,

we are an Italian software company working with OSG and osgOcean in simulation 
scenarios.
We currently have some minor/major changes to c++ code and shaders to take into 
account several aspects in osgOcean we had troubles with.
We would like to give back to the community by submitting our code, and
some of you has already found messages posted on various forum topics by one of 
our employee, Paradox (dr. Dario Maggiari).

We understand this has to be taken into account via an evaluation process and 
we're ready to afford the evaluation and discussion on that.

Now, how to submit these code changes?

Thank you!

Cheers,
Fabrizio

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





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


Re: [osg-users] [osgOcean] Cylinder underwater problem with dimensions 2000.

2015-07-01 Thread Dario Minieri
Hi,

I have tried the osgOcean example also and in effect this problem seems to 
happen here also. After a lot of movement underwater I can see the plane 
behind. Rotating left or right disappears.


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Cylinder/Skydome flicker when using CompositeView

2015-06-30 Thread Dario Minieri
Hi,

...same problem here...have you found some workaround or solution? Bye.

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Cylinder underwater problem with dimensions 2000.

2015-06-30 Thread Dario Minieri
Hi,

I'm looking into a problem inside underwater scene: normally I use those 
parameters for underwater cylinder: 

CylinderHeight=4000.0 
CylinderRadius=2000.0 

I'm using osgHimmel as sky /but I can see the same problem with the original 
osgOcean sky dome) and the camera setup for near-far is:

Near-Far Mode: osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR
Near-Far value: 0.0009

If I attach a camera to an object inside position (0, 3000, -20)-(0,-3000,-20) 
all works fine. For all values greater then above I can see the sky behind in 
some camera setup. I've made a video which make a camera rotation at (0, 3500, 
-20) position. You can see the problem. 

I've tried some other configuration about Near-Far mode and value without 
success. In others, seems to be impossible to set a greater value for 
CylinderRadius because in this case the same problem come for low distance also!

In practice, it's impossible to move object over 2000 units from 0 without this 
problem. For example, cylinder at 20.000 and object in 0 show the sky behind 
underwater. 

Can you tell me some way to look?

Can you see the video here: https://vid.me/NAeB

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Cylinder/Skydome flicker when using CompositeView

2015-03-18 Thread Ben Strukus
Hi,

I've done some more poking around and I've found out a few things.

If I disable the cylinder completely by simply not adding the _oceanCylinderMT 
child to the _oceanTransform group in OceanScene.cpp, then the flashing stops.

The flashing occurs over the water. The effect is seemingly random, but the 
color that is shown seems to be the _aboveWaterFogColor, which is odd because 
the cylinder uses the _underWaterWaterFogColor. I set the above to pure green 
and the under to pure red and the color that flashes is green.

The problem goes away if I reduce my cylinder/skydome size. My application 
requires a far viewing distance so I've set the respective sizes to 30,000. 
When I bump the size back down to 1,900 (as is set in the ocean example), the 
flashing doesn't occur. However, I'd like the flexibility to set my viewing 
distance to be much farther than 1,900.


Thank you!

Cheers,
Ben

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





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


[osg-users] [osgOcean] Cylinder/Skydome flicker when using CompositeView

2015-03-17 Thread Ben Strukus
Hi,

I'm using osgOcean in a multi-view, multi-graphics card configuration and I'm 
encountering a problem with the ocean's cylinder and skydome causing 
flickering effects.

Setup
My setup is that I have 6 cameras all looking into the same scene. They all 
have the same position but different orientations and frustums. They all render 
to different screens and they're all on their own graphics card. I've disabled 
most advanced rendering effects such as:

Refractions
God rays
Silt
Underwater DOF
Glare
Distortion


I have the latest bits from the osgOcean repository and have no problem 
compiling them. I'm using FFTSS 3.0.

Main Problem
My problem is that with multiple views and one ocean, I'm seeing that the 
skydome and the cylinder tend to move around as if they're on a different 
screen. For example, when I'm viewing the ocean at an angle (some degree of 
roll), I tend to see one view's cylinder geometry appear on another view's 
scene. This produces a brief one-frame flicker effect that is very distracting.

With the skydome, I imagine a similar problem is happening (due to how they're 
both updated per view) but it just seems to flicker in and out of visibility.

Attempted Solution
I figured this was a threading issue where one thread would use the values of 
another thread's operations. With that in mind, I added multiple 
CameraTrackCallbacks to the ocean scene, each referencing the main camera of 
one of the views. In operator(), I would check the stored Camera pointer 
against the camera obtained through cv-getRenderStage()-getCamera() to see if 
the pointers were equal. If so, I would continue to update the cylinder 
position. If not, I would continue to traverse.

This seemed to work great for the skydome (no more flickering!) but not as well 
for the cylinder.

Example code for adding a new CameraTrackCallback for the skydome:

Code:

void attachCamera(osg::Camera* camera) {
osg::MatrixTransform* transform = new osg::MatrixTransform;
transform-setDataVariance(osg::Object::DYNAMIC);
transform-setMatrix(osg::Matrixf::translate(osg::Vec3f(0.f, 0.f, 0.f)));
transform-setCullCallback(new CameraTrackCallback(camera));
transform-addChild(m_skyDome.get());
m_oceanScene-addChild(transform);
m_oceanScene-addCamera(camera);
}




Side Problem (with solution!)
A problem I did find a solution to was just using osgOcean with a Composite 
Viewer set to ThreadPerContext or ThreadPerCamera. In OceanScene.cpp's 
CameraTrackCallback::createOrReuseMatrix, I tended to get deletions on 
allocated matrices that were already deleted within moments of running my app. 
I threw in a mutex that would scope lock within the function which fixed this 
but not the flicker.

Question
Has anyone else encountered this issue? Maybe I'm setting up my ocean wrong. 
I'm using a modified version of the Scene in the oceanExample project to set up 
the OceanScene.

Thank you!

Cheers,
Ben[/list]

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





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


Re: [osg-users] [osgOcean] Compilation under linux

2015-02-23 Thread Jannik Heller
Looks like a missing include. Try adding an #include fstream to the top of 
that file.

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





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


Re: [osg-users] [osgOcean] Compilation under linux

2015-01-18 Thread Guido Militello
Hey, tanks for the replies.

Perhaps I did something wrong in my compilation? some dependencies?

I'd followed exactly what they say in the project's wiki   
http://code.google.com/p/osgocean/wiki/Usage_Instructions

This is the error: 

$ make
Scanning dependencies of target osgOcean
[  5%] Building CXX object src/osgOcean/CMakeFiles/osgOcean.dir/Cylinder.cpp.o

[ 11%] Building CXX object 
src/osgOcean/CMakeFiles/osgOcean.dir/DistortionSurface.cpp.o
In file included from /media/DiscoD/linux/MyApp1/osg/include/osgDB/Output:20:0,
 from 
/media/DiscoD/linux/MyApp1/osg/include/osgDB/DotOsgWrapper:21,
 from /media/DiscoD/linux/MyApp1/osg/include/osgDB/Registry:26,
 from ../../../src/osgOcean/DistortionSurface.cpp:20:
/media/DiscoD/linux/MyApp1/osg/include/osgDB/fstream:31:42: error: invalid use 
of incomplete type ‘std::fstream {aka class std::basic_fstreamchar}’
 class OSGDB_EXPORT fstream : public std::fstream


...


Thank you!

Cheers,
Guido

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





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


[osg-users] [osgOcean] Enabling reflection and others effects for particles.

2014-11-22 Thread Dario Minieri
Hi,

I'm looking to a workaround to enable the reflection (end/or refraction) for 
osgParticles particles! I've tried to set the mask for the geode which contains 
the emitter without results. There is a simple way to achieve that? 

My goal, is to generates particles with one or more emitters visible to the 
reflection of ocean and hide the particles to the main cull camera (the 
particles aren't visible in the air). Can you suggest me a way? 

Many thanks!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Wake effects?

2014-10-27 Thread Dario Minieri
Hi,

I'm bringing back this thread up also after 2 years. Did anyone get any success 
about the wake effect? I'm working around foam+shoreline without any 
interesting results at moment 


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2014-07-11 Thread Quintijn Hendrickx
Dear all,

This is a slightly delayed response, I have to admit I am longer actively 
following this mailing list.

A few years I posted my work on river rendering as a submission for the 
osgOcean project. Unfortunately I do not have the time to maintain this project 
but maybe I can at least respond to some issues.


MCA4213 wrote:
 I have just tested osgRiver(from alphapixel com) and the river is not 
 displyed correctly


I have to speculate but there might be compatability issues due to the fact 
that I last tested the project back in June 2010. Since then new versions of 
osg, opengl and drivers have been released and either of these might cause 
issues. Perhaps reverting to a previous environment might shed some light on 
the exact problems.


Chris Hanson wrote:
 
 Just to be clear, AlphaPixel has no affiliation with osgRiver. I just snagged 
 a copy when it was posted years ago, and when it disappeared from 
 mailing-list archives, I made my copy available to anyone who wants it. 


It does appears that the original download location is no longer working, 
thanks for making your copy available.


kcbale wrote:
 
 I can answer your first question. osgRiver was never integrated into the 
 trunk because I felt that the way it had been combined in its current state 
 needed some work and sadly I simply haven't had time to work on it. I haven't 
 gone over the code for a long time but I seem to remember thinking that it 
 might be more appropriate for osgRiver to exist as a separate nodekit rather 
 than amalgamated into osgOcean since although they share a lot of effects and 
 are both water based, the problems they are trying to solve are quite 
 different.
 


I have to agree that this has always been a difficult issue. Much of the water 
shader code is shared between osgOcean and osgRiver but the water surface is 
represented and animated in an entirely different way. This creates 
compatability issues, especially on transition areas between ocean and river. 
Perhaps some blending scheme could be investigated but this is not a trivial 
problem to solve and unfortunately I do not have the time to do this.

Because osgRiver hasn't been maintained for over three years I don't think it 
should be considered as a ready to use library in its current form. However, 
anyone interested in river rendering in osg could definitely use it as a 
starting point.

Anyone interested in a high level overview on the techniques used in osgRiver 
could glance over the poster:
graphics . tudelft . nl / ~ruben / PosterI3D2010 . pdf

Kind regards,

Quintijn Hendrickx

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





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


[osg-users] [osgOcean] Error linking osgOcean

2014-07-10 Thread Dario Minieri
Hi,

I'm trying to compile osgOcean lib and examples under windows with mingw32. The 
library compile fine but I have a link fail for exe example. The error is the 
next:  

Linking CXX executable ../../bin/oceanExample.exe
CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text+0xb34): 
undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)'
CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]+0x4a):
 undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)'
c:/msys/1.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe:
 CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj): bad reloc address 0x4a 
in section 
`.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [bin/oceanExample.exe] Error 1
make[1]: *** [src/oceanExample/CMakeFiles/oceanExample.dir/all] Error 2
make: *** [all] Error 2

I've tried various CMake mod without success, I have enabled the DYNAMIC base 
option also without success. Any ideas?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Error linking osgOcean

2014-07-10 Thread Alexpux

See patches in my repo:
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-osgocean-svn

Regards,
Alexey.

10 июля 2014 г., в 19:08, Dario Minieri para...@cheapnet.it написал(а):

 Hi,
 
 I'm trying to compile osgOcean lib and examples under windows with mingw32. 
 The library compile fine but I have a link fail for exe example. The error is 
 the next:  
 
 Linking CXX executable ../../bin/oceanExample.exe
 CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text+0xb34): 
 undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)'
 CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]+0x4a):
  undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)'
 c:/msys/1.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe:
  CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj): bad reloc address 0x4a 
 in section 
 `.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]'
 collect2.exe: error: ld returned 1 exit status
 make[2]: *** [bin/oceanExample.exe] Error 1
 make[1]: *** [src/oceanExample/CMakeFiles/oceanExample.dir/all] Error 2
 make: *** [all] Error 2
 
 I've tried various CMake mod without success, I have enabled the DYNAMIC base 
 option also without success. Any ideas?
 
 Thank you!
 
 Cheers,
 Dario
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=60239#60239
 
 
 
 
 
 ___
 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] [osgOcean] Regulate the Ocean Reflection intensity.

2013-12-02 Thread Dario Minieri
Hi,

Nice, I've seen now the mod, I'll try them as soon


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-12-02 Thread Dario Minieri
Hi,

Looking the patch, I've seen that this is the same mod that I've tried but 
doesn't looks good to me...I'm using the trunk version, so the patch is 
different because some stuffs are moved in Technique file, but the mod is the 
same and I'm not really able to tone down (mean: add a lower reflection 
intensity) the reflection. Playing with fresnel mul and reflection mul don't 
move to me along a right final effect.

Have you tried some other parameters combination?  Have you a snapshot to see 
your result?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-11-15 Thread Kim Bale
Thanks I'll check out the effect and merge it.

Kim.


On 15 November 2013 00:33, Tisham Dhar tisham.d...@aerometrex.com.auwrote:

 Hi,

 I have successfully implemented a changing reflection intensity by adding
 1) Multiplier to env_map
 2) Creating a uniform corresponding to the multiplier in the shader
 3) Setting this uniform via stateset and creating a corresponding variable
 in FFTOceanSurface.

 SVN diff to release tag attached.

 Cheers,

 whatnick.

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




 Attachments:
 http://forum.openscenegraph.org//files/refelection_var_diff_551.txt


 ___
 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] [osgOcean] Compilation under linux

2013-11-15 Thread Guido Militello
Hi,

new to this forum and osgocean, I'd just downloaded and tried to compile to see 
how  this works. But I had some building problems: 

These are the files I'd downloaded dependencies: 

fftw-3.3.3.tar.gz
OpenSceneGraph-3.0.1
osgOcean-Source-1.0.1.rar
osgOcean-Resources-1.0.1.rar

everything decompressed and it's now look like this: 

ls -l /media/DiscoD/linux/MyApp1

drwxr-xr-x 1 gmilitel users4096 30.10.2007 10:46 fftss-3.0/
drwxr-xr-x 1 gmilitel users4096 01.08.2011 18:40 osg/
drwxr-xr-x 1 gmilitel users4096 01.11.2013 12:55 osgOcean/

cd osgOcean
mkdir build
ccmake .. 


 
  Page 1 of 1
  CMAKE_BUILD_TYPE Release 
  
  CMAKE_INSTALL_PREFIX /media/DiscoD/linux/MyApp1/osgOcean 
  
  FFTSS_INCLUDE_DIRFFTSS_INCLUDE_DIR-NOTFOUND  
  
  FFTSS_LIBRARYFFTSS_LIBRARY-NOTFOUND  
  
  FFTW3-3_INCLUDE_DIR  
 /media/DiscoD/linux/MyApp1/fftw-3.3.3/include 

  FFTW3-3_LIBRARY  
 /media/DiscoD/linux/MyApp1/fftw-3.3.3/lib/libfftw3.so 

  OPENTHREADS_INCLUDE_DIR  
 /media/DiscoD/linux/MyApp1/osg/include/OpenThreads

  OPENTHREADS_LIBRARY  
 /media/DiscoD/linux/MyApp1/osg/lib64/libOpenThreads.so

  OPENTHREADS_LIBRARY_DEBUG
 /media/DiscoD/linux/MyApp1/osg/lib64/libOpenThreads.so

  OSGDB_INCLUDE_DIR
 /media/DiscoD/linux/MyApp1/osg/include/osgDB  

  OSGDB_LIBRARY
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgDB.so  

  OSGDB_LIBRARY_DEBUG  
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgDB.so  

  OSGGA_INCLUDE_DIR
 /media/DiscoD/linux/MyApp1/osg/include/osgGA  

  OSGGA_LIBRARY
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgGA.so  

  OSGGA_LIBRARY_DEBUG  
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgGA.so  

  OSGTEXT_INCLUDE_DIR  
 /media/DiscoD/linux/MyApp1/osg/include/osgText

  OSGTEXT_LIBRARY  
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgText.so

  OSGTEXT_LIBRARY_DEBUG
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgText.so

  OSGUTIL_INCLUDE_DIR  
 /media/DiscoD/linux/MyApp1/osg/include/osgUtil

  OSGUTIL_LIBRARY  
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgUtil.so

  OSGUTIL_LIBRARY_DEBUG
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgUtil.so

  OSGVIEWER_INCLUDE_DIR
 /media/DiscoD/linux/MyApp1/osg/include/osgViewer  

  OSGVIEWER_LIBRARY
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgViewer.so  

  OSGVIEWER_LIBRARY_DEBUG  
 /media/DiscoD/linux/MyApp1/osg/lib64/libosgViewer.so  

  OSG_INCLUDE_DIR  /media/DiscoD/linux/MyApp1/osg/include  
  
  OSG_LIBRARY  
 /media/DiscoD/linux/MyApp1/osg/lib64/libosg.so

  OSG_LIBRARY_DEBUG
 /media/DiscoD/linux/MyApp1/osg/lib64/libosg.so

  USE_FFTSSOFF 
 

Re: [osg-users] [osgOcean] Compilation under linux

2013-11-15 Thread Kim Bale
Hi Guido,

I'm afraid I haven't compiled osgOcean under linux before as I only develop
on a windows box, perhaps some of the more linux-savvy OSG users can be of
assistance. I'm pretty sure it's been used under linux before.

Sorry I can't be of more help.

Kim.


On 1 November 2013 19:52, Guido Militello gmili...@gmail.com wrote:

 Hi,

 new to this forum and osgocean, I'd just downloaded and tried to compile
 to see how  this works. But I had some building problems:

 These are the files I'd downloaded dependencies:

 fftw-3.3.3.tar.gz
 OpenSceneGraph-3.0.1
 osgOcean-Source-1.0.1.rar
 osgOcean-Resources-1.0.1.rar

 everything decompressed and it's now look like this:

 ls -l /media/DiscoD/linux/MyApp1

 drwxr-xr-x 1 gmilitel users4096 30.10.2007 10:46 fftss-3.0/
 drwxr-xr-x 1 gmilitel users4096 01.08.2011 18:40 osg/
 drwxr-xr-x 1 gmilitel users4096 01.11.2013 12:55 osgOcean/

 cd osgOcean
 mkdir build
 ccmake ..


 
   Page 1 of 1
   CMAKE_BUILD_TYPE Release
   CMAKE_INSTALL_PREFIX /media/DiscoD/linux/MyApp1/osgOcean
   FFTSS_INCLUDE_DIRFFTSS_INCLUDE_DIR-NOTFOUND
   FFTSS_LIBRARYFFTSS_LIBRARY-NOTFOUND
   FFTW3-3_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/fftw-3.3.3/include
   FFTW3-3_LIBRARY
  /media/DiscoD/linux/MyApp1/fftw-3.3.3/lib/libfftw3.so
   OPENTHREADS_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/osg/include/OpenThreads
   OPENTHREADS_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libOpenThreads.so
   OPENTHREADS_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libOpenThreads.so
   OSGDB_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/osg/include/osgDB
   OSGDB_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgDB.so
   OSGDB_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgDB.so
   OSGGA_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/osg/include/osgGA
   OSGGA_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgGA.so
   OSGGA_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgGA.so
   OSGTEXT_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/osg/include/osgText
   OSGTEXT_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgText.so
   OSGTEXT_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgText.so
   OSGUTIL_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/osg/include/osgUtil
   OSGUTIL_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgUtil.so
   OSGUTIL_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgUtil.so
   OSGVIEWER_INCLUDE_DIR
  /media/DiscoD/linux/MyApp1/osg/include/osgViewer
   OSGVIEWER_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgViewer.so
   OSGVIEWER_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libosgViewer.so
   OSG_INCLUDE_DIR  /media/DiscoD/linux/MyApp1/osg/include
   OSG_LIBRARY
  /media/DiscoD/linux/MyApp1/osg/lib64/libosg.so
   OSG_LIBRARY_DEBUG
  /media/DiscoD/linux/MyApp1/osg/lib64/libosg.so
   USE_FFTSSOFF
   USE_FFTW3ON
   USE_FFTW3F   OFF
 
 
  CMAKE_BUILD_TYPE: Choose the type of build, options are:
 None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo
 MinSizeRel.
  Press [enter] to edit option
CMake Version
 2.8.12
  Press [c] to configure
  Press [h] for help   Press [q] to quit without generating
  Press [t] to toggle advanced mode (Currently Off)
 


 $ make


 
  [gmilitel-@gmilitel-lnx build]$ make
  [  5%] Building CXX object
 src/osgOcean/CMakeFiles/osgOcean.dir/Cylinder.cpp.o
  [ 11%] Building CXX object
 src/osgOcean/CMakeFiles/osgOcean.dir/DistortionSurface.cpp.o
  In file included from
 /media/DiscoD/linux/MyApp1/osg/include/osgDB/Output:20:0,
   from
 /media/DiscoD/linux/MyApp1/osg/include/osgDB/DotOsgWrapper:21,
   from
 /media/DiscoD/linux/MyApp1/osg/include/osgDB/Registry:26,
   from ../../../src/osgOcean/DistortionSurface.cpp:20:
  /media/DiscoD/linux/MyApp1/osg/include/osgDB/fstream:31:42: error:
 invalid use of incomplete type ‘std::fstream {aka class
 std::basic_fstreamchar}’
   class OSGDB_EXPORT fstream : public std::fstream
^
  In file included from /usr/include/c++/4.8.2/ios:38:0,
   from /usr/include/c++/4.8.2/ostream:38,
   from
 /media/DiscoD/linux/MyApp1/osg/include/osg/Notify:20,
   from
 /media/DiscoD/linux/MyApp1/osg/include/osg/Object:20,
   from /media/DiscoD/linux/MyApp1/osg/include/osg/Node:18,
   from
 /media/DiscoD/linux/MyApp1/osg/include/osg/Geode:17,
   from ../../../include/osgOcean/DistortionSurface:20,
   from ../../../src/osgOcean/DistortionSurface.cpp:19:
  /usr/include/c++/4.8.2/iosfwd:117:11: error: declaration of
 ‘std::fstream {aka class std::basic_fstreamchar}’
   class basic_fstream;
   

Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-11-14 Thread Tisham Dhar
Hi,

I have successfully implemented a changing reflection intensity by adding
1) Multiplier to env_map
2) Creating a uniform corresponding to the multiplier in the shader
3) Setting this uniform via stateset and creating a corresponding variable in 
FFTOceanSurface.

SVN diff to release tag attached.

Cheers, 

whatnick.

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




Attachments: 
http://forum.openscenegraph.org//files/refelection_var_diff_551.txt


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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-10-02 Thread Dario Minieri
Hi,

In effect, I see the env_color computation in the fragment shader. I'm able to 
multiply this one by a tiny constant  1 (like 0.2) to obtain the result 
desired, but the problem is that the total final tone change drastically. 

I don't know if I've made right operation, but I'm trying to re-calibrate the 
total tone using wave and bottom top color and come another problem: changing 
those values at runtime I receive a double corruption from FFTOceanSurface like 
this:


Code:
*** glibc detected *** bin/Demo: double free or corruption (!prev): 
0x06fab330 ***
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f0ac5ab8b96]
/usr/local/lib/libosgOcean.so(_ZNSt12_Destroy_auxILb0EE9__destroyIPSt6vectorIN8osgOcean9OceanTileESaIS4_vT_S8_+0x52)[0x7f0ac126d602]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface10computeSeaEj+0x142)[0x7f0ac126b782]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface5buildEv+0x40)[0x7f0ac126c970]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface18getSurfaceHeightAtEffPN3osg5Vec3fE+0x145)[0x7f0ac12676d5]




Parameters for wave and top color are thought to runtime change? I need to 
perform some operation to achieve the runtime modification?

Best

Thank you!

Cheers,
Dario

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





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


[osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-09-27 Thread Dario Minieri
Hi,

I'm looking to modify the amount of reflections intensity inside ocean. I'm 
using last trunk rev 258. 

I'm stuck into this piece of code inside OceanScene:


Code:
_reflectionMatrix = osg::Matrixf(  1,  0,  0,  0,
   0,  1,  0,  0,
   0,  0, -1,  0,
   0,  0,  2 * 
_oceanScene-getOceanSurfaceHeight(),  1 );

osg::ref_ptrosg::Texture2D reflectionTexture = 
_oceanScene-createTexture2D( _oceanScene-_reflectionTexSize, GL_RGBA );

// clip everything below water line
_reflectionCamera = _oceanScene-renderToTexturePass( 
reflectionTexture.get() );
_reflectionCamera-setClearColor( osg::Vec4( 0.0, 0.0, 0.0, 0.0 ) );
_reflectionCamera-setComputeNearFarMode( 
osg::Camera::DO_NOT_COMPUTE_NEAR_FAR );
_reflectionCamera-setCullMask( _oceanScene-_reflectionSceneMask );
_reflectionCamera-setCullCallback( new 
CameraCullCallback(_oceanScene.get()) );
_reflectionCamera-getOrCreateStateSet()-setMode( GL_CLIP_PLANE0+0, 
osg::StateAttribute::ON );
_reflectionCamera-getOrCreateStateSet()-setMode( GL_CULL_FACE, 
osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE );

_surfaceStateSet-setTextureAttributeAndModes( 
_oceanScene-_reflectionUnit, reflectionTexture.get(), osg::StateAttribute::ON 
);



I think that I should operate on texture properties, maybe the shader but right 
now I'm not able to see a significative change on intensity reflection 
effect...Someone can suggest to me a way? 

Thank you!

Cheers,
Dario[/code]

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





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


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-09-27 Thread Kim Bale
Hi Dario,

I would take a look inside the surface fragment shader and then tone down
the mix function that blends the reflection texture with the surface. It
should be pretty simple.

Regards,

Kim.


On 27 September 2013 17:37, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 I'm looking to modify the amount of reflections intensity inside ocean.
 I'm using last trunk rev 258.

 I'm stuck into this piece of code inside OceanScene:


 Code:
 _reflectionMatrix = osg::Matrixf(  1,  0,  0,  0,
0,  1,  0,  0,
0,  0, -1,  0,
0,  0,  2 *
 _oceanScene-getOceanSurfaceHeight(),  1 );

 osg::ref_ptrosg::Texture2D reflectionTexture =
 _oceanScene-createTexture2D( _oceanScene-_reflectionTexSize, GL_RGBA );

 // clip everything below water line
 _reflectionCamera = _oceanScene-renderToTexturePass(
 reflectionTexture.get() );
 _reflectionCamera-setClearColor( osg::Vec4( 0.0, 0.0, 0.0, 0.0 )
 );
 _reflectionCamera-setComputeNearFarMode(
 osg::Camera::DO_NOT_COMPUTE_NEAR_FAR );
 _reflectionCamera-setCullMask( _oceanScene-_reflectionSceneMask
 );
 _reflectionCamera-setCullCallback( new
 CameraCullCallback(_oceanScene.get()) );
 _reflectionCamera-getOrCreateStateSet()-setMode(
 GL_CLIP_PLANE0+0, osg::StateAttribute::ON );
 _reflectionCamera-getOrCreateStateSet()-setMode( GL_CULL_FACE,
 osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE );

 _surfaceStateSet-setTextureAttributeAndModes(
 _oceanScene-_reflectionUnit, reflectionTexture.get(),
 osg::StateAttribute::ON );



 I think that I should operate on texture properties, maybe the shader but
 right now I'm not able to see a significative change on intensity
 reflection effect...Someone can suggest to me a way?

 Thank you!

 Cheers,
 Dario[/code]

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





 ___
 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] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Mohammed Djeralfia
Hi,

I have just tested osgRiver(from alphapixel.com) and the river is not displyed 
correctly, the water is on the right corner of the river.3DS but only 1 segment 
of 9 is displayed (-15 to 0).
I had tried to change the code of osgRiver in 
RiverGraph::MergeRiverFromPoints(vectorRiverControlPoint points) at :
RiverControlPoint next2 = curvePoint (changed to :(points[i-1] * 0.4 + 
points[i] * 0.6)) ; and now I have 3 segments from 9 that are displayed, I had 
done some other  modifications but it did not resolve the problem.

So my questions are:
1) Why the osgRiver does  not be integrated in the osgOcean trunk?
2) Has someone have another version of the RiverGraph.cpp to make differance ?

Any other suggestions would be welcome.


Thank you!

Cheers,
Mohammed

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





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


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Chris Hanson
Just to be clear, AlphaPixel has no affiliation with osgRiver. I just
snagged a copy when it was posted years ago, and when it disappeared from
mailing-list archives, I made my copy available to anyone who wants it.

It seems like there is renewed interest in it, so I would love to see some
of these new folks pick it up, perhaps integrate it back into osgOcean, and
support it there.

Perhaps Kim Bale, osgOcean's creator [cc'ed here], could weigh in on the
matter?




On Fri, Sep 27, 2013 at 11:14 AM, Mohammed Djeralfia osgfo...@tevs.euwrote:

 Hi,

 I have just tested osgRiver(from alphapixel.com) and the river is not
 displyed correctly, the water is on the right corner of the river.3DS but
 only 1 segment of 9 is displayed (-15 to 0).
 I had tried to change the code of osgRiver in
 RiverGraph::MergeRiverFromPoints(vectorRiverControlPoint points) at :
 RiverControlPoint next2 = curvePoint (changed to :(points[i-1] * 0.4 +
 points[i] * 0.6)) ; and now I have 3 segments from 9 that are displayed, I
 had done some other  modifications but it did not resolve the problem.

 So my questions are:
 1) Why the osgRiver does  not be integrated in the osgOcean trunk?
 2) Has someone have another version of the RiverGraph.cpp to make
 differance ?

 Any other suggestions would be welcome.


 Thank you!

 Cheers,
 Mohammed

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





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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Kim Bale
Hi Mohammed,

I can answer your first question. osgRiver was never integrated into the
trunk because I felt that the way it had been combined in its current state
needed some work and sadly I simply haven't had time to work on it. I
haven't gone over the code for a long time but I seem to remember thinking
that it might be more appropriate for osgRiver to exist as a separate
nodekit rather than amalgamated into osgOcean since although they share a
lot of effects and are both water based, the problems they are trying to
solve are quite different.

Kim.


On 27 September 2013 18:14, Mohammed Djeralfia osgfo...@tevs.eu wrote:

 Hi,

 I have just tested osgRiver(from alphapixel.com) and the river is not
 displyed correctly, the water is on the right corner of the river.3DS but
 only 1 segment of 9 is displayed (-15 to 0).
 I had tried to change the code of osgRiver in
 RiverGraph::MergeRiverFromPoints(vectorRiverControlPoint points) at :
 RiverControlPoint next2 = curvePoint (changed to :(points[i-1] * 0.4 +
 points[i] * 0.6)) ; and now I have 3 segments from 9 that are displayed, I
 had done some other  modifications but it did not resolve the problem.

 So my questions are:
 1) Why the osgRiver does  not be integrated in the osgOcean trunk?
 2) Has someone have another version of the RiverGraph.cpp to make
 differance ?

 Any other suggestions would be welcome.


 Thank you!

 Cheers,
 Mohammed

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





 ___
 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] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Mohammed Djeralfia
Hi,

Thanks for the answers, so unfortunately there is no trace for its creator, so 
I must make some others efforts to find the problem and correct it.

In my case I think that to create a realistic 3D environement, the integration 
of the forest,building,roads,rivers, ocean and skys are very important, so :
1-for the forest and building I use osg+osgEarth directly(projected map),
2-for the roads I did not find a solution yet,
3-for the sea I use osgOcean,
4-for the sky I am trying with Silverlight(the demo),
5-for the river I need to find something to do that and it is the importance of 
the osgRiver (creation of continuous segment, a good direction of the water...) 

So I hope that its creator take it again and reanimate it.
 
I will thanks again Mr Chris Hanson to share this copy with us: THANK YOU VERY 
MUCH.

Thank you!

Cheers,
Mohammed

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





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


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Chris Hanson
4-for the sky I am trying with Silverlight(the demo),


  I think you mean Silver Lining.

  Good luck and you're welcome!

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Trajce Nikolov NICK
3  -for the sea I use osgOcean,

Nothing against osgOcean. I have used it as well in a project, but switched
over to Triton (check it out, same coming from sundog-soft as SilverLining )

Nick


On Fri, Sep 27, 2013 at 8:56 PM, Chris Hanson xe...@alphapixel.com wrote:

 4-for the sky I am trying with Silverlight(the demo),


   I think you mean Silver Lining.

   Good luck and you're welcome!

 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
 @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
 623-PIXL [7495]

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




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


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Trajce Nikolov NICK
and if you are really after fully opensource you can look for osgEphemeris,
a work I think done by Don Burns years ago, but that was my initial step
before figuring out SilverLining as well

Nick


On Fri, Sep 27, 2013 at 9:00 PM, Trajce Nikolov NICK 
trajce.nikolov.n...@gmail.com wrote:

 3  -for the sea I use osgOcean,

 Nothing against osgOcean. I have used it as well in a project, but
 switched over to Triton (check it out, same coming from sundog-soft as
 SilverLining )

 Nick


 On Fri, Sep 27, 2013 at 8:56 PM, Chris Hanson xe...@alphapixel.comwrote:

 4-for the sky I am trying with Silverlight(the demo),


   I think you mean Silver Lining.

   Good luck and you're welcome!

 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
 @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
 623-PIXL [7495]

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




 --
 trajce nikolov nick




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


Re: [osg-users] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Kim Bale
Traitor ;)

K.


On 27 September 2013 20:00, Trajce Nikolov NICK 
trajce.nikolov.n...@gmail.com wrote:

 3  -for the sea I use osgOcean,

 Nothing against osgOcean. I have used it as well in a project, but
 switched over to Triton (check it out, same coming from sundog-soft as
 SilverLining )

 Nick


 On Fri, Sep 27, 2013 at 8:56 PM, Chris Hanson xe...@alphapixel.comwrote:

 4-for the sky I am trying with Silverlight(the demo),


   I think you mean Silver Lining.

   Good luck and you're welcome!

 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
 @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
 623-PIXL [7495]

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




 --
 trajce nikolov 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] [osgOcean] Some questions about osgRiver ???

2013-09-27 Thread Trajce Nikolov NICK
hahaha .. come on  all the option :-)

Nick


On Fri, Sep 27, 2013 at 9:08 PM, Kim Bale kcb...@googlemail.com wrote:

 Traitor ;)

 K.


 On 27 September 2013 20:00, Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com wrote:

 3  -for the sea I use osgOcean,

 Nothing against osgOcean. I have used it as well in a project, but
 switched over to Triton (check it out, same coming from sundog-soft as
 SilverLining )

 Nick


  On Fri, Sep 27, 2013 at 8:56 PM, Chris Hanson xe...@alphapixel.comwrote:

  4-for the sky I am trying with Silverlight(the demo),


   I think you mean Silver Lining.

   Good luck and you're welcome!

 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL
 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
 @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
 623-PIXL [7495]

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




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




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


Re: [osg-users] osgOcean Project : How does shader work?

2013-09-04 Thread Christian Buchner
Relevant links to be found here

http://lmgtfy.com/?q=fft+ocean+simulation



2013/9/4 WillScott scott200...@hotmail.com

   Hi everybody,
  Recently , I have read the open source code provided by osgOcean
 project. And FFTOceanSurface class is really hard to understand ,
 especially in the shader technique in osgOcean.  I want to konw if anyone
 has the algorithms materials-mainly about mathmatic theory- concerning this
 techinque?

 Sincerely yours,

 ZhangMi,
Schools of
 Remote Sensing and Information Engineering,  Wuhan University, Hubei, China

 ___
 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] osgOcean Project : How does shader work?

2013-09-04 Thread Kim Bale
More information here.

http://forum.openscenegraph.org/viewtopic.php?t=12328

I don't really have much more information on the ocean shader itself, some
papers are referenced within the fragment code and the rest is fairly
standard stuff.

K.


On 4 September 2013 09:50, Christian Buchner christian.buch...@gmail.comwrote:

 Relevant links to be found here

 http://lmgtfy.com/?q=fft+ocean+simulation



 2013/9/4 WillScott scott200...@hotmail.com

   Hi everybody,
  Recently , I have read the open source code provided by osgOcean
 project. And FFTOceanSurface class is really hard to understand ,
 especially in the shader technique in osgOcean.  I want to konw if anyone
 has the algorithms materials-mainly about mathmatic theory- concerning this
 techinque?

 Sincerely yours,

 ZhangMi,
Schools of
 Remote Sensing and Information Engineering,  Wuhan University, Hubei, China

 ___
 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] osgOcean Project : How does shader work?

2013-09-04 Thread WillScott
Thanks a lot! Anyway , yours prompt reply is encourage to me.
 ZhangMi
 
Date: Wed, 4 Sep 2013 09:55:46 +0100
From: kcb...@googlemail.com
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] osgOcean Project : How does shader work?

More information here.
http://forum.openscenegraph.org/viewtopic.php?t=12328
I don't really have much more information on the ocean shader itself, some 
papers are referenced within the fragment code and the rest is fairly standard 
stuff. 


K.

On 4 September 2013 09:50, Christian Buchner christian.buch...@gmail.com 
wrote:

Relevant links to be found here

http://lmgtfy.com/?q=fft+ocean+simulation





2013/9/4 WillScott scott200...@hotmail.com





  Hi everybody,   
 Recently , I have read the open source code provided by osgOcean project. 
And FFTOceanSurface class is really hard to understand , especially in the 
shader technique in osgOcean.  I want to konw if anyone has the algorithms 
materials-mainly about mathmatic theory- concerning this techinque? 



  Sincerely yours,

   ZhangMi,


   Schools of 
Remote Sensing and Information Engineering,  Wuhan University, Hubei, China
  

___

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] osgOcean Project : How does shader work?

2013-09-03 Thread WillScott
  Hi everybody,   
 Recently , I have read the open source code provided by osgOcean project. 
And FFTOceanSurface class is really hard to understand , especially in the 
shader technique in osgOcean.  I want to konw if anyone has the algorithms 
materials-mainly about mathmatic theory- concerning this techinque? 

  Sincerely yours,

   ZhangMi,
   Schools of 
Remote Sensing and Information Engineering,  Wuhan University, Hubei, China
  ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-16 Thread Dario Minieri
Hi,

Mha, this is strange, because the snapshot showed above are oceanExample 
related with no alteration of code and options (different settings are changed 
in realtime using the feature of the example). I'm looking into refraction code 
and, in effect, this is drastically changed between two version: in rev208 the 
refraction is made by a dedicated camera pass render, in last rev258 not. I 
don't know if this problem can be a videocard problem...If you execute the 
oceanExample you can notice the same behaviour or it works for you?


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-16 Thread Dario Minieri
Hi,

Using last dev osg release (3.1.7) and trunk osgOcean revision (I'm using the 
suggested tags version) works


Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-15 Thread Trajce Nikolov NICK
Hi Dario,

it should work with the latest from trunk I think. It's been a while since
I used osgOcean but somehow it worked for me. Just fyi

Nick


On Fri, Jun 14, 2013 at 5:43 PM, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 I'm using still now OsgOcean rev 208. I'm update to the last rev 258.
 Refraction seems don't work. I have a scene with refraction enabled, withe
 rev208 I can see the refraction, not with the rev258.

 Someone has reported this issue?  I'm looking now around the refracition
 code, but is a bit expansive...

 Thank you!

 Cheers,
 Dario

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





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




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


Re: [osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-15 Thread Trajce Nikolov NICK
maybe you post a code snippet of your settings if someone can look at

Nick


On Sat, Jun 15, 2013 at 7:19 PM, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 Hummmmaybe is my fault in somewhat, but I make two snapshot of
 oceanExample and the refraction seems to me don't works. I've tested others
 my scenes and the result is the same.

 snap_no_refraction1.jpg shows the example scene without refraction and, in
 effect, apart the rev208 artifacts, the refraction is not visible.

 snap_with_refraction1.jpg shows the example scene with refraction, and,
 the rev 258 is the same as above (no refraction in any cases), rev 208
 shows the refraction of the island above water dynamic line.

 There are some parameters or others changes to make which are changed and
 I forgot?

 Thank you!

 Cheers,
 Dario

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




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




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


[osg-users] [osgOcean] Refraction Map issue: isn't visible...

2013-06-14 Thread Dario Minieri
Hi,

I'm using still now OsgOcean rev 208. I'm update to the last rev 258. 
Refraction seems don't work. I have a scene with refraction enabled, withe 
rev208 I can see the refraction, not with the rev258. 

Someone has reported this issue?  I'm looking now around the refracition code, 
but is a bit expansive...

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-14 Thread Dario Minieri
Hi kcbale

I've fixed the problem implementing a simple setLightColor with no stateSet 
dirty: i've updated the uniform value only. This work.

Right now, I look around another issue on the last ocean revision (258). Your 
ideas are really appreciated: 
http://forum.openscenegraph.org/viewtopic.php?t=12313

many thanks again

bye!


kcbale wrote:
 Hey Dario,
 
 Ah Ok i understand. I'll check over the code tomorrow, it does sound like it 
 might need some minor changes to accommodate your needs.
 
 Regards,
 
 Kim.
 
 Sent from my iPhone
 
 On 13 Jun 2013, at 22:45, Dario Minieri  wrote:
 
 
  Hi kcbale
  
  The light is a uniform and it is used to compute the wave top/bottom color. 
  Because the setLightColor set a statSetDirty, ocean is instructed tu reload 
  all stuffs. This cause a freeze at any time this reload is called. I'm 
  planning to setup directly the uniform without dirty the stateSet...I'm try 
  some ideas tomorrow...
  
  
  kcbale wrote:
  
   Hi Dario,
   
   I'm not sure I understand what you mean by a 'latch', could you describe 
   the symptoms a little more? I can't remember if the light variable is a 
   uniform or a #define and I'm not in front of a pc to check. 
   
   Regards
   
   Kim.
   
   Sent from my iPhone
   
   On 13 Jun 2013, at 17:04, Dario Minieri  wrote:
   
   
   
Hi,

I'm implementing a simple sun walk into skydome, calculating the light 
color during day. I'm using osgocean. To setup the ocean scene 
accordingly with the light color variation, I have to set the light 
color in osgocean itself via setLightColor. This works but 
setLightColor dirty the shader anytime and I see a latch into the 
scene when this happens. 

You can suggest to me a workaround to avoid the latch? Obviously I 
don't sets the ocean light color any microsecond, I update the light 
any 5 secs.

Thank you!

Cheers,
Dario

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





___
osg-users mailing list

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


   ___
   osg-users mailing list
   
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
   --
   Post generated by Mail2Forum
   
  
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=54600#54600
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


[osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-13 Thread Dario Minieri
Hi,

I'm implementing a simple sun walk into skydome, calculating the light color 
during day. I'm using osgocean. To setup the ocean scene accordingly with the 
light color variation, I have to set the light color in osgocean itself via 
setLightColor. This works but setLightColor dirty the shader anytime and I see 
a latch into the scene when this happens. 

You can suggest to me a workaround to avoid the latch? Obviously I don't sets 
the ocean light color any microsecond, I update the light any 5 secs.

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-13 Thread Kim Bale
Hi Dario,

I'm not sure I understand what you mean by a 'latch', could you describe the 
symptoms a little more? I can't remember if the light variable is a uniform or 
a #define and I'm not in front of a pc to check. 

Regards

Kim.

Sent from my iPhone

On 13 Jun 2013, at 17:04, Dario Minieri para...@cheapnet.it wrote:

 Hi,
 
 I'm implementing a simple sun walk into skydome, calculating the light color 
 during day. I'm using osgocean. To setup the ocean scene accordingly with the 
 light color variation, I have to set the light color in osgocean itself via 
 setLightColor. This works but setLightColor dirty the shader anytime and I 
 see a latch into the scene when this happens. 
 
 You can suggest to me a workaround to avoid the latch? Obviously I don't sets 
 the ocean light color any microsecond, I update the light any 5 secs.
 
 Thank you!
 
 Cheers,
 Dario
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=54595#54595
 
 
 
 
 
 ___
 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] [osgOcean] setLightColor and dynamic sun problems.

2013-06-13 Thread Dario Minieri
Hi kcbale

The light is a uniform and it is used to compute the wave top/bottom color. 
Because the setLightColor set a statSetDirty, ocean is instructed tu reload all 
stuffs. This cause a freeze at any time this reload is called. I'm planning 
to setup directly the uniform without dirty the stateSet...I'm try some ideas 
tomorrow...


kcbale wrote:
 Hi Dario,
 
 I'm not sure I understand what you mean by a 'latch', could you describe the 
 symptoms a little more? I can't remember if the light variable is a uniform 
 or a #define and I'm not in front of a pc to check. 
 
 Regards
 
 Kim.
 
 Sent from my iPhone
 
 On 13 Jun 2013, at 17:04, Dario Minieri  wrote:
 
 
  Hi,
  
  I'm implementing a simple sun walk into skydome, calculating the light 
  color during day. I'm using osgocean. To setup the ocean scene accordingly 
  with the light color variation, I have to set the light color in osgocean 
  itself via setLightColor. This works but setLightColor dirty the shader 
  anytime and I see a latch into the scene when this happens. 
  
  You can suggest to me a workaround to avoid the latch? Obviously I don't 
  sets the ocean light color any microsecond, I update the light any 5 secs.
  
  Thank you!
  
  Cheers,
  Dario
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=54595#54595
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] [osgOcean] setLightColor and dynamic sun problems.

2013-06-13 Thread Kim Bale
Hey Dario,

Ah Ok i understand. I'll check over the code tomorrow, it does sound like it 
might need some minor changes to accommodate your needs.

Regards,

Kim.

Sent from my iPhone

On 13 Jun 2013, at 22:45, Dario Minieri para...@cheapnet.it wrote:

 Hi kcbale
 
 The light is a uniform and it is used to compute the wave top/bottom color. 
 Because the setLightColor set a statSetDirty, ocean is instructed tu reload 
 all stuffs. This cause a freeze at any time this reload is called. I'm 
 planning to setup directly the uniform without dirty the stateSet...I'm try 
 some ideas tomorrow...
 
 
 kcbale wrote:
 Hi Dario,
 
 I'm not sure I understand what you mean by a 'latch', could you describe the 
 symptoms a little more? I can't remember if the light variable is a uniform 
 or a #define and I'm not in front of a pc to check. 
 
 Regards
 
 Kim.
 
 Sent from my iPhone
 
 On 13 Jun 2013, at 17:04, Dario Minieri  wrote:
 
 
 Hi,
 
 I'm implementing a simple sun walk into skydome, calculating the light 
 color during day. I'm using osgocean. To setup the ocean scene accordingly 
 with the light color variation, I have to set the light color in osgocean 
 itself via setLightColor. This works but setLightColor dirty the shader 
 anytime and I see a latch into the scene when this happens. 
 
 You can suggest to me a workaround to avoid the latch? Obviously I don't 
 sets the ocean light color any microsecond, I update the light any 5 secs.
 
 Thank you!
 
 Cheers,
 Dario
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=54595#54595
 
 
 
 
 
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 --
 Post generated by Mail2Forum
 
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=54600#54600
 
 
 
 
 
 ___
 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] [osgOcean] Wake effects?

2012-10-10 Thread Jean-Charles Quillet
Hi,

I'm bringing back this thread up. Did anyone get any success about this wake 
effect ?
Thanks for any hint,

Jean-Charles

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





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


Re: [osg-users] [osgOcean] osgOcean: setting main camera to RTT

2012-09-20 Thread Robert Osfield
Hi Janna,

On 19 September 2012 16:57, Janna Terde brja...@gmail.com wrote:
 Seems to be working if I disable some effects such as glare and some 
 underwater effects (I did not look exactly which ones are causing the 
 problem).

I haven't used osgOcean for a little while but I recall an issue with
the osgOcean effects using render to texture and this conflicting with
effects that contain them due to the way that osgOcean was setting up
things, I vaguely recall that it might check for camera names so and
have some handling of this, so have a look at the sources of osgOcean
to see if you can understand how it's put together.

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


Re: [osg-users] [osgOcean] osgOcean: setting main camera to RTT

2012-09-19 Thread Janna Terde
Hi,

Seems to be working if I disable some effects such as glare and some underwater 
effects (I did not look exactly which ones are causing the problem).

Cheers,
Janna

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





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


[osg-users] [osgOcean] osgOcean: setting main camera to RTT

2012-09-18 Thread Janna Terde
Hi,

I am trying to implement a monochrome camera in my application, which is using 
osg::Ocean. However I've encountered a problem related to osg::Ocean. 

What I am trying to do: 
take the main camera and set it to use Frame Buffer Object and render into 
texture. Then I am adding a slave camera which will render a screen quad with 
the texture coming from the main camera and use my shader to create monochrome 
effect.

Everything works except setting main camera to use FBO and render into texture 
does nothing at all. If i remove osg:Ocean from the scene everything works. 

I've tried this in osg::Ocean example too. 


Code:

viewer.setSceneData( root );

osgViewer::ViewerBase::Views views;
viewer.getViews(views);

osgViewer::View* view = views[0];
osg::Camera* mainCamera = view-getCamera();
mainCamerasetRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
viewer.realize();



Again if I have osg::Ocean inside of the scene setting FBO for main camera does 
not seems to do anything and everything works fine without osg::Ocean.

I assume it has to do something with the way osg::Ocean does it's passes. 
However I wonder if there is some way I can achieve my goal? 

Thank you!

Cheers,
Janna

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





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


Re: [osg-users] osgOcean and delta3d collision detection

2012-09-05 Thread 杨洋
Thanks for your relying! I have visited the www.delta3d.org,somebody asked
the same question and received some advice,but it didn't help. I'll try
some other methods.Anyway,many thanks!

2012/9/1 Kim Bale kcb...@googlemail.com

 Hi,

 I've not had any experience with Delta3D and osgOcean. However, I know
 that is has been used a fair bit with Delta3D since the wrapper was
 developed. Have you tried the Delta3D forum? They may be more forthcoming.

 Regards,

 Kim.

 On 1 September 2012 16:11, 杨洋 yangshi...@gmail.com wrote:

 Hi,
 Does anybody use osgOcean in delta3d program?I used osgOcean to create an
 ocean in my delta3d program,but there's a big problem--when I setting
 collision mesh to the dtCore:Object that is just a “plane” loaded from
  .osg file;
 then I drop a physics_crate (with all the appropriate sets) but it goes
 through,Has anyone seen something similar? Appreciate your help!

 ___
 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] osgOcean and delta3d collision detection

2012-09-01 Thread 杨洋
Hi,
Does anybody use osgOcean in delta3d program?I used osgOcean to create an
ocean in my delta3d program,but there's a big problem--when I setting
collision mesh to the dtCore:Object that is just a “plane” loaded from
 .osg file;
then I drop a physics_crate (with all the appropriate sets) but it goes
through,Has anyone seen something similar? Appreciate your help!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgOcean and delta3d collision detection

2012-09-01 Thread Kim Bale
Hi,

I've not had any experience with Delta3D and osgOcean. However, I know that
is has been used a fair bit with Delta3D since the wrapper was developed.
Have you tried the Delta3D forum? They may be more forthcoming.

Regards,

Kim.

On 1 September 2012 16:11, 杨洋 yangshi...@gmail.com wrote:

 Hi,
 Does anybody use osgOcean in delta3d program?I used osgOcean to create an
 ocean in my delta3d program,but there's a big problem--when I setting
 collision mesh to the dtCore:Object that is just a “plane” loaded from
  .osg file;
 then I drop a physics_crate (with all the appropriate sets) but it goes
 through,Has anyone seen something similar? Appreciate your help!

 ___
 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] [osgOcean] simple osgOcean code crushed

2012-09-01 Thread Kim Bale
Hi Ruigang,

It's quite hard to diagnose the issues you're having from the description.
However, if you are programming with Visual Studio or in windows you will
need to have the appropriate version of the DLL (Debug/Release) to match
the build type that the program was built with. I.e. Debug program build
with the debug osgocean dll. This is also the same for 64/32 bit builds,
you can't mix them.

FFTSS is a static lib so you shouldn't need to copy a DLL.

I haven't tried to compile osgocean and it's dependencies as 64bit though.
I'm not sure if fftss supports 64bit archs.

Sorry I can't be of more help.

K.


On 31 August 2012 18:31, Ruigang Yang ruigangy...@hotmail.com wrote:

 Hi, Kim,
 thank you for the quick reply. I suspect the DLL mismatch issue.
 So I copied the ocean example progrma with the dll together. it runs fine.
 then I copied that dll to my current project. Then I will have that crush
 issue.
 I even tried to rename that dll to make sure that the program is indeed
 using the dll I put in there.  that is also positive: my program
 immediately complained about missing dlls.

 So what else can I check? do I need to put the fftss dll somewhere?
 I only compiled a 64bit release version of the dll too. Do I need to
 compile a debug version since I am running debug mode?




 Thank you!

 Cheers,
 Ruigang

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





 ___
 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] [osgOcean] simple osgOcean code crushed

2012-08-31 Thread Ruigang Yang
Hi,

I have received some existing code that uses osgOcean. 
it has the following code segment:

Code:
osg::ref_ptrosgOcean::FFTOceanSurface oceanSurface = new 
osgOcean::FFTOceanSurface(64, 256, 64, osg::Vec2f(1.1f,1.1f), 12.0f, 1000.0f, 
0.8f, 1e-8, true, 2.5, 10.f, 256 ); 
oceanSurface-setWaveTopColor(osg::Vec3f( 0.6, 0.7, 0.7));

osg::ref_ptrosgOcean::OceanScene oceanScene = new 
osgOcean::OceanScene(oceanSurface.get());
osg::ref_ptrosg::Node scenetest = osgDB::readNodeFile(cessna.osg);
oceanScene-addChild(scenetest);


It will crush in the call addChild() with the error: unhandled exception at 
0x in ...exe: 0xc05: access violationg reading location 
0xf. Bascially, I can't add any child node to oceneScene. 

Is there something missed in my code?

I am able to compile and run the osgsample program. But it was unable to find 
some of the ive files. 

I am new to OSG. any help is greatly appreciated. 


Thank you!

Cheers,
Ruigang

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





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


Re: [osg-users] [osgOcean] simple osgOcean code crushed

2012-08-31 Thread Kim Bale
Hi  Ruigang,

Are you sure you haven't got a DLL mismatch? It can often cause strange
behaviour such as this.

I haven't experienced this problem at all with osgOcean.

Regards,

Kim.

On 31 August 2012 15:15, Ruigang Yang ruigangy...@hotmail.com wrote:

 Hi,

 I have received some existing code that uses osgOcean.
 it has the following code segment:

 Code:
 osg::ref_ptrosgOcean::FFTOceanSurface oceanSurface = new
 osgOcean::FFTOceanSurface(64, 256, 64, osg::Vec2f(1.1f,1.1f), 12.0f,
 1000.0f, 0.8f, 1e-8, true, 2.5, 10.f, 256 );
 oceanSurface-setWaveTopColor(osg::Vec3f( 0.6, 0.7, 0.7));

 osg::ref_ptrosgOcean::OceanScene oceanScene = new
 osgOcean::OceanScene(oceanSurface.get());
 osg::ref_ptrosg::Node scenetest = osgDB::readNodeFile(cessna.osg);
 oceanScene-addChild(scenetest);


 It will crush in the call addChild() with the error: unhandled
 exception at 0x in ...exe: 0xc05: access violationg reading
 location 0xf. Bascially, I can't add any child node to
 oceneScene.

 Is there something missed in my code?

 I am able to compile and run the osgsample program. But it was unable to
 find some of the ive files.

 I am new to OSG. any help is greatly appreciated.


 Thank you!

 Cheers,
 Ruigang

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





 ___
 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] [osgOcean] simple osgOcean code crushed

2012-08-31 Thread Ruigang Yang
Hi, Kim,
thank you for the quick reply. I suspect the DLL mismatch issue.
So I copied the ocean example progrma with the dll together. it runs fine.
then I copied that dll to my current project. Then I will have that crush 
issue. 
I even tried to rename that dll to make sure that the program is indeed using 
the dll I put in there.  that is also positive: my program immediately 
complained about missing dlls. 

So what else can I check? do I need to put the fftss dll somewhere? 
I only compiled a 64bit release version of the dll too. Do I need to compile a 
debug version since I am running debug mode?  




Thank you!

Cheers,
Ruigang

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





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


Re: [osg-users] osgOcean: Update cubemap often not working?

2012-06-07 Thread Brad Colbert
Hi folks,

Reading my post it's even hard for me to tell what I'm asking.  I'll try to 
simplify the question with this reply.

I'm trying to make the cubemap used in osgOcean (and the example osgOcean 
application) dynamic by attaching the faces of the cubemap to cameras as FBOs 
(see osgprerendercubemap example).  The problem is that I only see the effects 
of the first frame rendered to the FBO and nothing after, so they are not 
really dynamic.

I've attached (to the original message) my example source code which calls 
glCear in a draw callback for each camera.

Any insight would be helpful.

... 

Thank you!

Cheers,
Brad

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





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


[osg-users] osgOcean: Update cubemap often not working?

2012-06-04 Thread Brad Colbert
Hi folks,

I'm not sure what I'm missing, but I'm trying to update the cubemap used in 
osgOcean (and the example application) with a series of cameras.  The approach 
I've taken is derived from the osgprerendercubemap example.  I'm rendering our 
sky model to the cubemap but, strangely it does not appear to update when the 
time of day is changed?  

I've simplified my updates to the example application so that I can post it 
here.  In a pre-draw callback I call glClear when the camera ID  and the 
current count match.  What I expect to happen is that the clear color should 
iterate through all of the cameras (and cubemap panels), changing about once 
per second.  What I see is no effect of the clear.

If I call clear on all cameras at least once I get all of the panels in the 
cubemap with the clear color, but if the color changes during run-time, I see 
no change in the cubemap.

Debugging, I know that this pre-render call is made for all of the cubemap 
cameras every frame, but after the initial pass, it appears to not have an 
effect, although it is still called.

I appreciate any insight, thanks.

... 

Thank you!

Cheers,
Brad

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




Attachments: 
http://forum.openscenegraph.org//files/updatecameraandcubetexcallback_186.h
http://forum.openscenegraph.org//files/drawskyaspredrawcallback_759.h
http://forum.openscenegraph.org//files/updatecameraandcubetexcallback_737.cpp
http://forum.openscenegraph.org//files/drawskyaspredrawcallback_110.cpp
http://forum.openscenegraph.org//files/application_291.cpp


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


Re: [osg-users] [osgOcean] Masked FFTOceanSurface

2012-06-01 Thread Oliver Neumann
Hi Kim,

I attached the two files to this posting. The usage is simple, just 
use osgDB::readImageFile(FILEPATH) to get the a mask image that will then be 
applied to modulate the heights in the computeSea function. The mask is white 
where no change is needed and black where the ocean should not be visible.

Currently it has some drawbacks:
-The average height and the height of the lesser LOD's treats the masking 
height (e.g. -100.0f) like the valid heights
-It is not easy to produce a specific height distribution aside from a plain 
surface thats bounded by a definable shore. A river that flows down some rapids 
or multiple waterfalls are hard to get correctly. It would be better if the 
mask is supplied with specific (relative) ground heights so that e.g. 0 means 
no change and a mask value of e.g. 10 means the surface should on average be 10 
units elevated
-LOD 0 (1 Quad) currently cannot benefit from the masking, maybe by using a 
shader/texture that has alpha values set like the mask, this effect can still 
be conveyed at LOD0

Cheers,
Oliver

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




Attachments: 
http://forum.openscenegraph.org//files/fftoceansurface_864.cpp
http://forum.openscenegraph.org//files/1719_1338534512._126.


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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2012-06-01 Thread Brad Colbert
Hi Kim,

Thanks for your response.  I appreciate the paper and will give it a read.

...


Thank you!

Cheers,
Brad

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





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


Re: [osg-users] [osgOcean] Masked FFTOceanSurface

2012-05-31 Thread Kim Bale
Hi Oliver,

Any chance you could send me the modified files so I can run it and get a
feel for it?

Cheers,

Kim.

On 30 May 2012 13:32, Oliver Neumann z0...@yahoo.com wrote:

 Hi,

 I added a user-definable mask functionallity to FFTOceanSurface. The mask
 applies a height offset to the ocean tiles which allows the usage of the
 FFTOceanSurface as rivers and lakes on different altitudes in the same
 scene without having it protrude the ground (I plan to combine this with
 osgEarth).

 Its currently more of a dirty hack, but still its quite usable.

 In the FFTOceanSurface Header I added 2 variables and changed the ctor:

 Code:

 osg::Image *_surfMask;
 float _sufMaskMaxDist;

 public:
 FFTOceanSurface(unsigned int FFTGridSize = 64,
  unsigned int resolution = 256,
  unsigned int numTiles = 17,
  const osg::Vec2f windDirection = osg::Vec2f(1.1f, 1.1f),
  float windSpeed = 12.f,
  float depth = 1000.f,
  float reflectionDamping = 0.35f,
  float waveScale = 1e-8f,
  bool isChoppy = true,
  float choppyFactor = -2.5f,
  float animLoopTime = 10.f,
  unsigned int numFrames = 256,
  osg::Image *_surfMask=NULL,
  float _sufMaskMaxDist=100.0f
 );




 In FFTOceanSurface.cpp I added this to the computeSea method:

 Before the frame loop:

 Code:

 int imgDim = 0;
 int imgBytesPerLine = 0;
 int imgBytePerPixel = 0;

 if(_surfMask)
 {
  imgDim =__min(_surfMask-s(),_surfMask-t());
  imgBytePerPixel =
 _surfMask-computeNumComponents(_surfMask-getPixelFormat());
  imgBytesPerLine = _surfMask-s()*imgBytePerPixel;
 }




 Within the frame loop before calling OceanTile() for level 0:


 Code:

 int sizeHeights = heights-size();
 int dimHeights = (int)floor(sqrt((float)sizeHeights)+0.5f);

 if(_surfMask  imgDim0  dimHeights0) // Apply surface mask
 {
  //Handle scaling difference between
  if(dimHeights = imgDim)
  {
int imgScaling = dimHeights/imgDim;
int scaledImgDim = imgDim*imgScaling;
for(int y= 0; y  dimHeights;y++)
{
  int yRow = dimHeights*y;
  unsigned char* pImgOsgLine = ((unsigned char*)_surfMask-data())+
 imgBytesPerLine * (y/imgScaling);
  for(int x = 0; x  dimHeights;x++)
  {
if((x  scaledImgDim) (y  scaledImgDim))
{
  float alpha =(float)*((unsigned
 char*)(pImgOsgLine+(x/imgScaling)*imgBytePerPixel))/255.0f;
  float oldVal = heights-at(yRow+x);
  heights-at(yRow+x) = alpha*oldVal - _sufMaskMaxDist*(1.0f-alpha);
}
else
{
  heights-at(yRow+x) = -_sufMaskMaxDist;
}
  }
}
  }
  else
  {
int imgScaling_d1 = imgDim/dimHeights;
int scaledImgDim = imgDim/imgScaling_d1;
for(int y= 0; y  dimHeights;y++)
{
  int yRow = dimHeights*y;
  unsigned char* pImgOsgLine = ((unsigned char*)_surfMask-data()) +
 imgBytesPerLine * y*imgScaling_d1;
  for(int x = 0; x  dimHeights;x++)
  {
if((x  scaledImgDim) (y  scaledImgDim) )
{
  float alpha =(float)*((unsigned
 char*)(pImgOsgLine+x*imgScaling_d1*imgBytePerPixel))/255.0f;
  float oldVal = heights-at(yRow+x);
  heights-at(yRow+x) = alpha*oldVal - _sufMaskMaxDist*(1.0f-alpha);
}
else
{
  heights-at(yRow+x) = -_sufMaskMaxDist;
}
  }
}
  }
 }




 Greetings,
 Oliver

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




 Attachments:
 http://forum.openscenegraph.org//files/ocean_masked_157.png


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




-- 
osgOcean - http://code.google.com/p/osgocean/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [osgOcean] Masked FFTOceanSurface

2012-05-30 Thread Oliver Neumann
Hi,

I added a user-definable mask functionallity to FFTOceanSurface. The mask 
applies a height offset to the ocean tiles which allows the usage of the 
FFTOceanSurface as rivers and lakes on different altitudes in the same scene 
without having it protrude the ground (I plan to combine this with osgEarth). 

Its currently more of a dirty hack, but still its quite usable. 

In the FFTOceanSurface Header I added 2 variables and changed the ctor:

Code:

osg::Image *_surfMask;
float _sufMaskMaxDist;

public:
FFTOceanSurface(unsigned int FFTGridSize = 64,
 unsigned int resolution = 256,
 unsigned int numTiles = 17, 
 const osg::Vec2f windDirection = osg::Vec2f(1.1f, 1.1f),
 float windSpeed = 12.f,
 float depth = 1000.f,
 float reflectionDamping = 0.35f,
 float waveScale = 1e-8f,
 bool isChoppy = true,
 float choppyFactor = -2.5f,
 float animLoopTime = 10.f,
 unsigned int numFrames = 256,
 osg::Image *_surfMask=NULL,
 float _sufMaskMaxDist=100.0f
);




In FFTOceanSurface.cpp I added this to the computeSea method:

Before the frame loop:

Code:

int imgDim = 0;
int imgBytesPerLine = 0;
int imgBytePerPixel = 0;

if(_surfMask)
{
 imgDim =__min(_surfMask-s(),_surfMask-t());
 imgBytePerPixel = _surfMask-computeNumComponents(_surfMask-getPixelFormat());
 imgBytesPerLine = _surfMask-s()*imgBytePerPixel;
}




Within the frame loop before calling OceanTile() for level 0:


Code:

int sizeHeights = heights-size();
int dimHeights = (int)floor(sqrt((float)sizeHeights)+0.5f);

if(_surfMask  imgDim0  dimHeights0) // Apply surface mask
{
  //Handle scaling difference between 
  if(dimHeights = imgDim)
  {
int imgScaling = dimHeights/imgDim;
int scaledImgDim = imgDim*imgScaling;
for(int y= 0; y  dimHeights;y++)
{
  int yRow = dimHeights*y;
  unsigned char* pImgOsgLine = ((unsigned char*)_surfMask-data())+ 
imgBytesPerLine * (y/imgScaling);
  for(int x = 0; x  dimHeights;x++)
  {
if((x  scaledImgDim) (y  scaledImgDim))
{
  float alpha =(float)*((unsigned 
char*)(pImgOsgLine+(x/imgScaling)*imgBytePerPixel))/255.0f;
  float oldVal = heights-at(yRow+x);
  heights-at(yRow+x) = alpha*oldVal - _sufMaskMaxDist*(1.0f-alpha);
}
else
{
  heights-at(yRow+x) = -_sufMaskMaxDist;
}
  }
}
  }
  else
  {
int imgScaling_d1 = imgDim/dimHeights;
int scaledImgDim = imgDim/imgScaling_d1;
for(int y= 0; y  dimHeights;y++)
{
  int yRow = dimHeights*y;
  unsigned char* pImgOsgLine = ((unsigned char*)_surfMask-data()) + 
imgBytesPerLine * y*imgScaling_d1;
  for(int x = 0; x  dimHeights;x++)
  {
if((x  scaledImgDim) (y  scaledImgDim) )
{
  float alpha =(float)*((unsigned 
char*)(pImgOsgLine+x*imgScaling_d1*imgBytePerPixel))/255.0f;
  float oldVal = heights-at(yRow+x);
  heights-at(yRow+x) = alpha*oldVal - _sufMaskMaxDist*(1.0f-alpha);
}
else
{
  heights-at(yRow+x) = -_sufMaskMaxDist;
}
  }
}
  }
}




Greetings,
Oliver

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




Attachments: 
http://forum.openscenegraph.org//files/ocean_masked_157.png


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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2012-05-25 Thread Brad Colbert
Hi Kim,

I too am looking for resources about some specifics on osgOcean.

Generally, what is the ratio of wind speed to wave height?  Is there a simple 
function for this?  I want to be able to model certain wave heights and, as I 
understand it, this is driven by wind speed.

Are the top/bottom wave colors derived by hand or from a publication?  If a 
publication, which?  (Same question for the lighting color)

I'm trying to gain an understanding of the size of the OceanScene (tiles).  
Looking at the bounding sphere it starts out at roughly 12000x12000 (is that 
meters?)  When setting the parameters for osgOcean::FFTOceanSurface (gridsize, 
resolution, numtiles) to values other than what is in the example results in 
some pretty rough artifacts.  Is there a rule of thumb for setting these values?


Thank you!

Cheers,
Brad

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





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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2012-05-25 Thread Kim Bale
Hi Brad,

I've tried to document the FFTSimulation as well as possible if you look at
the source, at least in the trunk you should see an explanation of units
etc and the paper it was based on.

http://code.google.com/p/osgocean/source/browse/trunk/src/osgOcean/FFTSimulation.cpp


Here is the most up to date version of the paper, well worth a read if
you're interested in understanding it fully.

http://evasion.imag.fr/Membres/Fabrice.Neyret/NaturalScenes/fluids/water/waves/fluids-nuages/waves/Jonathan/articlesCG/simulating-ocean-water-01.pdf


I should point out that a lot of tweaks were made to make it look
aesthetically pleasing, it's not an ocean simulation more of a statistical
approximation.

Any further questions do get let me know.

Regards,

Kim.

On 24 May 2012 18:12, Brad Colbert bcolb...@rscusa.com wrote:

 Hi Kim,

 I too am looking for resources about some specifics on osgOcean.

 Generally, what is the ratio of wind speed to wave height?  Is there a
 simple function for this?  I want to be able to model certain wave
 heights and, as I understand it, this is driven by wind speed.

 Are the top/bottom wave colors derived by hand or from a publication?  If
 a publication, which?  (Same question for the lighting color)

 I'm trying to gain an understanding of the size of the OceanScene (tiles).
  Looking at the bounding sphere it starts out at roughly 12000x12000 (is
 that meters?)  When setting the parameters for osgOcean::FFTOceanSurface
 (gridsize, resolution, numtiles) to values other than what is in the
 example results in some pretty rough artifacts.  Is there a rule of thumb
 for setting these values?


 Thank you!

 Cheers,
 Brad

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





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




-- 
osgOcean - http://code.google.com/p/osgocean/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] When build new project, can not open osgOceanD.lib

2012-04-29 Thread Kim Bale
Hi Han,

In visual studio 2008 I usually add library directories and bin variables
on a per project basis, by right clicking on the project name in the
solution explorer selecting properties and editing the linker settings.

Without going through your visual studio settings it's hard to say where
you've gone wrong, but I would double check the path to the library that
you've specified because this appears to be a simple case of Visual Studio
not being able to find the lib file.

K.

On 26 March 2012 04:58, Han Wang wyh891...@yahoo.com.cn wrote:

 Hi,

 I'm a chinese student. I have complied the osgOcean successfully. I can
 run the oceanExample, and do everything in its applicantion.cpp. But now,
 I meet a problem: If I make a new project, when run the code, it alway
 declare an error:
 LINK : fatal error LNK1181: 无法打开输入文件“..\..\lib\Debug\osgOceanD.lib”,
 (Cannot open the input file:osgOceanD.lib)

 My osgOceanD.lib is located in F:\OSG\osgOcean\build\lib\Debug, and I also
 add this path to TOOLS―Option ―Directories- Library Files. In the
 Windows PATH, I add F:\OSG\osgOcean\build\bin\Debug.

 So, I need to know how to solve this problem.

 Thank you!

 Cheers,
 Han


 Following is the test code:


 #include osgViewer/Viewer
 #include osgDB/ReadFile

 #include osgGA/TrackballManipulator
 #include osgOcean/OceanScene
 #include osgOcean/FFTOceanSurface




 int main()
 {
osg::ref_ptrosgViewer::Viewer viewer =new osgViewer::Viewer;

  
 viewer-setUpViewInWindow(150,150,1024,768,0);//setUpViewInWindow(150,150,1024,768,0);

osg::ref_ptrosgOcean::FFTOceanSurface oceanSurface= new
 osgOcean::FFTOceanSurface(64,256,17,osg::Vec2(1.1f,1.1f),12.0f,1000.0f,0.8f,1e-8,true,2.5,10.f,256);

osg::ref_ptrosgOcean::OceanScene oceanScene=new
 osgOcean::OceanScene(oceanSurface.get());
viewer-addEventHandler(oceanSurface-getEventHandler());
viewer-addEventHandler(oceanSurface-getEventHandler());

osgGA::TrackballManipulator *tb = new osgGA::TrackballManipulator;

  
 tb-setHomePosition(osg::Vec3f(0.0,0.0f,20.0),osg::Vec3f(0.0f,20.0f,20.0f),osg::Vec3f(0,0,1));
viewer-setCameraManipulator(tb);
viewer-setSceneData(oceanSurface);
viewer-run();
return 0;
 }

 This code is ok when copy to applicantion.cpp, but can't be use in new
 any projects.

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




 Attachments:
 http://forum.openscenegraph.org//files/ll_334.png


 ___
 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] [osgOcean] When build new project, can not open osgOceanD.lib

2012-04-28 Thread Han Wang
Hi,

I'm a chinese student. I have complied the osgOcean successfully. I can run the 
oceanExample, and do everything in its applicantion.cpp. But now, I meet a 
problem: If I make a new project, when run the code, it alway declare an error:
LINK : fatal error LNK1181: 无法打开输入文件“..\..\lib\Debug\osgOceanD.lib”,
(Cannot open the input file:osgOceanD.lib)

My osgOceanD.lib is located in F:\OSG\osgOcean\build\lib\Debug, and I also add 
this path to TOOLS—Option —Directories- Library Files. In the Windows 
PATH, I add F:\OSG\osgOcean\build\bin\Debug.

So, I need to know how to solve this problem.

Thank you!

Cheers,
Han


Following is the test code:


#include osgViewer/Viewer
#include osgDB/ReadFile

#include osgGA/TrackballManipulator
#include osgOcean/OceanScene
#include osgOcean/FFTOceanSurface




int main()
{
osg::ref_ptrosgViewer::Viewer viewer =new osgViewer::Viewer;

viewer-setUpViewInWindow(150,150,1024,768,0);//setUpViewInWindow(150,150,1024,768,0);

osg::ref_ptrosgOcean::FFTOceanSurface oceanSurface= new 
osgOcean::FFTOceanSurface(64,256,17,osg::Vec2(1.1f,1.1f),12.0f,1000.0f,0.8f,1e-8,true,2.5,10.f,256);

osg::ref_ptrosgOcean::OceanScene oceanScene=new 
osgOcean::OceanScene(oceanSurface.get());
viewer-addEventHandler(oceanSurface-getEventHandler());
viewer-addEventHandler(oceanSurface-getEventHandler());

osgGA::TrackballManipulator *tb = new osgGA::TrackballManipulator;

tb-setHomePosition(osg::Vec3f(0.0,0.0f,20.0),osg::Vec3f(0.0f,20.0f,20.0f),osg::Vec3f(0,0,1));
viewer-setCameraManipulator(tb);
viewer-setSceneData(oceanSurface);
viewer-run();
return 0;
}

This code is ok when copy to applicantion.cpp, but can't be use in new any 
projects.

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




Attachments: 
http://forum.openscenegraph.org//files/ll_334.png


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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2012-04-15 Thread Han Wang
Hi, Kim,

Thank your for your help. 

I will try to read the code myself. If I meet some problems that make me 
confused, I'll send massage to you for help.

Regards,

Han

   

kcbale wrote:
 Hi Han,
 
 I'm the author of the code, if you can be more specific about what you want 
 to know maybe I can help you.
 
 
 There isn't any documentation, only the example program to guide your way I'm 
 afraid.
 
 
 Regards,
 
 
 Kim.
 
 
 On 6 April 2012 08:02, Han Wang  () wrote:
 
  Hi,
  I find it difficult to learn the osgOcean by reading the source code only. 
  In addition, the document of this code is not very specific.
  
   So, I need some other guidebook or some similar documents, which can help 
  me to understand the  osgOcean quickly(No special detailed).
  
  Thank you!
  
  Cheers,
  Han Wang
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=46894#46894 
  (http://forum.openscenegraph.org/viewtopic.php?p=46894#46894)
  
  
  
  
  
  ___
  osg-users mailing list
   ()
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
  (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
  
 
 
  --
 Post generated by Mail2Forum


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





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


[osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2012-04-12 Thread Han Wang
Hi,
I find it difficult to learn the osgOcean by reading the source code only. In 
addition, the document of this code is not very specific. 

 So, I need some other guidebook or some similar documents, which can help me 
to understand the  osgOcean quickly(No special detailed).

Thank you!

Cheers,
Han Wang

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





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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2012-04-12 Thread Kim Bale
Hi Han,

I'm the author of the code, if you can be more specific about what you want
to know maybe I can help you.

There isn't any documentation, only the example program to guide your way
I'm afraid.

Regards,

Kim.


On 6 April 2012 08:02, Han Wang wyh891...@yahoo.com.cn wrote:

 Hi,
 I find it difficult to learn the osgOcean by reading the source code only.
 In addition, the document of this code is not very specific.

  So, I need some other guidebook or some similar documents, which can help
 me to understand the  osgOcean quickly(No special detailed).

 Thank you!

 Cheers,
 Han Wang

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





 ___
 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] [osgOcean] Problem: models are too bright, whitewashed.

2012-04-04 Thread Dario Minieri
Hi,

Ok, this is a classic problem about ocean shader. We have to re-set the 
attributes mode with a custom or empty shader.

Thank you!

Cheers, bye.

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





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


[osg-users] [osgOcean] Problem: models are too bright, whitewashed.

2012-04-03 Thread Dario Minieri
Hi,

Depending to the camera position, all sea models appear too bright, like 
whitewashed. Seems to be not  a light issue or osg model material 
configuration, I've tried many parameters variations without luck. How I can 
try to fix the problem?

Thank you!

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





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


[osg-users] [osgOcean] disabling LOD

2012-01-25 Thread bart gallet
Howdy folks,

is there a way to control (or disable) the LOD in osgOcean? I am trying to 
simulate a camera on a UAV that is tracking ships at very large standoff 
distances and at very high zoom. Because of the large distance between the 
camera and the ocean scene, the ocean looks way too flat around the ship in the 
image.


Thank you!

Cheers,
bart

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





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


Re: [osg-users] [osgOcean] how to set path to other resources folder?

2012-01-20 Thread Kim Bale
Hi Bart,

osgOcean uses the osgDB registry to find paths for resources.

You can add additional path to that with the following code:

osgDB::Registry::instance()-getDataFilePathList().push_back(
resources/boat);

There is an example of this in application.cpp

http://code.google.com/p/osgocean/source/browse/trunk/src/oceanExample/application.cpp#303

Cheers,

Kim.

On 20 January 2012 01:35, bart gallet bartgal...@hotmail.com wrote:

 Howdy folks,

 Is there a way to tell osgOcean to look elsewhere for its resources
 folder?

 My applications are looking for the resources folder directly in the
 directory of its executable, but I have many different applications, and I
 would like to share just the one resources folder among them.

 I am using Windows 7 and Microsoft Visual Studio 2008.

 Any suggestions?

 Thank you!

 Cheers,
 bart

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





 ___
 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] [osgOcean] how to set path to other resources folder?

2012-01-20 Thread bart gallet
Thank you Kim

that solved it.


Cheers,
bart

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





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


[osg-users] [osgOcean] how to set path to other resources folder?

2012-01-19 Thread bart gallet
Howdy folks,

Is there a way to tell osgOcean to look elsewhere for its resources folder?

My applications are looking for the resources folder directly in the 
directory of its executable, but I have many different applications, and I 
would like to share just the one resources folder among them.

I am using Windows 7 and Microsoft Visual Studio 2008. 

Any suggestions?

Thank you!

Cheers,
bart

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





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


Re: [osg-users] [osgOcean] SkyDome with a repeating Texture2D

2011-12-22 Thread Bawenang Rukmoko
Hi Kim,

Thanks for the reply. Well, I know it is only to showcase the osgOcean but 
still we need something to show the atmosphere / (at least) the sky. Currently 
I am using the skydome in my project because I don't know anything that's 
better. Now the problem is the skydome is always stretched in my project. And 
that makes the stars in the night scene bigger (like 5 pixels bigger) which is 
weird and unnatural. So I am trying to solve this by not clamping the texture 
from edge to edge, but repeat the same texture instead.

I hope this makes sense.


Thank you!

Cheers,
Bawenang


quot;There's no place like 127.0.0.1quot;

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





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


[osg-users] osgOcean resource path

2011-12-16 Thread Jean-Claude Monnin
Hi Kim, Jean-Sébastien and others,

I've started to experiment again with osgOcean, and I have an issue about 
finding the osgOcean resources. OsgOcean/oceanExample modifies the osg file 
path by adding following items:
resources/textures/
resources/shaders/
resources/island
resources/boat


This leads to following problems:

- These path items are relative to the current directory. Therefore the 
application only find it's resources if the current directory is set to the 
folder containing the resources. Usually, it's not a good idea for the 
application to rely on a specific current directory to work correctly.

- I'm using MacOSX with unix makefile to compile osgOcean. A standard 
make;sudo make install puts the resources in /usr/local/bin which is the 
not the right place for resources. When running the oceanExample after 
installing, it doesn't find the resources (unless you manually change the 
current directory to usr/local/bin).

- The addResourcePaths method is repeated by copypaste across different 
classes. Not a real problem, but it's not elegant.


To fix these issues, I propose the following modification: 

Remove the addResourcePaths methods (eg. not adding relative path items to 
the osg file path). When loading a resource, add the folder prefix in the code 
(for example osgDB::readImageFile(textures/sun_glare.png); instead of 
osgDB::readImageFile(sun_glare.png);).
The user would have to add the content of the osgOcean resource folder into 
OpenSceneGraph-Data or add the osgOcean resource folder to the OSG_FILE_PATH 
environment variable.
Resources would be excluded from the files to copy at install stage.


Please let me know if you see other ways to fix these issues. I'm happy to 
submit a patch if I'm on the right track.

Cheers,

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


Re: [osg-users] [osgOcean] SkyDome with a repeating Texture2D

2011-12-05 Thread Kim Bale
Hi Bawenang,
*
*
I don't see a problem with that, the skydome class was only really created
to dress up the example code.

Regards,

Kim.



On 1 December 2011 11:46, Bawenang Rukmoko ben...@cs.its.ac.id wrote:

 Hi,

 First of all, I would like to ask a permission to use and modify the
 SkyDome used in the oceanExample and make it into a separate library. I
 know that it is not really a part of osgOcean library, but I reckon that
 the devs should be the same. So I asked the question here.

 Like the title above, I wanted to change the SkyDome and make it to use a
 repeating Texture2D instead of the TextureCubeMap. I need the SkyDome to
 display the starfield repeatedly, while also making the texture stretching
 be as natural as possible (ie. not overstretched like the current SkyDome).
 It still didn't work because it showed the color array of the SphereSegment
 geometry. The SphereSegment class is the same as the one in oceanExample.
 However, I've reworked the SkyDome class. This is my SkyDome class.




 Thank you!

 Cheers,
 Bawenang


 Code:

 SkyDome.h

class OSGATMOSPHERE_EXPORT SkyDome : public SphereSegment
{
public:
/**
 * Sky Dome Parameters struct
 *
 */
struct SkyDomeParams
{
float   radius;
unsigned intlongSteps;
unsigned intlatSteps;
std::string starfieldTexName;

///Ctor
SkyDomeParams()
 //: radius(1)
: radius(1900)
, longSteps(4)
, latSteps(4)
, starfieldTexName()
{

}

///Ctor with params
SkyDomeParams(float r, unsigned int longitudeStep, unsigned
 int latitudeStep, const std::string texName)
 //: radius(1)
: radius(r)
, longSteps(longitudeStep)
, latSteps(latitudeStep)
, starfieldTexName(texName)
{

}

///Copy Ctor
SkyDomeParams(const SkyDomeParams copy)
{
this-radius = copy.radius;
this-longSteps = copy.longSteps;
this-latSteps = copy.latSteps;
this-starfieldTexName = copy.starfieldTexName;
}

///Assignment Op
SkyDomeParams operator = (const SkyDomeParams copy)
{
this-radius = copy.radius;
this-longSteps = copy.longSteps;
this-latSteps = copy.latSteps;
this-starfieldTexName = copy.starfieldTexName;

return *this;
}

///Dtor
~SkyDomeParams()
{
}

};

SkyDome( void );
SkyDome( const SkyDome copy, const osg::CopyOp
 copyop=osg::CopyOp::SHALLOW_COPY );
SkyDome( float radius, unsigned int longSteps, unsigned int
 latSteps, const std::string starfieldTexName );
SkyDome( const SkyDomeParams skyDomeParams );

protected:
~SkyDome(void);

public:
void setupStateSet( );
void create( float radius, unsigned int latSteps, unsigned
 int longSteps, const std::string starfieldTexName );
void create( const SkyDomeParams skyDomeParams );

//++ BAWE-2028: SKYDOME
/**
 *
 */
inline void setStarField( const std::string
 starfieldTexName )
{
if (!mStarfieldTexture.valid())
{
mStarfieldTexture = new osg::Texture2D;
_setTextureParams( );
}
_createTexture( starfieldTexName );
}

void showPolyLine(bool isShowLine);
//-- BAWE-2028: SKYDOME

private:
osg::ref_ptrosg::Program _createShader(void);
void _setTextureParams( );
void _createTexture( const std::string starfieldTexName );
void _createFromParams();

SkyDomeParams   mSkyDomeParams;
boolmIsShowPolyLine;
osg::ref_ptrosg::Texture2DmStarfieldTexture;

};





 Code:

 SkyDome.cpp

 SkyDome::SkyDome( void )
: mIsShowPolyLine (false)
, mSkyDomeParams ()
 {

 }

 SkyDome::SkyDome( const SkyDome copy, const osg::CopyOp copyop ):
SphereSegment( copy, copyop )
 {

 }

 SkyDome::SkyDome( float radius, unsigned int longSteps, unsigned int
 latSteps, const std::string starfieldTexName )
: mIsShowPolyLine 

[osg-users] [osgOcean] SkyDome with a repeating Texture2D

2011-12-01 Thread Bawenang Rukmoko
Hi,

First of all, I would like to ask a permission to use and modify the SkyDome 
used in the oceanExample and make it into a separate library. I know that it is 
not really a part of osgOcean library, but I reckon that the devs should be the 
same. So I asked the question here. 

Like the title above, I wanted to change the SkyDome and make it to use a 
repeating Texture2D instead of the TextureCubeMap. I need the SkyDome to 
display the starfield repeatedly, while also making the texture stretching be 
as natural as possible (ie. not overstretched like the current SkyDome). It 
still didn't work because it showed the color array of the SphereSegment 
geometry. The SphereSegment class is the same as the one in oceanExample. 
However, I've reworked the SkyDome class. This is my SkyDome class.




Thank you!

Cheers,
Bawenang


Code:

SkyDome.h

class OSGATMOSPHERE_EXPORT SkyDome : public SphereSegment
{
public:
/**
 * Sky Dome Parameters struct
 *
 */
struct SkyDomeParams
{
float   radius;
unsigned intlongSteps;
unsigned intlatSteps;
std::string starfieldTexName;

///Ctor
SkyDomeParams()
//: radius(1)
: radius(1900)
, longSteps(4)
, latSteps(4)
, starfieldTexName()
{

}

///Ctor with params
SkyDomeParams(float r, unsigned int longitudeStep, unsigned int 
latitudeStep, const std::string texName)
//: radius(1)
: radius(r)
, longSteps(longitudeStep)
, latSteps(latitudeStep)
, starfieldTexName(texName)
{

}

///Copy Ctor
SkyDomeParams(const SkyDomeParams copy)
{
this-radius = copy.radius;
this-longSteps = copy.longSteps;
this-latSteps = copy.latSteps;
this-starfieldTexName = copy.starfieldTexName;
}

///Assignment Op
SkyDomeParams operator = (const SkyDomeParams copy)
{
this-radius = copy.radius;
this-longSteps = copy.longSteps;
this-latSteps = copy.latSteps;
this-starfieldTexName = copy.starfieldTexName;

return *this;
}

///Dtor
~SkyDomeParams()
{
}

};

SkyDome( void );
SkyDome( const SkyDome copy, const osg::CopyOp 
copyop=osg::CopyOp::SHALLOW_COPY );
SkyDome( float radius, unsigned int longSteps, unsigned int 
latSteps, const std::string starfieldTexName );
SkyDome( const SkyDomeParams skyDomeParams );

protected:
~SkyDome(void);

public:
void setupStateSet( );
void create( float radius, unsigned int latSteps, unsigned int 
longSteps, const std::string starfieldTexName );
void create( const SkyDomeParams skyDomeParams );

//++ BAWE-2028: SKYDOME
/**
 *
 */
inline void setStarField( const std::string starfieldTexName )
{
if (!mStarfieldTexture.valid())   
{
mStarfieldTexture = new osg::Texture2D;
_setTextureParams( );
}
_createTexture( starfieldTexName );
}

void showPolyLine(bool isShowLine);
//-- BAWE-2028: SKYDOME

private:
osg::ref_ptrosg::Program _createShader(void);
void _setTextureParams( );
void _createTexture( const std::string starfieldTexName );
void _createFromParams();

SkyDomeParams   mSkyDomeParams;
boolmIsShowPolyLine;
osg::ref_ptrosg::Texture2DmStarfieldTexture;

};





Code:

SkyDome.cpp

SkyDome::SkyDome( void )
: mIsShowPolyLine (false)
, mSkyDomeParams ()
{

}

SkyDome::SkyDome( const SkyDome copy, const osg::CopyOp copyop ):
SphereSegment( copy, copyop )
{

}

SkyDome::SkyDome( float radius, unsigned int longSteps, unsigned int latSteps, 
const 

Re: [osg-users] [osgOcean] osgOcean time control

2011-11-08 Thread bart gallet
Hi J-S

thanks for the information.

Looking at the link you provided me, the code I have downloaded from 
http://code.google.com/p/osgocean/downloads/list is different (and has issues 
like nested protected classes which MSVC is complaining about). 

I have osgOcean 1.0.1, released on 03/11/09 - is there a later version 
available somewhere else?

Cheers

Bart

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





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


Re: [osg-users] [osgOcean] osgOcean time control

2011-11-08 Thread Kim Bale
I would work with the version in the trunk.. 1.0.1 is rather dated. I
really do need to do a review and do a new release..

K.

On 8 November 2011 16:06, bart gallet bartgal...@hotmail.com wrote:

 Hi J-S

 thanks for the information.

 Looking at the link you provided me, the code I have downloaded from
 http://code.google.com/p/osgocean/downloads/list is different (and has
 issues like nested protected classes which MSVC is complaining about).

 I have osgOcean 1.0.1, released on 03/11/09 - is there a later version
 available somewhere else?

 Cheers

 Bart

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





 ___
 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] [osgOcean] osgOcean time control

2011-11-08 Thread bart gallet
Hi Kim,

thanks for the advice

Cheers,
bart

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





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


Re: [osg-users] [osgOcean] rendering off screen ocean scenes

2011-11-07 Thread Kim Bale
Hi Bart,

This is a fairly specialised use case for osgOcean and wasn't really
considered in the initial design. osgOcean uses a custom cull traversal
within ocean scene which controls all of the prerender and postrender
passes. I fear that it may be this cull traversal that is messing up your
pbuffer context.

Take a look at the code in OceanScene in particular the cull traversal,
maybe you'll be able to figure out a solution from that.

Regards,

K.

On 6 November 2011 01:16, bart gallet bartgal...@hotmail.com wrote:

 Howdy all

 I am using OSG for generating synthetic environments for AI agents. The
 one I am working on in particular flies over water, so using osgOcean seems
 to be the right choice here.

 I have two views: one that chases the vehicle and one that is taken from
 the vehicle's payload (pan-tilt-zoom camera).

 I have a third context, a pbuffer, that is assigned to a camera slaved
 with the pan-tilt-zoom camera, so that I can easily ship the pixelbuffer to
 CPU space where the AI processes the images (according to what the
 pan-tilt-zoom camera sees).

 I have an issue though: for some reason the ocean scenery is not rendered
 in the pbuffer but I do see it in my chase view and in my pan-tilt-zoom
 view (to which my off screen camera is slaved). I just get the default
 blueish-purpleish background (my pixel data is 33f33f33f33f33f) in the
 saved images.

 However, if instead of the ocean scene I use a terrain loaded from a
 terrapage database, I am actually able to render the scene in my pbuffer.

 Does anybody know of an issue with rendering osgOcean off-screen?

 Also, I had to force my pan-tilt-zoom viewer to single threaded, because
 otherwise it didn't work (Windows Error #170: [Screen #0]
 GraphicsWindowWin32::makeCurrentImplementation() - Unable to set current
 OpenGL rendering context. Reason: The requested resource is in use.).

 My system: Intel Core i7 CPU Q820, 8GB, Windows 7 (service pack1) NVIDIA
 Quadro FX 1800M and using latest release version of OSG.



 Thank you!

 Cheers,
 bart

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





 ___
 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] [osgOcean] rendering off screen ocean scenes

2011-11-07 Thread bart gallet
Hi K

Thanks for the tip. I'll look into it.

I noticed that when I disable all shader based features, I am able to render it 
off screen (more or less). It looks like most of the special effects that 
depends on shaders are for underwater scenes which I am not using anyways.


Cheers

Bart

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





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


Re: [osg-users] [osgOcean] rendering off screen ocean scenes

2011-11-07 Thread Kim Bale
Hi Bart,

The problematic ones are

The cross hatch glare on the ocean surface
Depth of field and lens distortion
God rays
.. I think that's it.

All of which use pre and post render passes.

Regards,

Kim.

On 7 November 2011 18:30, bart gallet bartgal...@hotmail.com wrote:

 Hi K

 Thanks for the tip. I'll look into it.

 I noticed that when I disable all shader based features, I am able to
 render it off screen (more or less). It looks like most of the special
 effects that depends on shaders are for underwater scenes which I am not
 using anyways.


 Cheers

 Bart

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





 ___
 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


  1   2   3   4   5   6   >