Page 3 of 3
Posted: Tue Sep 16, 2008 8:53 pm
by Caphalor
I just added a timescale slider to my editor and the result looks so nice that I made a small video (PSSM + 16 tap PCF + Caelum):
Download
Posted: Wed Sep 17, 2008 10:57 am
by captnoord
hmmm... NICE

damn.....
Posted: Tue Sep 30, 2008 3:42 pm
by sanfir
Hi,
First of all, thanks for the great efforts done in here
We have integrated the PSSM shadows into our game, and it was working great, until we decided to change the far clipping plane distance from 500 to 1000
Now one (or more) shadow texture has really bad resolution (mostly shadow map 2 or 3)
I have studied the calculateSplitPoints functions, and it is exactly as mentioned in the PSSM paper. But I'm afraid the problem might be in setOptimalAdjustFactor(), which is related to LiSPSM (I assume), and is not mentioned any where in the PSSM paper, so I am never able to adjust its values.
Any help on the proper values, equation, or better resolution tips would be highly appreciated.
Thank you
Posted: Tue Sep 30, 2008 10:20 pm
by sinbad
The optimal adjust factor just affects the 'skewing' of the perspective matrix - experiment with values between about 0.01 and 2.
Posted: Mon Oct 06, 2008 7:49 pm
by Azgur
I'm sorry to bump an aging thread, but I have a few questions regarding the implementation of PSSM in 1.6.
I've implemented it successfully into our current prototype, but a few parts still make us feel somewhat less comfortable.
The demo hardcodes a few things like:
Code: Select all
mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("pssmSplitPoints", splitPoints);
Is there a good generic way around this? Like detecting all materials that extend PSSM/base_receiver?
Posted: Mon Oct 06, 2008 8:28 pm
by Caphalor
I don't know whether it's a good solution, but I have a pass "Skylight" in my materials which computes directional lightning. So this is enough to setup the pssm parameters:
Code: Select all
Ogre::ResourceManager::ResourceMapIterator RI = Ogre::MaterialManager::getSingleton().getResourceIterator();
while (RI.hasMoreElements())
{
Ogre::MaterialPtr mat = RI.getNext();
if (mat->getTechnique(0)->getPass("SkyLight") != NULL) mat->getTechnique(0)->getPass("SkyLight")->getFragmentProgramParameters()->setNamedConstant("pssmSplitPoints", mPSSMSplitPoints);
}
Posted: Tue Oct 07, 2008 5:40 pm
by sinbad
Essentially you can precompute these split points and put them in a base material / program if you want. In this case it's just simple to do it inside the demo at runtime but you can structure your materials so that the split points are built in - they're not the kind of setting you'll need to change once you've tweaked it to your liking anyway.
Posted: Tue Oct 07, 2008 6:56 pm
by Azgur
Caphalor: Thank you for the suggestion. I'll likely use that method during prototyping when alot of stuff changes.
Sinbad: I've tried that and it works like charm. I do have a question though, under what conditions do the split values change? (As in, when should I update the hardcoded values?)
Posted: Wed Oct 08, 2008 10:24 pm
by sinbad
The splits only change if you choose to change them. The class can suggest splits based on near / far planes and a proportion, but once they're set, they don't change on their own. You might want to change them if you vary the near or far plane of your camera, but that's it.
Posted: Thu Oct 09, 2008 6:15 am
by Azgur
Thank you. That's all I needed to know.
Posted: Sat Nov 22, 2008 1:24 pm
by artn3r
Please, can someone have a look to my Thread:
http://www.ogre3d.org/phpBB2/viewtopic. ... 718#315718
I have problems with transparent pssm shadows!
Thanks,
Regards, Christian
Re:
Posted: Thu Dec 25, 2008 6:23 pm
by dark_sylinc
ahmedismaiel wrote:i have some trouble trying integrating this in ps3.0 shader (2.0 work great)
i get this error
Code: Select all
error X6077: texld/texldb/texldp/dsx/dsy instructions with r# as source cannot be used inside dynamic conditional 'if' blocks, dynamic conditional subroutine calls, or loop/rep with break*.
i searched for a fix but i cann't say i understand how to do it using ddx,ddy
help!
uh! very late answer, but it may help anyone
I had the same problem.
Use tex2Dlod(shadowMap, uv.xyyy).r instead and you'll be just fine, like the guys at ATI suggest.
Since shadows aren't LODed, tex2Dlod and tex2D will return the same.
If I recall correctly, that code in the sample is included but just commented.
Cheers
Dark Sylinc
PS: It's a PS 3.0 design issue. Not a shader bug
Re: Properly support PSSM/CSM
Posted: Thu Mar 12, 2009 12:43 am
by Nargil
I just recompiled the demo using 1.6.1 and there are some huge artifacts:
http://www.youtube.com/watch?v=hyaoMu4uizs
The precompiled demo worked just fine. Anyone succeded to port it to 1.6.1 ?
Re: Properly support PSSM/CSM
Posted: Tue Mar 17, 2009 10:09 am
by Jabberwocky
Just in the off-chance you've run across the same problem I had:
http://www.ogre3d.org/forums/viewtopic.php?f=4&t=48305
Re: Properly support PSSM/CSM
Posted: Wed Apr 08, 2009 11:06 am
by Nargil
Could someone confirm if the demo is not working with 1.6.1 or maybe trunk ?
I encounter similar issues (as mentioned above) when I try to implement the LiSPSM or PSSM shadow camera setup in my own project.
Jabberwocky: How could I ? I just recompiled it without modifying anything.
EDIT: The fixed version posted: Wed Aug 13, 2008 9:04 am works fine. Sry for bumping