Hi all , hi nick

i wrote the PSSM shadow. There is some problem in the implementation, may
you can solve the problem in the OSG core, i didn't have enough time, nor
the idea how we can remove the problem.
but try with osgshadow --pssm --SingleThreaded --debug-color your_model.osg
, it works only good with single threaded osg :-( this is the biggest
problem

if you use with shader, reimplement the GLSL shader for pssm. see
at the header:
        /**
         * you can overwrite the fragment shader if you like to modify it
yourself, own fragment shader can be used
         */
        class OSGSHADOW_EXPORT FragmentShaderGenerator : public
osg::Referenced {
            public:
                /**
                 * generate the GLSL fragement shader
                 */
                virtual std::string generateGLSL_FragmentShader_BaseTex(bool
debug, unsigned int splitCount,double textureRes, bool filtered, unsigned
int nbrSplits,unsigned int textureOffset);
        };

replace the shader with this class. but all together within this code. have
a look into the implementation. for further idea, please contact me at
adrian.egli (*...@***) gmail.com

/adrian


2009/12/9 Trajce Nikolov <[email protected]>

> I tried both.
>
> PSSM gives some artifacts (see the attached image) - the white in the
> background, also, some flickering of the shadow on the models.
>
> Nick
>
> http://www.linkedin.com/in/tnikolov
> Sent from Gümüşsuyu, İstanbul, Turkey
>
> On Wed, Dec 9, 2009 at 12:27 PM, Wojciech Lewandowski <
> [email protected]> wrote:
>
>>  Hi,
>>
>> Cascaded Shadow Maps is the same as Parallel Split Shadow Map. PSSM is
>> implemented in osgShadow. Also LispSM could work for you scenario.
>>
>> Cheers,
>> Wojtek Lewandowski
>>
>>
>>
>>
>>
>>  *From:* Trajce Nikolov <[email protected]>
>> *Sent:* Wednesday, December 09, 2009 10:19 AM
>> *To:* OpenSceneGraph Users <[email protected]>
>> *Subject:* Re: [osg-users] osgShadows
>>
>> Hi Harold,
>>
>> yes, my light source is the "sun". No other lights in the scene yet. And
>> the results are not good. I will do research on the "cascade shadowmaps" and
>> will try to implement it. Thanks for the hint
>>
>> Nick
>>
>> http://www.linkedin.com/in/tnikolov
>> Sent from Gümüşsuyu, İstanbul, Turkey
>>
>> On Wed, Dec 9, 2009 at 11:13 AM, Harold Comere 
>> <[email protected]>wrote:
>>
>>> Hi Nike,
>>>>
>>>
>>> There is many way to get shadows and the shadowing technique choice shall
>>> depend of your scene data.
>>>
>>> The two basic shadowing techniques are :
>>> - shadow maps ( image based )
>>> - shadow volumes ( geometry based )
>>>
>>> Shadow maps are very cheap and easy to implement but will works good only
>>> if your light is not far from what you are shadowing due to the image
>>> approach. So if you have a large terrain with an unique directional light (
>>> as sun ), simple shadowmaps should do an ugly result.
>>> You could try "cascade shadowmaps" which is a technique used a lot in
>>> video games. It uses a kind of shadowmap LOD to avoid image based algorithms
>>> issues and stay cheap.
>>>
>>> Shadow volumes generate very accurate shadows but as it is based on
>>> geometry, if your scene geometry is complex you will experience some perf
>>> issues.
>>>
>>> Again, the shadowing technique choice depends of how many lights you
>>> have, where they are, what you are shadowing etc.
>>> Give a bit more details of your goal and i'm sure some osg pro will bring
>>> to you the ideal solution using osg :)
>>>
>>> Regards,
>>> Harold
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>  ------------------------------
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
********************************************
Adrian Egli
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to