Caelum - [WARNING: Screenshot intensive]

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
danharibo
Minaton
Posts: 997
Joined: Sat Feb 25, 2006 8:14 pm
Location: Wales, United Kingdom
Contact:

Post by danharibo »

I'm getting a wierd error trying to compile this

Code: Select all

	//Caleum
	mSky = new Caelum::CaelumSystem(mRoot, mSceneMgr, Caelum::CaelumSystem::CAELUM_COMPONENTS_ALL);

		mSky->setManageSceneFog(true);
		mSky->setSceneFogDensityMultiplier(0.0015);
		mSky->getSun()->setAmbientMultiplier(Ogre::ColourValue(0.6, 0.6, 0.6));
		mSky->getSun()->setDiffuseMultiplier(Ogre::ColourValue(3, 3, 2.7));
		mSky->getSun()->setSpecularMultiplier(Ogre::ColourValue(2,2, 2));
		mSky->getSun()->setManageAmbientLight(true);
		mSky->getStarfield()->setInclination(Degree(13));

		mSky->getClouds()->setCloudCover(0.1);
		mSky->getClouds()->setAnimating(true);
		mSky->getClouds()->setCloudSpeed(Ogre::Vector2(0.001,0));

		mSky->getUniversalClock()->setGregorianDateTime(2008,6,6,13,00,0);
1>.\src\Game.cpp(688) : error C2039: 'getStarfield' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(688) : error C2227: left of '->setInclination' must point to class/struct/union/generic type
1>.\src\Game.cpp(690) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(690) : error C2227: left of '->setCloudCover' must point to class/struct/union/generic type
1>.\src\Game.cpp(691) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(691) : error C2227: left of '->setAnimating' must point to class/struct/union/generic type
1>.\src\Game.cpp(692) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(692) : error C2227: left of '->setCloudSpeed' must point to class/struct/union/generic type
1>.\src\Game.cpp(726) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(726) : error C2227: left of '->getCloudCover' must point to class/struct/union/generic type
1>.\src\Game.cpp(735) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(735) : error C2227: left of '->setCloudCover' must point to class/struct/union/generic type
1>.\src\Game.cpp(745) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(745) : error C2227: left of '->setCloudCover' must point to class/struct/union/generic type
1>.\src\Game.cpp(760) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(760) : error C2227: left of '->setCloudCover' must point to class/struct/union/generic type
1>.\src\Game.cpp(774) : error C2039: 'getClouds' : is not a member of 'Caelum::CaelumSystem'
1> c:\users\dan\programming\libs\caelum\main\include\CaelumSystem.h(55) : see declaration of 'Caelum::CaelumSystem'
1>.\src\Game.cpp(774) : error C2227: left of '->setCloudCover' must point to class/struct/union/generic type
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

danharibo wrote:I'm getting a wierd error trying to compile this
I guess your code is somewhat out of date; sorry about that. getStarfield was removed quite some time ago in favor of getImageStarfield and getPointStarfield; and so on. Look at how the demos initialize; those will work :). Or look at 0.3 for a stable version; trunk is rather unstable right now. I'll try to mark a 0.4 version once trunk stabilizes again.
Commander
Kobold
Posts: 27
Joined: Thu Oct 11, 2007 12:43 am
Location: Aachen, Germany

Post by Commander »

Hi!

I would like to replace my ugly SkyBox with Caelum, so I first tried out the demo. Compiling on Linux (Debian Lenny) with scons worked fine. Unfortunately, it crashes on me with "OgreTextureUnitState.cpp:1110: void Ogre::TextureUnitState::createAnimController(): Assertion `mAnimController == 0' failed."

Here is the Ogre.log: http://pastebin.ca/1079471
And here a backtrace with gdb:

Code: Select all

#0  0xb7883d96 in raise () from /lib/libc.so.6
#1  0xb7885541 in abort () from /lib/libc.so.6
#2  0xb787d230 in __assert_fail () from /lib/libc.so.6
#3  0xb7e1974c in Ogre::TextureUnitState::createAnimController (this=0x9680ac0) at OgreTextureUnitState.cpp:1110
#4  0xb7e1a268 in Ogre::TextureUnitState::_load (this=0x9680ac0) at OgreTextureUnitState.cpp:992
#5  0xb7e1d920 in Ogre::TextureUnitState::setAnimatedTextureName (this=0x9680ac0, names=0x80a1b68, numFrames=0, duration=345600)
    at OgreTextureUnitState.cpp:441
#6  0x0806a3ce in Caelum::FlatCloudLayer::setCloudBlendTime ()
#7  0x0806b21a in Caelum::FlatCloudLayer::FlatCloudLayer ()
#8  0x080630fd in Caelum::CloudSystem::createLayerAtHeight ()
#9  0x0805c434 in Caelum::CaelumSystem::CaelumSystem ()
#10 0x08053eda in CaelumSampleFrameListener::CaelumSampleFrameListener ()
#11 0x080542e0 in CaelumSampleApplication::createFrameListener ()
#12 0x08052a0e in ExampleApplication::setup ()
#13 0x0804f418 in main ()
This happens with Caelum 0.3 as well as with trunk. I use the latest SVN of Ogre.

Maybe you can have a look into my problem. Let me know if you need any more info, like a backtrace with debug symbols enabled.
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

Commander wrote:Hi!

I would like to replace my ugly SkyBox with Caelum, so I first tried out the demo. Compiling on Linux (Debian Lenny) with scons worked fine. Unfortunately, it crashes on me with "OgreTextureUnitState.cpp:1110: void Ogre::TextureUnitState::createAnimController(): Assertion `mAnimController == 0' failed."

...snip...

This happens with Caelum 0.3 as well as with trunk. I use the latest SVN of Ogre.

Maybe you can have a look into my problem. Let me know if you need any more info, like a backtrace with debug symbols enabled.
I was able to reproduce and fix the bug with Ogre 1.6. I believe the fix will work for the ogre trunk as well. The fix is in Caelum's trunk.

It seems like Ogre 1.6 no longer allows setAnimTextureName for loaded materials; I had to unload/load the material. This looks like an ogre bug to me; but the workaround is easy.
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

Hi,

Because I had some artifacts with my Caelum version (black quads rendered sporadically), I tried updating today. Could it be that the trunk is in an unusable state? When starting Caelum, I get the following exception:

Code: Select all

OGRE EXCEPTION(2:InvalidParametersException): Parameter called layerHeight does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\src\OgreGpuProgram.cpp (line 883)
I don't know a lot about shaders and such, so I don't know how to fix this. Should I just use some branch of the repository in stead? Or can I fix the black quads myself? My guess it has to do something with the clipping planes?

Greetz,
JeDi
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

JeDi wrote:Hi,

Because I had some artifacts with my Caelum version (black quads rendered sporadically), I tried updating today. Could it be that the trunk is in an unusable state? When starting Caelum, I get the following exception:

Code: Select all

OGRE EXCEPTION(2:InvalidParametersException): Parameter called layerHeight does not exist.  in GpuProgramParameters::_findNamedConstantDefinition at ..\src\OgreGpuProgram.cpp (line 883)
I don't know a lot about shaders and such, so I don't know how to fix this. Should I just use some branch of the repository in stead? Or can I fix the black quads myself? My guess it has to do something with the clipping planes?

Greetz,
JeDi
That should not be a fatal error; if it fails for you it probably fails because of something else. If you don't like trunk there's a Caelum-0.3 branch.

Can you give more details about those black quads? Maybe a screenshot?
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Post by Wolfmanfx »

Same problem here change the paran layerheight to param layerheight float 0 and then i get aother error with the new memory system.
Iam using the Ogre from the svn from 20.07.08.
Commander
Kobold
Posts: 27
Joined: Thu Oct 11, 2007 12:43 am
Location: Aachen, Germany

Post by Commander »

cdleonard wrote: I was able to reproduce and fix the bug with Ogre 1.6. I believe the fix will work for the ogre trunk as well. The fix is in Caelum's trunk.

It seems like Ogre 1.6 no longer allows setAnimTextureName for loaded materials; I had to unload/load the material. This looks like an ogre bug to me; but the workaround is easy.
Thanks a lot! It works for me now. I use Caelum revision 254 and Ogre 7773.
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Post by dudeabot »

hello,

i got strange issues when i tried to integrate my app with Caelum, my night looks like this:

Image

i already checked eveything from project settings to ogre logs, and i dont see anything different from what is in the trunk, and the trunk demo works for me.

another smaller issue, is that with pagedGeometry, when using updateSpeedFactor > 1 the trees swing more fast (wind)

[edit]

nevermind, looks like i didnt double checked everything really =x

i didnt solve the updateSpeedFactor yet though
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

Trunk currently contains:
- Clouds are no longer relative to the camera; but to a "ground node" which you control.
- Multiple cloud layers at different heights.
- Some improvement to cloud shading
- Various refactorings (like namespace Caelum with a capital C). Those break your build :).
- Work-In-Progress compositor-based precipitation.

I guess I should post changes here more often.

@dudeabot: So your sky is completely white; but only at night? Caelum's skydome is transparent at night (to show the stars); maybe your framebuffer is cleared to white somehow? I don't really know how to help you.
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

Wolfmanfx wrote:Same problem here change the paran layerheight to param layerheight float 0 and then i get aother error with the new memory system.
Iam using the Ogre from the svn from 20.07.08.
I changed the layerClouds.material file, which contains the error, but I still get the same exception. If I catch the exception, Ogre (v1.4.6 with threading enabled) Ogre crashes the first time it tries to render, in D3D9RenderSystem::bindGpuProgram where the function receives a NULL-pointer as GpuProgram parameter.

I will use the 1.3 branch for now, and I'll see if the "black quad" problem is gone. Otherwise I'll post a screenshot.

Thanks!
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Post by dudeabot »

cdleonard wrote:Trunk currently contains:
- Clouds are no longer relative to the camera; but to a "ground node" which you control.
- Multiple cloud layers at different heights.
- Some improvement to cloud shading
- Various refactorings (like namespace Caelum with a capital C). Those break your build :).
- Work-In-Progress compositor-based precipitation.

I guess I should post changes here more often.

@dudeabot: So your sky is completely white; but only at night? Caelum's skydome is transparent at night (to show the stars); maybe your framebuffer is cleared to white somehow? I don't really know how to help you.
i figured out what was the problem

my dotScene file was with these settings for the enviroment

Code: Select all

 <environment>
        <colourAmbient r="1" g="1" b="1" a="1" />
        <colourBackground r="0.9" g="0.9" b="0.9" a="1" />
    </environment>
i guess it was the viewportcolor that was getting overwritten
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

Here is a screenshot of the bug I mentioned:
Image

Note that this is rotation-dependent. If I move the camera, the bug stays but it starts to flicker with the slightest camera rotation.
I set my camera near clipping plane to 0.2. The rest is default.


Another question: In the demo, when controlling the time scale factor, you set the same value on Ogre::ControllerManager. Is that necessary? Because I guess this has influence on other things in Ogre as well, which could cause problems (I can imagine applications where the sky "time" can go faster than other time-related things)

Edit: The problem is gone when I keep the clipping planes at their default value, but we really need the near clipping plane to be closer to the camera. Why is this an issue? There is no z-buffering used for the sky, right?
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Post by Wolfmanfx »

@cdleonard
I know the drunk is unstable but

param_named_auto time time in Precipitation.material does a compile error the keyword time is not found. I also looked in the ogre source and does not found this keyword.

LayerdClouds.material

//compile_arguments -posinv <-- this gives me an error

texture_unit Cloud1
{
//anim_texture noise1.dds noise2.dds noise3.dds noise4.dds 600
texture noise2.dds
}

and as jedi said anim_texture throws an memory error

So i am using the upcoming 1.8 version from svn with CG 2.0 so i think the anim_texture problem is ogre error
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Post by dudeabot »

JeDi wrote:Here is a screenshot of the bug I mentioned:
Image

Note that this is rotation-dependent. If I move the camera, the bug stays but it starts to flicker with the slightest camera rotation.
I set my camera near clipping plane to 0.2. The rest is default.


Another question: In the demo, when controlling the time scale factor, you set the same value on Ogre::ControllerManager. Is that necessary? Because I guess this has influence on other things in Ogre as well, which could cause problems (I can imagine applications where the sky "time" can go faster than other time-related things)

Edit: The problem is gone when I keep the clipping planes at their default value, but we really need the near clipping plane to be closer to the camera. Why is this an issue? There is no z-buffering used for the sky, right?
have you tried FarClipDistance(0) ?
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

@JeDi: The domes should be automagically resized based on the camera's far clip distance (and it should also work for 0). You can also manually resize the domes if you need to; but I don't know why you would need that.

The clouds use anim_texture and I think this makes the controller manager thing sort of mandatory. I just realized that; and it's bad. Anim_texture nonsense should really be removed.

@dudeabot: I guess Caelum should also change the background color; thanks for pointing this out.
Wolfmanfx wrote: @cdleonard
I know the drunk is unstable but
Are you drunk? It helps to be sober before posting :).

When ogre (1.4 at least) finds a missing parameter while parsing a script it throws an exception but catches it. It is not fatal; just sloppy. When you try to set a missing parameter from code it throws an exception unless explicitly told to ignoreMissingParameters (Caelum does that). Missing parameters should not cause any errors.
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Post by Wolfmanfx »

i am not drunk just tired :)

I dont use Caelum i just wanted to prepare my media so i added the Caelum resources. So the make the program crash this error is not at the Caelum level at all it is at the script parsing level. Maybe its a pasring bug? So maybe someone could test it to confirm its bug.

So i am the only one who use Ogre from the svn trunk?
khawkins
Gnoblar
Posts: 6
Joined: Sun May 11, 2008 9:02 pm

Post by khawkins »

Wolfmanfx wrote: So i am the only one who use Ogre from the svn trunk?
I would love to get some of the latest improvements in the trunk, but I can't have a version that isn't considered fully functional, even if it's a "work in progress". That's actually a peeve of mine with a lot of open source projects, though.

I tried to grab the trunk a few weeks ago, but I saw too many errors with things like shaders. Whether it will still run or not, errors like that are too sloppy for me to try to use.
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

Some news:
- anim_texture is gone
- Merged all the SkyColourModel and SolarSystemModel classes into CaelumSystem; as I mentioned some time ago.
- Caelum will now set the viewport background to black by default; hopefully avoiding white skies in the future.

@Wolfmanfx: Ogre 1.4 will parse anything and swallow all errors. I consider that a good thing. But you can just remove the precipitation resources if they fail for you.

@khawkins: When it breaks; you get to keep both pieces. And play with them!
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Post by xadhoom »

Wow, thanks for your work!

I´m going to checkout the SVN soon. Do you plan another "stable" release?
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post by cdleonard »

xadhoom wrote:Wow, thanks for your work!

I´m going to checkout the SVN soon. Do you plan another "stable" release?
Yes; there will be other stable releases; hopefully fairly soon. I'd appreciate if some of the issue reports came with patches :).
lilljohan
Halfling
Posts: 82
Joined: Tue Jan 03, 2006 4:05 pm
Location: Växjö, Sweden
Contact:

Post by lilljohan »

Hi,

I'm in the process of upgrading to the latest caelum revision, the last one i used was a couple of weeks old. But i am having some problems with the shaders.

When i try to enable GroundFog i get this

Code: Select all

14:08:59: WARNING: material CaelumGroundFogDome127252424 has no supportable Techniques and will be blank. Explanation: 
Pass 0: Vertex program CaelumGroundFogDomeVP cannot be used - not supported.

14:08:59: OGRE EXCEPTION(0:UnsupportedException): GroundFog dome material not supported. in GroundFog
Theese materials did not work before either, and i did not really care. But now i get the same error message when i try to use the clouds. But then it's LayeredCloudsVP of course.

I've got a 8800gts 320mb, the driver is about thre months old and i tried the latest cg.dll from nVidia.

// Johan
epha
Halfling
Posts: 51
Joined: Tue Dec 11, 2007 11:34 pm

caelum for mac?

Post by epha »

hi,

Is anyone using Caelum on a mac ? I tried to build it using scons - but that didn't really work; then I created an Xcode dynamic library project and linked to the Ogre framework, and it built succesfully ! The product is libCaelum.dylib . I can't seem to use it though, and I'm really not sure if I know what I'm doing.
There is almost no information on Caelum for mac. Can someone tell me if it's possible ?( Although I am really inexperienced I would be happy to help port Caelum to mac if I can.) or can someone maybe suggest an alternative.
thanks

epha
Sheen
Halfling
Posts: 58
Joined: Mon May 26, 2008 9:32 pm
Location: St. Petersburg, Russia
x 1

Post by Sheen »

Hello,

I have some little problems using caelum. Sun rises at the west and sets at the east, can I rotate whole caelum's sky on 180 degrees?
And second strange thing is that sun rises at about 2 AM and sets at about 8 PM. Maybe I set wrong coordinates?
mCaelumSystem->setObserverLongitude (
Ogre::Degree(30 + 15.0 / 60 + 41.57 / 3600));
mCaelumSystem->setObserverLatitude (
Ogre::Degree(59 + 48.0 / 60 + 5.39 / 3600));
This means N59 48 5.39 and E30 15 41.57, doesn't it?

Can someone help me solve these problems?

thanks
nath31337
Kobold
Posts: 25
Joined: Sun Jul 27, 2008 2:42 am
Location: Canada

Post by nath31337 »

hey all, i downloaded today a new version of caelum but when i run the demo it throws an exception

Image
Post Reply