[osg-users] SIGGRAPH OpenSceneGraph BOF this August in LA

2017-06-28 Thread John Richardson
Hello OSGers everywhere,

The OpenSceneGraph Birds of a Feather meeting at SIGGRAPH will be in room
511A on 2 Aug 2017 from 10:00AM till 11:00AM in the Los Angeles Convention
Center.

If you will be there and want to show off your OSG prowess you are
welcome...

John Richardson

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


Re: [osg-users] Fwd: Strange osgShadow appearance of multiple models self-shadowing under a point light

2017-06-28 Thread michael kapelko
Hi.
I can't say anything about your specific problems, but I had wrong shadows
when small objects were outside larget objects, i.e. if there's a plane and
a ball, and ball is outside the plane, the shadows were sometimes wrong.
To test my assumption, you can add a model with a plane that is underneath
*everything* in the scene and a wall that is heigher than *everything* in
the scene.

2017-06-27 23:14 GMT+07:00 Bris Li :

> Hi all,
>
> It's a problem with osgShadow.
> I hava a scene with multiple pagedLOD models bundled in a group. The
> models are tiles of a city, and each tile is a single model (buildings are
> not separeted with terrain).
> I uses the code in the osgShadow example for shadowing, and put a point
> light in _shadowedScene. The models shadow on themselves.
>
> As the attached image shows, the shadow result is partially correct. In
> some particular angle range from the light source, the correct shadow is
> casted. But in the other range, shadow is not cast correctly, but some
> strange shadows appear which I guess is casted from the model at the other
> side.
> Also, if I put the light on one side of the building, the other side of it
> is still lit, no shadow showing.
> I have tried different shadow implementations, but the results remain
> almost the same.
>
> I can't figure out what is happening since the shadow is just 'partially'
> abnormal. Stuck here for days.
>
> Thanks.
>
> Regards,
> tqjxlm.
>
> osg version 3.4.0.
> code:
> 
> 
> -
> *Shadow*
>  // arguments
>  char* argv[] = {
> "--vdsm",
> "--positionalLight",
> "--ortho",
> "--parallel-split",
> "--num-sm",
> "4",
> "--cascaded"
> };
>
> int argc = sizeof(argv) / sizeof(argv[0]);
>
> // use an ArgumentParser object to manage the program arguments
> osg::ArgumentParser arguments(, argv);
>
> // get the viewer
> osgViewer::View& viewer = getViewer();
>
> // init shadowed scene
> _shadowedScene = new osgShadow::ShadowedScene;
> osgShadow::ShadowSettings* settings = _shadowedScene->getShadowSettings();
> settings->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);
> settings->setCastsShadowTraversalMask(CastsShadowTraversalMask);
>
> double distance;
> if (arguments.read("--max-shadow-distance", distance))
> {
> settings->setMaximumShadowMapDistance(distance);
> }
>
> // choose shadow map implementation
> osg::ref_ptr msm = NULL;
> if (arguments.read("--no-shadows"))
> {
> OSG_NOTICE << "Not using a ShadowTechnique" << std::endl;
> _shadowedScene->setShadowTechnique(0);
> }
> else if (arguments.read("--stsm"))
> {
> osg::ref_ptr st = new
> osgShadow::StandardShadowMap;
> _shadowedScene->setShadowTechnique(st.get());
> }
> else if (arguments.read("--pssm"))
> {
> int mapcount = 3;
> while (arguments.read("--mapcount", mapcount));
> osg::ref_ptr pssm = new
> osgShadow::ParallelSplitShadowMap(NULL, mapcount);
>
> int mapres = 1024;
> while (arguments.read("--mapres", mapres))
> pssm->setTextureResolution(mapres);
>
> while (arguments.read("--debug-color")) { pssm->setDebugColorOn(); }
>
>
> int minNearSplit = 0;
> while (arguments.read("--minNearSplit", minNearSplit))
> if (minNearSplit > 0) {
> pssm->setMinNearDistanceForSplits(minNearSplit);
> }
>
> int maxfardist = 0;
> while (arguments.read("--maxFarDist", maxfardist))
> if (maxfardist > 0) {
> pssm->setMaxFarDistance(maxfardist);
> std::cout << "ParallelSplitShadowMap : setMaxFarDistance(" << maxfardist
> << ")" << std::endl;
> }
>
> int moveVCamFactor = 0;
> while (arguments.read("--moveVCamFactor", moveVCamFactor))
> if (maxfardist > 0) {
> pssm->setMoveVCamBehindRCamFactor(moveVCamFactor);
> }
>
> double polyoffsetfactor = pssm->getPolygonOffset().x();
> double polyoffsetunit = pssm->getPolygonOffset().y();
> while (arguments.read("--PolyOffset-Factor", polyoffsetfactor));
> while (arguments.read("--PolyOffset-Unit", polyoffsetunit));
> pssm->setPolygonOffset(osg::Vec2(polyoffsetfactor, polyoffsetunit));
>
> _shadowedScene->setShadowTechnique(pssm.get());
> }
> else if (arguments.read("--ssm"))
> {
> osg::ref_ptr sm = new osgShadow::SoftShadowMap;
> _shadowedScene->setShadowTechnique(sm.get());
> }
> else if (arguments.read("--vdsm"))
> {
> while (arguments.read("--debugHUD")) settings->setDebugDraw(true);
> if (arguments.read("--persp")) settings->setShadowMapProjecti
> onHint(osgShadow::ShadowSettings::PERSPECTIVE_SHADOW_MAP);
> if (arguments.read("--ortho")) settings->setShadowMapProjecti
> onHint(osgShadow::ShadowSettings::ORTHOGRAPHIC_SHADOW_MAP);
>
> unsigned int unit = 1;
> if (arguments.read("--unit", unit)) settings->setBaseShadowTexture
> Unit(unit);
>
> double n = 0.0;
> if (arguments.read("-n", n)) settings->setMinimumShadowMapNearFarRatio(n);
>
> unsigned int numShadowMaps;
> if (arguments.read("--num-sm", numShadowMaps))
> 

Re: [osg-users] Cannot rotate image on Windows 10 with osg 3.2.3

2017-06-28 Thread Christian Buchner
Maybe screen rotation by 90, 180 or 270 degrees was meant. In this case OSG
might have stopped working.

2017-06-28 9:45 GMT+02:00 Robert Osfield :

> Hi Clement,
>
> I'm not a Windows users so can't help with the specifics, but the
> information you provide is so vague it's impossible to know what you
> mean.  Could you start off by explaining what exactly you mean by
> "rotate image" and how you attempt to do it.
>
> Robert.
>
> On 28 June 2017 at 07:02,   wrote:
> > Hi,
> >
> >   Recently, I upgraded my machine to dell e7470 with windows 10.  I am
> using osg 3.2.3.  When I tried to rotate the image, I got the following
> error.  Please help.
> >
> > Unhandled exception at 0x7fff4080ab96 (osg100-osgViewerd.dll) in
> myprogram.exe: 0xC005: Access violation reading location
> 0x.
> >
> >
> >
> >
> > Regards,
> > Clement Chu
> > ___
> > 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] Cannot rotate image on Windows 10 with osg 3.2.3

2017-06-28 Thread Robert Osfield
Hi Clement,

I'm not a Windows users so can't help with the specifics, but the
information you provide is so vague it's impossible to know what you
mean.  Could you start off by explaining what exactly you mean by
"rotate image" and how you attempt to do it.

Robert.

On 28 June 2017 at 07:02,   wrote:
> Hi,
>
>   Recently, I upgraded my machine to dell e7470 with windows 10.  I am using 
> osg 3.2.3.  When I tried to rotate the image, I got the following error.  
> Please help.
>
> Unhandled exception at 0x7fff4080ab96 (osg100-osgViewerd.dll) in 
> myprogram.exe: 0xC005: Access violation reading location 
> 0x.
>
>
>
>
> Regards,
> Clement Chu
> ___
> 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] Cannot rotate image on Windows 10 with osg 3.2.3

2017-06-28 Thread Clement.Chu
Hi,

  Recently, I upgraded my machine to dell e7470 with windows 10.  I am using 
osg 3.2.3.  When I tried to rotate the image, I got the following error.  
Please help.

Unhandled exception at 0x7fff4080ab96 (osg100-osgViewerd.dll) in 
myprogram.exe: 0xC005: Access violation reading location 0x.




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