Re: [osg-users] Creating working shadow with one omnidirectional light

2014-05-12 Thread Mickael Fleurus
Hi,
You probably saved me a lot of time. Thank for fast answers and for your 
courtesy!

... 

Thank you!

Cheers,
Mickael

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





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


Re: [osg-users] Creating working omnidirectional shadow

2014-05-09 Thread Mickael Fleurus
Hi,
 yeah sorry I messed up with what I meant to say. It's more shadow with 
omnidirectionnal light, or point light as I think it's named in osg. 

ViewDependentShadowMap is producing a weird result. Depending on how distant my 
camera is from the scene, I have strange artefacts that make the scene 
unwatchable( img VDSM1). And if the light is too distant, shadows are cut of a 
part of the scene.(img VDSM2)

LightSpacePerspectiveShadowMapDB is also producing weird results. Depending on 
where my camera is, shadows are produced (img LSPSM1) or not (img LSPSM2). And 
sometimes, there is shadows only on a small part of the scene. (img LSPSM3) 

Are these problems that have been seen frequently, or is this caused by the 
rest of my code?

... 

Thank you!

Cheers,
Mickael

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




Attachments: 
http://forum.openscenegraph.org//files/vdsm2_976.png
http://forum.openscenegraph.org//files/vdsm1_300.png
http://forum.openscenegraph.org//files/lspsm2_126.png
http://forum.openscenegraph.org//files/lspsm1_521.png
http://forum.openscenegraph.org//files/lspsm3_551.png


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


Re: [osg-users] Creating working shadow with one omnidirectional light

2014-05-09 Thread Mickael Fleurus
[quote=Trajce Nikolov NICK]Hi,

if your shadows are moving with the camera, then you are using the default 
viewer lighting mode which moves the light with the camera. Try setting the 
viewer with no light ( viewer-setLightingMode(osg::View::NO_LIGHT); ) and set 
your own LightSource in the scene that you can position yourself. Here is 
snippet from my app that might help:


_viewer-getView(0)-setSceneData(_scene);


_sun = new osg::LightSource;
_sun-getLight()-setLightNum(0);
_sun-setName(SUN);
_sun-setCullingActive(false);
_scene-addChild(_sun.get());



then you position _sun-getLight() with zero (0) for the last argument in 
_sun-getLight()-setPosition(osg::Vec3(x,y,z),0)


Nick
[/quote]

Thank for your answer, but, the thing is, I need my light to be a point light. 
It cannot be a directionnal light or a spotlight. Indeed, it work with a 
directionnal light. But not like I need it to work. But thank you to have took 
the time to respond me.

I need a light that cast light in all direction, and shadow that correspond to 
the position of the light.

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





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


Re: [osg-users] Creating working shadow with one omnidirectional light

2014-05-09 Thread Mickael Fleurus
I checked the source of the SilverLining SDK, and I don't think it will be 
useful for what I search to achieve. After more research, I think that what 
make that no solution is good for what I'm looking to achieve is that every 
solutions use a single camera with a limited field of view to create shadows. 
Places where my shadows disapear are places that are outside camera's FOV. 
That's why I've tried to do my own shadow map in the first place, with a cube 
map. Because this problem can disapear with the use of a cube map. But, deep 
down, I'm sure that people making OSG thought of that problem and that I'm 
loosing time for nothing.

Thank you for the time you use trying to help me, anyway.

Cheers,
Mickael

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





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


[osg-users] Creating working omnidirectional shadow

2014-05-07 Thread Mickael Fleurus
Hi,
  I'm currently working with osgShadow, and it's driving me crazy! I'm really 
not an expert with shader and so on, but I try to make an omnidirectionnal 
shadow on my scenes, and I really don't know how to proceed. Every already 
implement way of making shadow in OSG aren't producing good shadows while using 
point light, except ShadowVolume, but it produce not only shadow, but also 3D 
geometry, and it's not what I'm looking for! I only want a realistic shadow, 
that work on large scene wherever the light is, and I don't find how to do it.

I tried to build my own omnidirectional shadow map, using a cube map, but, 
obviously, I don't have the skills to do it on my own. 

Do OSG have a build-in solution that I may have missed? Is it even possible to 
do it easily? Am I really bad at OSG or is it really difficult? Please, help 
me, even a little, I'm stuck for too long and I don't like this.

Thank you!

PS: sorry for my english, I'm not completly at ease with it.

Mickael

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





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