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
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Mon Oct 09, 2006 8:07 pm

Falagard wrote:Right, but you'll be passing parameters to the shaders correct? You'll always be able to interpolate any of the parameters between two different values between clear and overcast, or whatever sky types.
Touché! :P
I always forget about those shader features... I'm a complete noob with them :oops:
0 x
Image

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Mon Oct 09, 2006 8:17 pm

Also, I think billboard clouds are overkill for most games where the view is at the ground level, but I can see it necessary for flying games. Personally I would leave those features until later because there are fewer games that will use the feature.

I'd focus on cloud sky domes, and possibly a horizon ring for clouds as well. If you want more details about horizon rings do a search on the forums and you'll find my own post about them. They work very well for clouds.

The only issue with clouds where you use an image for the clouds (as opposed to using a pixel shader to generate them dynamically) is that you're going to want to modify the cloud colour based on time, and better yet, based on position in the sky. Since you already have a sky dome for the sky, you could have another sky dome for the clouds (or use the same one and do a second pass) and use the same sort of lookup texture technique to determine cloud colour based on position in the sky, and based on time. That would probably work very nicely! You'd bind two texture units, one for the cloud texture, and one for the cloud colour lookup, and blend them somehow to get the resulting colour and alphas that get rendered.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Mon Oct 09, 2006 8:29 pm

Falagard wrote:Also, I think billboard clouds are overkill for most games where the view is at the ground level, but I can see it necessary for flying games.
Well, what do you call clouds at the ground level? :)

That's right: fog. :wink:
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Mon Oct 09, 2006 8:42 pm

... right but what does that have to do with billboard clouds? Rolling fog effects are a completely different solution to billboard clouds. Or were you just kidding?

Ordinary fog is simple (using fixed function fog), but ya I'd love to see volumetric fog (nothing too complex - just simple vertex shader fog with a height) and rolling fog effects using billboards or particle systems. Even though rolling for (moving fog.. wisp of fog, etc.) would use billboards, billboard clouds are still very different implementation, assuming you go with something like the MS Flight Simulator clouds. That solution is closer to my GOOF trees than it is normal billboards.

Volumetric fog needs to be be built directly into a game's material system so that all shaders also apply fog, so although Caelum might be used to update the fog height, density, and colour settings, games will have to do extra work to support it properly.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Mon Oct 09, 2006 8:50 pm

I was kidding, but not much: billboards with a shader material is perfect for realistic fog, married to very simplistic billboard clouds (no pun intended) that would give the player a sense of real life fog.
The LOD should be limited - to avoid creating a cloud monster system like in MS Flight.
I agree that the scope is beyond a sky system, but maybe not?
Billboards with animated shader-generated textures with standard volumetric (OpenGL-like) fog is already in use in engines today.
Who knows what Caelum evolves to?
:)

<edit spelling/>
Last edited by jacmoe on Mon Oct 09, 2006 11:09 pm, edited 1 time in total.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
BRAINLESS
Goblin
Posts: 282
Joined: Tue Jan 04, 2005 6:56 pm
Location: The Netherlands

Post by BRAINLESS » Mon Oct 09, 2006 9:29 pm

I've just given this one a try, and the compile stage looked great. I'm gettting an error at runtime though:

Code: Select all

22:21:20: Creating resource group Caelum
22:21:20: Added resource location '../../media/plugins/Playground/caelum' of type 'FileSystem' to resource group 'Caelum'
22:21:20: Initialising resource group Caelum
22:21:20: Parsing scripts for resource group Caelum
22:21:20: Finished parsing scripts for resource group Caelum
22:21:20: Initialising Caelum system...
22:21:20: Generating sky dome material...
22:21:20: 	Material not found; creating...
22:21:20: 		Material [OK]
22:21:20: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 9
Function: CgProgram::loadFromSource
Description: Unable to compile Cg program SkyLightAbsorptionFP: CG ERROR : The compile returned an error.
(37) : error C3002: call to undefined function "pow"
49 lines, 1 errors.
As you can see I've initialised the resource group, it's attempting to compile the CG file and then fails. As I have no clue how CG works (I barely know what it is for :P) I have no clue how to fix this, other then just removing 90% of the file and hoping for a miracle. I don't expect that's going to work though :)

I also have a question about the resourcegroup you're using (Caelum, which is hardcoded as far as I can tell): why are you requiring a new resourcegroup called Caelum? I suppose some users would like to have only 1 resource group, which would make this annoying. It's alright with me, it's just something I found out when I first ran it :)

Other then that, great work, if it's really going to work like this (and seeing your sample it really looks that way) you're a genious :D
0 x
Proud member of the OpenFRAG Game Development community

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Mon Oct 09, 2006 11:02 pm

Thanks all :)

@falagard: I currently have some plans for the clouds :) I will first focus on the high layered clouds as mentioned above, as they're much more simple to simulate. The colour lookup image will be the same as the sky and the sun colour. Think I just need to pick a few colours: Sky scattering, sun colour, backlight... and all those are already in the lookup maps. As for the cloud generation, I've in mind a simple shader algorythm to generate the clouds in a small bitmap (covering the whole sky) and then giving it texture with some special maps :) About dynamic lighting, I also have some ideas.
Billboard clouds will come later :)

@BRAINLESS: I thought the pow operation was implemented in cg. Anyways, downloading the latest cg toolkit and replacing your current one should work, and else you can always remove the pow() call in the shader. All will happen is that the glow effect will be larger than expected :)
About the resource group, it was an early design decission. All that Caelum creates and manages, should be in Caelum :)

@jacmoe: Caelum in latin means "sky", so expect a lot of functionality for everything sky-related in my plans for Caelum ;)
0 x
Image

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Mon Oct 09, 2006 11:10 pm

Kencho wrote:@jacmoe: Caelum in latin means "sky
I should've guessed! Keep up the thunder, Kencho! :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1139
Joined: Tue Jul 06, 2004 5:57 am
x 15
Contact:

Post by spookyboo » Tue Oct 10, 2006 12:02 am

It would be nice if it became a complete sky AND wheather system. Imagine that I start Caelum and it not only gives me a day and night cycle, but also a season cycle with warm colours in the summer and bright, cold colours in the winter (its cold in my winter). Caelum would also automatically change the wheather pattern according to the season.

And I want a sun flare and a moon at night!
0 x

Bingo
Gremlin
Posts: 155
Joined: Sat Dec 10, 2005 5:30 pm

Post by Bingo » Tue Oct 10, 2006 12:38 am

spookyboo wrote: And I want a sun flare and a moon at night!
By sun flare, do you mean lens-flare? If so, I'd be happy if a weather/sky system left it out, as in "real life", you don't see it unless you're looking through a lens and "superflous" light hits the camera's digital sensors. I've seen so many games that apply lens-flare all to often when you're not looking through a lens.

Maybe I'm just weird :)
0 x
A ship, atop a mountain, is not in itself, proof of a flood. It means someone thought there was going to be a flood.

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Tue Oct 10, 2006 2:40 am

Your eye is a lens, which is why when you look at bright lights at night you get a type of lens flare as well.

I agree about leaving it as an option though.
0 x

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Post by Praetor » Tue Oct 10, 2006 3:30 am

Although the lens flare humans experience is nothing compared to that of cameras. Our flare really doesn't have the signature multiple stacked halos. More of an actual flare around the overly bright light. I've always gone back and forth whether trying to simulate the eye or a camera is better (or neither, I guess). I suppose it depends on the situation.
0 x

User avatar
BRAINLESS
Goblin
Posts: 282
Joined: Tue Jan 04, 2005 6:56 pm
Location: The Netherlands

Post by BRAINLESS » Tue Oct 10, 2006 8:31 am

I've tried removing both calls to 'pow' and upgrading CG, but it now comes up with this error:

Code: Select all

09:25:27: Initialising Caelum system...
09:25:27: Generating sky dome material...
09:25:27: 	Material not found; creating...
09:25:27: 		Material [OK]
09:25:27: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 9
Function: CgProgram::loadFromSource
Description: Unable to compile Cg program SkyLightAbsorptionFP: CG ERROR : The compile returned an error.
(44) : warning C6503: 'y' component of expression uninitailzed
(44) : warning C6503: 'z' component of expression uninitailzed
(44) : warning C6503: 'w' component of expression uninitailzed
(49) : fatal error C9999: Dependent texture operations don't meet restrictions of texture shaders
. 
File: d:\dep.vc80\ogrenew\plugins\cgprogrammanager\src\ogrecgprogrammanagerdll.cpp
Line: 60
Could it have anything to do with my version of Ogre, or is this purely CG related? It would take me a few hours/days to recompile Ogre and get it all working, since I'm using yake (it means recompiling at least Ogre, CEGUI, yake), but if you think it's worth it I'll give it a try!
0 x
Proud member of the OpenFRAG Game Development community

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Tue Oct 10, 2006 8:43 am

spookyboo wrote:It would be nice if it became a complete sky AND wheather system. Imagine that I start Caelum and it not only gives me a day and night cycle, but also a season cycle with warm colours in the summer and bright, cold colours in the winter (its cold in my winter). Caelum would also automatically change the wheather pattern according to the season.

And I want a sun flare and a moon at night!
Rain, snow and such will be added later :) About the seasons cycling don't expect it in the near future :(

Moon will be added soon (I don't think it will take more than one day), and sun flares will be done exclusively through postfilters (once I get it to work with Caelum :cry:)
BRAINLESS wrote:Could it have anything to do with my version of Ogre, or is this purely CG related? It would take me a few hours/days to recompile Ogre and get it all working, since I'm using yake (it means recompiling at least Ogre, CEGUI, yake), but if you think it's worth it I'll give it a try!
I doubt it's a problem of Ogre. Could someone else confirm this error? I had no problems with it. I will investigate though.
0 x
Image

User avatar
BRAINLESS
Goblin
Posts: 282
Joined: Tue Jan 04, 2005 6:56 pm
Location: The Netherlands

Post by BRAINLESS » Tue Oct 10, 2006 10:50 am

Kencho wrote: I doubt it's a problem of Ogre. Could someone else confirm this error? I had no problems with it. I will investigate though.
many thanks :)
0 x
Proud member of the OpenFRAG Game Development community

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Tue Oct 10, 2006 1:14 pm

Mwahahaha! My first cloud tests gave good results. This is far from being added to Caelum right now (only a skyPlane with a test material, wrong colours... you get the idea), but it's a great step ahead.

Now featuring: Altocumulus (or stratocumulus, never got to distinguish them :?) clouds :)
Image
Image
Image
0 x
Image

Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
Contact:

Post by Vectrex » Tue Oct 10, 2006 2:02 pm

excellent work. Just a reminder about WindLight from Windwardmark. The commercial weather thing that used ogre (and sinbad). If this could touch that then I'd be very happy :)
http://www.windwardmark.net/downloads.p ... creenshots
http://www.windwardmark.net/downloads.php?page=videos
0 x

er
Gnoblar
Posts: 17
Joined: Sun Aug 21, 2005 7:36 am
Location: Finland

Post by er » Tue Oct 10, 2006 2:10 pm

@BRAINLESS

I changed profiles from CaelumSystem.cpp to vs_2_0

EDIT: But sky doesn't work still, it remains black and lacking CaelumSphericDome object
Last edited by er on Tue Oct 10, 2006 3:31 pm, edited 1 time in total.
0 x

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Tue Oct 10, 2006 2:44 pm

Nice, you are definitely getting great results with those clouds. I don't know anything about clouds except for what I just learned when I searched for altocumulus but yeah, everyone has seen those type of clouds before I'm sure, they're very distinctive. Rare, but easily recognizable.

Nice work, you're going to have the definitive solution for sky rendering that's for sure.
0 x

User avatar
BRAINLESS
Goblin
Posts: 282
Joined: Tue Jan 04, 2005 6:56 pm
Location: The Netherlands

Post by BRAINLESS » Tue Oct 10, 2006 3:35 pm

er wrote:@BRAINLESS

I changed profiles from CaelumSystem.cpp to vs_2_0

EDIT: But sky doesn't work still, it remains black and lacking CaelumSphericDome object
My card only supports vs_1_3 (GeForce4 Ti4400), so that's not an option. Besides, it didn't change anything for me, I still get the error :(
0 x
Proud member of the OpenFRAG Game Development community

er
Gnoblar
Posts: 17
Joined: Sun Aug 21, 2005 7:36 am
Location: Finland

Post by er » Tue Oct 10, 2006 4:40 pm

Found this while googling, after I tried commenting out both pow() lines, like you did
0 x

User avatar
BRAINLESS
Goblin
Posts: 282
Joined: Tue Jan 04, 2005 6:56 pm
Location: The Netherlands

Post by BRAINLESS » Tue Oct 10, 2006 4:53 pm

What kind of videocard do you have? I suppose it supports ps_2_0, so it's probably newer then mine. It should work on a GF4 though I suppose?
0 x
Proud member of the OpenFRAG Game Development community

er
Gnoblar
Posts: 17
Joined: Sun Aug 21, 2005 7:36 am
Location: Finland

Post by er » Tue Oct 10, 2006 5:14 pm

Laptop with X700

Edit: Got CaelumTest1 working, I'm messing up something in my own code, but had to change profile to ps_2_0
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue Oct 10, 2006 6:39 pm

Kencho wrote:Mwahahaha!
I second that! Nice clouds you've got there! :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Tue Oct 10, 2006 9:25 pm

@vectrex: Yup, me too, but also would love to be paid for that :P Hahaha, anyways I'm doing my best to reach that level just for fun, so don't worry ;)

@falagard, jacmoe: Thanks :)

@BRAINLESS, I can't help there. My card is a GeForce 6600GT, so I can't test how it works on lower cards, and I just know enough cg to do what I need, not more :(
0 x
Image

Post Reply