Caelum - [WARNING: Screenshot intensive]
- cdleonard
- Goblin
- Posts: 266
- Joined: Thu May 31, 2007 9:45 am
@lilljohan: It should work; I don't know why it doesn't. Can you post the full Ogre.log somewhere?
@epha: I don't have access to a mac and can't really help you. Still; it shouldn't be very difficult to make it work. People made it work before (eugene; some time ago).
@sheen: Yes; it's OK to rotate the sky to fit your coordinates. You can freely rotate mCaelumSystem->getCameraNode(). Caelum's coordinates don't particularly make sense.
Are you sure you're converting time correctly? Julian day is always gmt; not local time. Also; time of the year matters.
@nath31337: The cloud shader now claims to require ps3.0; perhaps this is why it no longer works for you. It's possible that simply lowering the profile in the material would make it work.
@epha: I don't have access to a mac and can't really help you. Still; it shouldn't be very difficult to make it work. People made it work before (eugene; some time ago).
@sheen: Yes; it's OK to rotate the sky to fit your coordinates. You can freely rotate mCaelumSystem->getCameraNode(). Caelum's coordinates don't particularly make sense.
Are you sure you're converting time correctly? Julian day is always gmt; not local time. Also; time of the year matters.
@nath31337: The cloud shader now claims to require ps3.0; perhaps this is why it no longer works for you. It's possible that simply lowering the profile in the material would make it work.
-
- Halfling
- Posts: 82
- Joined: Tue Jan 03, 2006 4:05 pm
- Location: Växjö, Sweden
- Contact:
Here we go http://www.tinyrocket.se/Ogre.logcdleonard wrote:@lilljohan: It should work; I don't know why it doesn't. Can you post the full Ogre.log somewhere?
I have tried to play around with the profile, but to no use.
- cdleonard
- Goblin
- Posts: 266
- Joined: Thu May 31, 2007 9:45 am
"Ground fog" is ugly and nasty and I want to remove it. Don't use it. It seems you're trying to create it after Caelum itself is initialized; this is confusing. What about the demos; do those work?lilljohan wrote:Here we go http://www.tinyrocket.se/Ogre.logcdleonard wrote:@lilljohan: It should work; I don't know why it doesn't. Can you post the full Ogre.log somewhere?
I have tried to play around with the profile, but to no use.
-
- Halfling
- Posts: 82
- Joined: Tue Jan 03, 2006 4:05 pm
- Location: Växjö, Sweden
- Contact:
Both demo and lab works perfectly.cdleonard wrote:"Ground fog" is ugly and nasty and I want to remove it. Don't use it. It seems you're trying to create it after Caelum itself is initialized; this is confusing. What about the demos; do those work?lilljohan wrote:Here we go http://www.tinyrocket.se/Ogre.logcdleonard wrote:@lilljohan: It should work; I don't know why it doesn't. Can you post the full Ogre.log somewhere?
I have tried to play around with the profile, but to no use.
Here is my init code. If i enable moon, starfield or clouds then it crashes with the same error message as before, just a different unsupported shader. Which is weird since my graphics card supports every shader model known to man .. except 4.1 ...
Code: Select all
Caelum::CaelumSystem::CaelumComponent componentMask =
static_cast<Caelum::CaelumSystem::CaelumComponent> (
Caelum::CaelumSystem::CAELUM_COMPONENT_SUN |
//Caelum::CaelumSystem::CAELUM_COMPONENT_MOON |
Caelum::CaelumSystem::CAELUM_COMPONENT_SKY_DOME |
//Caelum::CaelumSystem::CAELUM_COMPONENT_IMAGE_STARFIELD |
//Caelum::CaelumSystem::CAELUM_COMPONENT_POINT_STARFIELD |
//Caelum::CaelumSystem::CAELUM_COMPONENT_CLOUDS |
0);
caelumSystem = new Caelum::CaelumSystem(Ogre::Root::getSingletonPtr(), sceneManager, componentMask);
caelumSystem->setManageSceneFog(true);
caelumSystem->setSceneFogDensityMultiplier(0.0015);
caelumSystem->setManageAmbientLight(true);
caelumSystem->setMinimumAmbientLight(Ogre::ColourValue(0.1, 0.1, 0.1));
caelumSystem->setSun(new Caelum::SphereSun(sceneManager, caelumSystem->getCaelumCameraNode()));
if (caelumSystem->getSun()) {
caelumSystem->getSun()->setAmbientMultiplier(Ogre::ColourValue(0.5, 0.5, 0.5));
caelumSystem->getSun()->setDiffuseMultiplier(Ogre::ColourValue(3, 3, 2.7));
caelumSystem->getSun()->setSpecularMultiplier(Ogre::ColourValue(5, 5, 5));
caelumSystem->getSun()->setAutoDisable(true);
caelumSystem->getSun()->setAutoDisableThreshold(0.1);
caelumSystem->getSun()->getMainLight()->setCastShadows(true);
}
if (caelumSystem->getMoon()) {
caelumSystem->getMoon()->setAutoDisable(true);
caelumSystem->getMoon()->setAutoDisableThreshold(0.1);
}
caelumSystem->setEnsureSingleShadowSource(true);
caelumSystem->setEnsureSingleLightSource(true);
caelumSystem->getUniversalClock()->setGregorianDateTime(2008, 4, 9, 6, 33, 0);
caelumSystem->setObserverLongitude(Ogre::Degree(0));
caelumSystem->setObserverLatitude(Ogre::Degree(0));
caelumSystem->getUniversalClock()->setTimeScale(100);
caelumSystem->getSkyDome()->setHazeEnabled(true);
window->addListener(caelumSystem);
Ogre::Root::getSingleton().addFrameListener(caelumSystem);
- cdleonard
- Goblin
- Posts: 266
- Joined: Thu May 31, 2007 9:45 am
@lilljohan: In your ogre.log you load "Assets/Caelum". Are you absolutely sure that you're not using older resource files for Caelum? You need the contents of the main/resources/ directory.
This is short of a shot in the dark; even if you had older resources I'm not sure why you would get "unsupported shader" errors. But if the demos work then something must be wrong with your setup.
This is short of a shot in the dark; even if you had older resources I'm not sure why you would get "unsupported shader" errors. But if the demos work then something must be wrong with your setup.
-
- Halfling
- Posts: 82
- Joined: Tue Jan 03, 2006 4:05 pm
- Location: Växjö, Sweden
- Contact:
Already checked that =/cdleonard wrote:@lilljohan: In your ogre.log you load "Assets/Caelum". Are you absolutely sure that you're not using older resource files for Caelum? You need the contents of the main/resources/ directory.
This is short of a shot in the dark; even if you had older resources I'm not sure why you would get "unsupported shader" errors. But if the demos work then something must be wrong with your setup.
I did get the unsupported exception before, but not on the clouds. I have checked "everything" in my setup. The init order seems okay.
Code: Select all
- Create ogre root
- Render system (d3d9)
- Resources
- Scene manager (Terrain)
- Camera
- world geometry
- caelum ...
Edit Going to download the latest drivers for my graphics card later, doesn't hurt to try.
- SiENcE
- Goblin
- Posts: 231
- Joined: Thu May 11, 2006 3:07 pm
- Location: Berlin
- Contact:
- cdleonard
- Goblin
- Posts: 266
- Joined: Thu May 31, 2007 9:45 am
@jonnys: I don't know. Some of the shaders are declared to require ps_3_0 vs_3_0 because it's easier to develop with the highest model. Most shaders can probably also work with lower profiles by just changing their declarations. I don't have a good answer.
@SieNcE: There's not enough information; how exactly do you get a segfault? Do the demos work correctly? What about an ogre.log or stacktrace?
You can check for shader support in ogre or catch Caelum::UnsupportedException (all components throw that now). Then you can make some sort of fallback. But shader-less cards should be pretty rare anyway.
@SieNcE: There's not enough information; how exactly do you get a segfault? Do the demos work correctly? What about an ogre.log or stacktrace?
You can check for shader support in ogre or catch Caelum::UnsupportedException (all components throw that now). Then you can make some sort of fallback. But shader-less cards should be pretty rare anyway.
- xadhoom
- Minaton
- Posts: 973
- Joined: Fri Dec 28, 2007 4:35 pm
- Location: Germany
- x 1
Hi leo!
I have an "unsupported Exception" issue with creating a caelumSystem,
destroying it and then recreating it (here the exception occurs saying that it
couldn´t load point starfield material in PointStarfield).
I´m working with a two weeks old SVN checkout. Did you address this issue already?
Thanks for your support!
I have an "unsupported Exception" issue with creating a caelumSystem,
destroying it and then recreating it (here the exception occurs saying that it
couldn´t load point starfield material in PointStarfield).
I´m working with a two weeks old SVN checkout. Did you address this issue already?
Thanks for your support!
- cdleonard
- Goblin
- Posts: 266
- Joined: Thu May 31, 2007 9:45 am
No; I don't think that was ever tested. Perhaps it leaks a material somehow? CaelumLab should have checkboxes to create/destroy individual components .xadhoom wrote:Hi leo!
I have an "unsupported Exception" issue with creating a caelumSystem,
destroying it and then recreating it (here the exception occurs saying that it
couldn´t load point starfield material in PointStarfield).
I´m working with a two weeks old SVN checkout. Did you address this issue already?
Thanks for your support!
BTW; did you manage to eventually get nullsquared's shadows to work with Caelum's lights?
- SiENcE
- Goblin
- Posts: 231
- Joined: Thu May 11, 2006 3:07 pm
- Location: Berlin
- Contact:
@cdleonard: I know that its impossible to find a seg fault and our Application is far to big to debug only caelum. So i just wait a bit that someone finds the problem in caelum. No hurry .
I solved the problem with the STARFIELD. You wrote in file ImageStarfield.h "ImageStarfield.jpg" and not "Starfield.jpg". But you only have "Starfield.jpg" in your ressources.
And now another question. I call Shutdown but nothing happends. Is shutdown currently working and does it clean all caelum stuff ?
I tried some stuff without the CG shader Plugin from Ogre and with this setup caelum is working without shaders.
Don't wonder about the prog. language ... it's Lua. We wrote a Middleware called Lugre for Ogre and we integrated Caelum, Cadunetree, Pagedgeometry, Texture-Atlas, 2D Sprite and Guisystem and lots of other bindings.
Here is our caelum binding: http://zwischenwelt.org/trac/lugre/brow ... elum_L.cpp
We have also a Sample showing Caelum + Cadunetree in action: http://zwischenwelt.org/trac/lugre/brow ... nk/example
I solved the problem with the STARFIELD. You wrote in file ImageStarfield.h "ImageStarfield.jpg" and not "Starfield.jpg". But you only have "Starfield.jpg" in your ressources.
And now another question. I call Shutdown but nothing happends. Is shutdown currently working and does it clean all caelum stuff ?
I tried some stuff without the CG shader Plugin from Ogre and with this setup caelum is working without shaders.
Code: Select all
gCaelumSystem = CreateCaelumCaelumSystem(
CAELUM_COMPONENT_SUN +
CAELUM_COMPONENT_SKY_DOME +
CAELUM_COMPONENT_IMAGE_STARFIELD +
CAELUM_COMPONENT_PRECIPITATION +
0
)
Here is our caelum binding: http://zwischenwelt.org/trac/lugre/brow ... elum_L.cpp
We have also a Sample showing Caelum + Cadunetree in action: http://zwischenwelt.org/trac/lugre/brow ... nk/example
- xadhoom
- Minaton
- Posts: 973
- Joined: Fri Dec 28, 2007 4:35 pm
- Location: Germany
- x 1
Everything works fine on the first run, but after destroying and recreating CaelumSystem I get this exception.cdleonard wrote:No; I don't think that was ever tested. Perhaps it leaks a material somehow? CaelumLab should have checkboxes to create/destroy individual components .
No, we currently use caelum lights without shadows and I´m afraid there is no propercdleonard wrote:BTW; did you manage to eventually get nullsquared's shadows to work with Caelum's lights?
solution to that problem. Its not only about the directional lights which would
need an orthogrphic projection in the shadowmap to make the light really far away,
its mainly the problem of aliasing artifacts if the light is at a significant
distance. Because Null did not succeed with implementing Lispsm camera setup
which may lower this artifacts( http://www.ogre3d.org/phpBB2/viewtopic. ... &start=200 )
this is a serious problem with outdoor scenes.
I really look forward to this:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=41801
This approach could make acceptable outdoor shadows possible. But I´m not sure if this will get into Shoggoth...
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Right, I apologise for making the example of VSM so ... limited. The ideal-case use would be to use VSM with unclamped depths (no divide by far distance) in a spot-light based in-door environment.
However, VSM can indeed be used for outdoor areas. For directional lights, you'd want to store viewSpacePosition.z as the depth, not the length. You'll want to make sure that Ogre places the directional light a good distance from the scene (there was a method for this in SceneManager), not too far, but not too close.
However, VSM can indeed be used for outdoor areas. For directional lights, you'd want to store viewSpacePosition.z as the depth, not the length. You'll want to make sure that Ogre places the directional light a good distance from the scene (there was a method for this in SceneManager), not too far, but not too close.
- cdleonard
- Goblin
- Posts: 266
- Joined: Thu May 31, 2007 9:45 am
xadhoom: I managed to reproduce and fix the reload bug in trunk. It's quite likely that Caelum will still leak some stuff on reload, but (hopefully) nothing large. Writing leak-free code with Ogre is not very easy; you still have to destroy a lot of stuff by hand.
liljohan: This could be what broke stuff for you as well. Can you please retry latest trunk?
SiENcE: Fixed in trunk. Thanks for pointing this out.
liljohan: This could be what broke stuff for you as well. Can you please retry latest trunk?
SiENcE: Fixed in trunk. Thanks for pointing this out.
-
- Gnoblar
- Posts: 10
- Joined: Fri Feb 29, 2008 4:41 am
I've tried the proposed workarounds for this problem but nothing seems to fix. I've downloaded v0.3 and it's easy to duplicate using the CaelumLab demo. Simply set the camera position and orientation:corywinter wrote:I also have this problem.sjcomp wrote:Hello,
When my camera looks straight along z axis towards -z, the clouds disappear. If I rotate camera to the side clouds appear, but I can rotate camera back and they disappear. I do not think I noticed this behavior before updating to the newest code today.
Thanks.
Code: Select all
mCamera->setPosition (Vector3 (0, 0, 0));
mCamera->lookAt (Vector3 (0, 0, -1));
-
- Kobold
- Posts: 27
- Joined: Wed Aug 01, 2007 3:29 pm
- Location: Italy
My compliments and a suggestion (I hope)
I just want to make all my compliments to cdleonard for the great work that he have done. Last year I critizied the approach of the project and, after a while, I had to freeze my effort with Ogre (I had no time to spend on it). It was really a surprise for me to see the big steps that were done: new elements such as the moon, rain, clouds and (this was the "big point" for me) a very clean structure and more formal approach. Again, all my compliments.
@liljohan: I don't know if this it the correct thread, but I see that you got into trouble with your Nature Demo. I had some problems too, but I finally got it work. I'm going to write a more complete post about this in your Nature Demo thread, but I simply added:
to your main.cpp code (line 40)
And the demo worked. I Hope this will help you.
Roberto
@liljohan: I don't know if this it the correct thread, but I see that you got into trouble with your Nature Demo. I had some problems too, but I finally got it work. I'm going to write a more complete post about this in your Nature Demo thread, but I simply added:
Code: Select all
ResourceGroupManager::getSingleton().addResourceLocation("Assets", "FileSystem", "Caelum");
And the demo worked. I Hope this will help you.
Roberto
-
- Halfling
- Posts: 82
- Joined: Tue Jan 03, 2006 4:05 pm
- Location: Växjö, Sweden
- Contact:
- ahmedismaiel
- OGRE Contributor
- Posts: 217
- Joined: Wed Jan 25, 2006 11:16 pm
- Location: Redmond,WA
- ahmedismaiel
- OGRE Contributor
- Posts: 217
- Joined: Wed Jan 25, 2006 11:16 pm
- Location: Redmond,WA
have any one got Caelum working with shadows ?
can you point me to what is required?
i have PSSM with a directional light ,when i set the value my self the shadow works correctly ,but when using caelum it doesn't ,does the sky dome get rendered as par of the shadowing ,doesn't play with the depth buffers?
can you point me to what is required?
i have PSSM with a directional light ,when i set the value my self the shadow works correctly ,but when using caelum it doesn't ,does the sky dome get rendered as par of the shadowing ,doesn't play with the depth buffers?
-
- Halfling
- Posts: 82
- Joined: Tue Jan 03, 2006 4:05 pm
- Location: Växjö, Sweden
- Contact:
Just got my new drivers - no change =/
Adding the same resource location to two different resource groups? That will result in collisions, when Ogre tries to load the same resource twice.ahmedismaiel wrote:it seems that you need to have the resource folder both in the general group and a new Caelum group as well ,some of the queries doesn't check the Cealum resource group
i tried it and it seems to have worked
- ahmedismaiel
- OGRE Contributor
- Posts: 217
- Joined: Wed Jan 25, 2006 11:16 pm
- Location: Redmond,WA
Not on the latest svnlilljohan wrote:Just got my new drivers - no change =/
Adding the same resource location to two different resource groups? That will result in collisions, when Ogre tries to load the same resource twice.ahmedismaiel wrote:it seems that you need to have the resource folder both in the general group and a new Caelum group as well ,some of the queries doesn't check the Cealum resource group
i tried it and it seems to have worked
-
- Kobold
- Posts: 27
- Joined: Thu Oct 11, 2007 12:43 am
- Location: Aachen, Germany
I have. I use SHADOWTYPE_TEXTURE_MODULATIVE and LiSPSMShadowCameraSetup. If found out that it's important to disable shadowing of the moon, otherwise I don't see shadows of the sun, and the moon casts shadows even on the brightest day and when beneath the horizon:ahmedismaiel wrote:have any one got Caelum working with shadows ?
can you point me to what is required?
Code: Select all
caelumSystem->getMoon()->getMainLight()->setCastShadows(false);