Page 41 of 45

Posted: Sat Aug 09, 2008 4:42 pm
by SiENcE
@ahmedismaiel: Iris2 is also using Caelum with "texture_additive" shadows.

i created a screenshot for you:
Image

The shadow moves dynamically with the sun position. The odd thing is, that i can't setup depth- or vsm-shadowmapping with shader :-(.

Posted: Sat Aug 16, 2008 12:42 am
by cdleonard
@Commander: You can also call CaelumSystem::setEnsureSingleShadowSource. Hopefully it actually does what it claims.

@lilljohan: I took another look at your log and it seems you load the Cg plugin AFTER parsing resource scripts. I guess that means cg programs declared in scripts won't work (all of them). Somehow I expected ogre to complain loudly about something like that. Can you please try loading all plugins at the start?

@ahmedismaiel: There were some issues with a missing "Caelum" resource group. Hopefully those should be all fixed now.

@JeDi: There were some issues with the far clip distance. I hope I fixed them; can you please retry the latest version? Sorry for the (very) late response.

@corywinter: I looked at the "clouds disappearing when looking on -z" bug. It only happens in 0.3; trunk is not affected. As far as I can tell it's a bug in Ogre::MeshManager::createCurvedPlane which doesn't set the bounding box correctly. When looking on just the right direction the clouds fail camera clipping and are no longer drawn. A fix is available in branches/Caelum-0.3; it forces a larger bounding box.

Posted: Sat Aug 16, 2008 12:52 pm
by lilljohan
cdleonard wrote: @lilljohan: I took another look at your log and it seems you load the Cg plugin AFTER parsing resource scripts. I guess that means cg programs declared in scripts won't work (all of them). Somehow I expected ogre to complain loudly about something like that. Can you please try loading all plugins at the start?
Haha that was stupid :oops: Gonna try it out later, will need to get all the addons first, they got deleted during my cleanup. But somehow i got the feeling that this is my problem =)

Posted: Sat Aug 16, 2008 7:04 pm
by KungFooMasta
SiENcE, nice screenshot! I like how the horse is not shadowed, it emphasizes who the player is. 8)

Posted: Sat Aug 16, 2008 10:50 pm
by SiENcE
Thx.
It's only tivial Ogre shadowing. No depth-Shadowmapping :-/. I tryed it, but sadly it is hard to setup and not partically in this environment.

Posted: Wed Aug 20, 2008 4:34 pm
by Caphalor
Hi, I use Ogre 1.6 RC1 and the latest Caelum from SVN. The Caelum Demo works fine, but I don't manage do integrate Caelum in my game properly. :(
I don't see a starfield or a moon, all in all in the night the Skydome ist just black (maybe an ambient light problem?). If I use the HDR compositor from the Ogre samples (which works fine with a static skybox), I get another error, but ironically I can "see" stars and moon here:
Image
I use the same code to init Caelum like the demo, with infinite FarClipDistance and AmbientLight(1,1,1), I also tried without Ambient light....

EDIT: Ok I see stars now using Caelum's Ambient light system, but there's still the problem with HDR.

Posted: Thu Aug 21, 2008 6:29 am
by cdleonard
Caphalor wrote:Hi, I use Ogre 1.6 RC1 and the latest Caelum from SVN. The Caelum Demo works fine, but I don't manage do integrate Caelum in my game properly. :(
I don't see a starfield or a moon, all in all in the night the Skydome ist just black (maybe an ambient light problem?). If I use the HDR compositor from the Ogre samples (which works fine with a static skybox), I get another error, but ironically I can "see" stars and moon here:
I use the same code to init Caelum like the demo, with infinite FarClipDistance and AmbientLight(1,1,1), I also tried without Ambient light....

EDIT: Ok I see stars now using Caelum's Ambient light system, but there's still the problem with HDR.
What do you mean by "Caelum's ambient light system"? You mean CaelumSystem::setManageAmbientLight? That's generally a good idea; ambient(1, 1, 1) at all times will probably look bad. Also; stars should not be affected by lighting in any way.

You're probably not updating CaelumSystem correctly; that is currently sort of messy. I'll try to document this properly.

Try to review CaelumDemo carefully (it's short) and make sure you do everything that demo does. You should also try to disable all your compositors because they don't mix well with RenderTargetListener.

Posted: Sat Aug 23, 2008 9:07 am
by Illidanz
-EDIT- Actually it seems that with the latest SVN checkout I have some problems.
The demo works fine, but when I try to start my application it gives me this two erros:

Code: Select all

10:23:28: OGRE EXCEPTION(-1:UnsupportedException): Can't load point starfield material: Pass 0: Vertex program Caelum/StarPointVP cannot be used - not supported.
 in PointStarfield at .\src\PointStarfield.cpp (line 53)
10:23:28: Caelum: Failed to initialize starfield: OGRE EXCEPTION(-1:UnsupportedException): Can't load point starfield material: Pass 0: Vertex program Caelum/StarPointVP cannot be used - not supported.
 in PointStarfield at .\src\PointStarfield.cpp (line 53)
10:23:28: WARNING: material Caelum/FlatCloudLayer/Material/149521984 has no supportable Techniques and will be blank. Explanation: 
Pass 0: Vertex program CaelumLayeredCloudsVP cannot be used - not supported.

10:23:28: OGRE EXCEPTION(-1:UnsupportedException): Can't load flat cloud layer material: Pass 0: Vertex program CaelumLayeredCloudsVP cannot be used - not supported.
 in FlatCloudLayer at .\src\FlatCloudLayer.cpp (line 44)
10:23:28: Caelum: Failed to initialize clouds: OGRE EXCEPTION(-1:UnsupportedException): Can't load flat cloud layer material: Pass 0: Vertex program CaelumLayeredCloudsVP cannot be used - not supported.
 in FlatCloudLayer at .\src\FlatCloudLayer.cpp (line 44)
Other elements works fine and I just copied the resources folder into my project

Does anyone know why it says that it is unsupported but in the demo it's working?

Posted: Mon Aug 25, 2008 4:13 pm
by cdleonard
@Illidanz: I'm not sure why some components work but others don't. Maybe you could post the full log somewhere?

Maybe you have some stale resources somewhere? Resources get renamed sometimes; having stale resources in your paths can cause interesting things to happen.

Do both CaelumLab and CaelumDemo work without errors? CaelumDemo will automatically disable unsupported components and carry on; CaelumLab will complain.

@Caphalor: Did you make any progress? There are some nasty issues using Caelum with compositors and I should explain them. The problem is that both CaelumSystem and compositors registers as RenderTargetListeners.

When you attach a compositor to a viewport a render texture is created and updated before the main viewport is updated. Caelum also wants to do some things before every viewport update (it moves domes with the camera). Caelum's update will generally get called AFTER the compositor has updated the scene render-to-texture target but before the actual screen viewport is updated. This is too late to move the domes and dumb things happen (usually while moving the camera).

In trunk CaelumSystem::notifyCameraChanged is public. You can skip the whole RenderTargetListener mess and just call this function directly after you move your camera. CaelumLab does just that. This is similar to how CaelumSystem::updateSubcomponents is public and also works without frame listeners. This way you get full control and avoid listener chaos.

There are also other possible solutions. You could probably attach CaelumSystem to the compositor's inner rtt somehow; but that means walking the compositor chain somehow. SceneManager::Listener from 1.6 could be more useful here. Also; Caelum's domes could derive from Ogre::Renderable and avoid the need for explicit viewport/camera notifications.

Posted: Mon Aug 25, 2008 5:26 pm
by Caphalor
Thank you for the detailed response!
What exactly is the right time to call notifyCameraChanged and updateSubcomponents? At the moment, I call it before RenderOneFrame, but it still doesn't work (same error). :/
If possible, I would like to avoid attaching Caelum to the compositor's rendertarget because it seems to be complicated. :P

Posted: Tue Aug 26, 2008 9:01 am
by Penut
I am using Ogre with QT and here are the errors I am getting

Code: Select all

Error	8	fatal error LNK1169: one or more multiply defined symbols found	d:\My Documents\Projects\Ogre3D\WorldEditor\WorldEditor\Bin\Debug\WorldEditor.exe	1

Error	5	error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z) already defined in msvcprtd.lib(MSVCP80D.dll)	qtmaind.lib

Error	7	error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z) already defined in msvcprtd.lib(MSVCP80D.dll)	qtmaind.lib

Error	6	error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z) already defined in msvcprtd.lib(MSVCP80D.dll)	qtmaind.lib
anybody has any idea why they are occuring? The problem can't be just qtmaind.lib...I've been able to run the program up until I tried adding Caelum to it

Posted: Tue Aug 26, 2008 9:33 am
by xadhoom
Penut wrote:anybody has any idea why they are occuring? The problem can't be just qtmaind.lib...I've been able to run the program up until I tried adding Caelum to it
The compiler says that there are two locations where std::string is defined. "... already defined in msvcprtd.lib(MSVCP80D.dll)". This problem shouldn´t be Caelum related.
It means that the compiler does not know which of the both string implementation should be used. Maybe he complains because Ogre includes strings, too.
Normally this is solved with "#ifdefs" in the header files and right ordered "#include"´s in your project.

Posted: Tue Aug 26, 2008 10:02 am
by Penut
xadhoom wrote:
Penut wrote:anybody has any idea why they are occuring? The problem can't be just qtmaind.lib...I've been able to run the program up until I tried adding Caelum to it
The compiler says that there are two locations where std::string is defined. "... already defined in msvcprtd.lib(MSVCP80D.dll)". This problem shouldn´t be Caelum related.
It means that the compiler does not know which of the both string implementation should be used. Maybe he complains because Ogre includes strings, too.
Normally this is solved with "#ifdefs" in the header files and right ordered "#include"´s in your project.
Well all the files that I am using have #ifdefs check and I have tried including Ogre, QT and Caelum in all the possible orders and the error is still there. Any suggestions as to in what order I should include them?

I did not get this error before when I had just Qt and Ogre. So any idea why this error pops in all of a sudden without mentioning anything caelum related in the error code?

Thanks for your reply ;)

Posted: Tue Aug 26, 2008 10:08 am
by xadhoom
I´m not sure about that but if it only occurs with caelum inlcude additionally it seems to be your caelum libs. Where did you get you caelum version from? Sourceforge? SVN? Static/Dynamic linking? Is the error the same in debug and release?

Posted: Sat Aug 30, 2008 12:30 am
by nath31337
this might sound a little noob but to get caelum in my projet i build the caelum and took caelum.dll and caelum.lib in my projet release folder, and added plugin=caelum to plugin.cfg added the include caelum.h to my class

what else do i do or what wrong have i done to get

Cannot open include file: 'Caelum.h': No such file or directory

Posted: Sat Aug 30, 2008 2:34 pm
by Nodrev
Hum, caelum do not use Ogre's plugin system.
check the wiki to integrate this lib in your project

Posted: Sat Aug 30, 2008 3:36 pm
by nath31337
oh well ive checked the wiki already and it said that it was a plugin/library for ogre so i though that i needed to do that, but what files do i need to copy to my project. The dll only or all the files like the demo use?

Posted: Sat Aug 30, 2008 5:48 pm
by Nodrev
Cannot open include file: 'Caelum.h': No such file or directory
Just add caelum's include directory to your include path. I assume you are using msvs, so tools/options/Project and solution/vc++ directories and add the path there.

Posted: Sat Aug 30, 2008 7:42 pm
by cdleonard
nath31337: Caelum is not a plugin in the same way as rendersystem_direct3d9. It does not use the ogre plugin mechanism in any way. Instead it's "just a C++ library" like OIS or CEGUI etc. If you want to use it you have to do all the standard magic required to link to a C++ dll; look at the msvc settings for CaelumDemo.

Somebody should write a good tutorial for compiling and linking C++ dlls. It is not really trivial and newbies frequently get stuck on this.

Posted: Sun Aug 31, 2008 4:34 pm
by nath31337
Nodrev wrote: Just add caelum's include directory to your include path. I assume you are using msvs, so tools/options/Project and solution/vc++ directories and add the path there.
yes thanks i did that and i no longer get the error but i get one saying
Could not load dynamic library .\Plugin_PCZSceneManager.dll. In DynLib::load at ..\src\OgreDynLib.cpp



cdleonard wrote:Somebody should write a good tutorial for compiling and linking C++ dlls.
well go ahead and make it :D im sure you can do it!

Posted: Sun Aug 31, 2008 5:28 pm
by nath31337
oops nvm i think it has something to do with me installing the 1.6

Posted: Thu Sep 04, 2008 11:46 am
by Rusty6800
Bit of a problem, dunno if this has already been posted.

Trying to set up shadows. But, caelum's sky seems to be casting a shadow over everything. Regardless if it's Texture (cast from backfaces OFF) or Stencil shadow, it still produces the same affect; the entire map is cast in a shadow.

I quickly read through earlier in this thread about some shadow problems but nothing i tryed worked. Using latest caeulm and ogre 1.6

Thanks in advance.

Posted: Thu Sep 04, 2008 12:05 pm
by Caphalor
The new PSSM camera setup supported by Ogre 1.6 works fine with Caelum (which uses a directional light). Have a look at PlayPen, it's implemented there.

Posted: Thu Sep 04, 2008 12:51 pm
by Rusty6800
Caphalor wrote:The new PSSM camera setup supported by Ogre 1.6 works fine with Caelum (which uses a directional light). Have a look at PlayPen, it's implemented there.
Any way of doing this without PSSM? (i have my reasons..)

Posted: Thu Sep 04, 2008 1:46 pm
by cdleonard
Caelum uses directional lights and those are tough for texture-based shadows. PSSM is claimed to work well; but other techniques should also work.

Caelum's components should not cast shadows. Try cutting out components one by one; maybe you can then isolate the problem?

I've been meaning to add shadows to Caelum's demos for a long time but never got around to doing it.