SkyX 0.4 [0.4 version released - Over-cloud rendering!]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
Doc_QuicknDirty
Gnoblar
Posts: 16
Joined: Mon Aug 30, 2010 4:48 pm
x 1

Re: SkyX 0.2 [SkyX 0.2 released!]

Post by Doc_QuicknDirty »

Hello,
I encountered something strange. If I run Xavyiy's precompiled Demo1 I get ~300 fps @1280x800 with terrain. If I compile the demo by myself and run it at the same settings I get only ~40 fps without terrain. Any hints?
[Solved] - I added a line to rendersystem3d9 which enables supersampled antialiasing. So my app was running with SSAA and Xavyiy's demo without.

Best wishes

Ralf
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: SkyX 0.2 [SkyX 0.2 released!]

Post by Xavyiy »

@scrawl
That's the older ExampleApplication.h copy that I have found at Ogre repositories(from 1.6RC1): https://bitbucket.org/sinbad/ogre/src/8 ... lication.h
And seems that the createFrameListener function was here. I think I've been using the ExampleApplication class even with Ogre 1.4/1.5, so dunno if it has been changed or not since then :P. Anyway, the important thing is that it's fixed now :)
Nodrev
Gremlin
Posts: 193
Joined: Fri Jan 25, 2008 6:55 pm
Location: Nantes / France
x 17

Re: SkyX 0.2 [SkyX 0.2 released!]

Post by Nodrev »

Is there any reason why you didn't include the path /usr/lib/OGRE/cmake for finding cmake scripts?
The reason is that as far as I remember, I always installed libs I compiled on my own in "usr/local", in order to distinct them from those installed by the system. And the reason why I did not added it on the posted archive is that I saw your message just seconds after I posted mine, so the good cmake package should be my last zip with the modification I mentioned to you ;)
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

Re: SkyX 0.2 [SkyX 0.2 released!]

Post by LBDude »

you have to change a few things in order to comply with Sm4 I think. That's okay, I will do it.
My blog here.
Game twitter here
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Xavyiy »

Hi all!
SkyX 0.2.1 maintenance release is out now! It fixes all 0.2 version known bugs and also adds infinite camera far clip distance support.

As usual, download links are available at: http://www.paradise-studios.net/downloads/hydrax_skyx/

Xavier
SFCBias
Kobold
Posts: 33
Joined: Fri Jan 29, 2010 12:24 am

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by SFCBias »

After using this on windows, almost everything works fine as far as creation/initialisation, however when i moved to linux I get an Exception.

Code: Select all

An exception has occurred: OGRE EXCEPTION(5:ItemIdentityException): Unknown prefab type for entity SkyXMeshEnt in SceneManager::createEntity at /build/buildd/ogre-1.7.3/OgreMain/src/OgreSceneManager.cpp (line 515)
Here's my init code if it helps.

Code: Select all

//Sky
	mSkyController = new SkyX::BasicController();
	mSkyX = new SkyX::SkyX(gEngine->mSceneMgr, mSkyController);
	try{
	mSkyX->create();
	} catch (Ogre::Exception& e)
	{

	}

	//Hardcoded from Ogitor settings. This could be done dynamically by reading from the raw .ogscene file.
	SkyX::AtmosphereManager::Options options = mSkyX->getAtmosphereManager()->getOptions();
	options.Exposure = 2.0f;
	options.G = .991f;
	options.HeightPosition = 0.01f;
	options.InnerRadius = 9.77501f;
	options.MieMultiplier = 0.000675f;
	options.OuterRadius = 10.2963f;
	options.RayleighMultiplier = 0.0022f;
	options.NumberOfSamples = 2;
	options.SunIntensity = 30;
	options.WaveLength = Vector3(0.57, 0.54, 0.44);

	mSkyX->getAtmosphereManager()->setOptions(options);
	mSkyX->setTimeMultiplier(1.0f/60.0f);

	//Sunrise @ 7:30; Sunset @ 20:30
	mSkyController->setTime(Vector3(getSkyTime(), 7.5, 20.5));
	mSkyController->setMoonPhase(0.75);
	mSkyController->setEastDirection(Vector2(0,1));
	
	// Add a basic cloud layer instead of the VClouds in Ogitor 
	//TODO: Change this ^
	mSkyX->getCloudsManager()->add(SkyX::CloudLayer::Options());

	//Create a technique for each of the terrains in the scene.
	TerrainGroup::TerrainIterator itr = gEngine->mSceneLoader->getTerrainGroup()->getTerrainIterator();
	while(itr.hasMoreElements())
	{
		Terrain* t = itr.getNext()->instance;
		const MaterialPtr& mat= t->getMaterial();
		//Add water technique
		mHydrax->getMaterialManager()->addDepthTechnique(mat->createTechnique());
		mSkyX->getGPUManager()->addGroundPass(mat->getTechnique(0)->createPass(), 5000, Ogre::SBT_TRANSPARENT_COLOUR);

	}
I'm not sure what the problem here is. Using the same code and project setup (via SVN), but only fails on Linux.

EDIT* I confirmed that this error also occurs in the Demos

EDIT EDIT* I fixed it,I beleive it was linking against different Ogre builds (I assume) that didn't line up and it called the wrong createEntity function.
User avatar
Captain_Deathbeard
Gremlin
Posts: 179
Joined: Mon Nov 21, 2005 6:16 pm
Location: UK
x 7
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Captain_Deathbeard »

Looks awesome, great work!

Would you mind including or just sending me a visual studio project file? I have already wasted a couple of hours screaming at cmake and now I'd rather just edit the paths by hand :roll: .
Nodrev
Gremlin
Posts: 193
Joined: Fri Jan 25, 2008 6:55 pm
Location: Nantes / France
x 17

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Nodrev »

Under windows, you have to define the OGRE_HOME (or OGRE_ROOT, didn't remember) environment variable. It's all in the readme file :) Did you done that?
User avatar
Captain_Deathbeard
Gremlin
Posts: 179
Joined: Mon Nov 21, 2005 6:16 pm
Location: UK
x 7
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Captain_Deathbeard »

yeah I did do that. Maybe its because I have an ogre src build?

I've used it before to build ogre. But this is extra confusing. For example, the first error is:
Search path: x:/kenshi/ogre_src_v1-7-1/
CMake Warning at CMake/SkyXDependencies.cmake:59 (find_package):
Could not find module FindOGRE.cmake or a configuration file for package
OGRE.

Adjust CMAKE_MODULE_PATH to find FindOGRE.cmake or set OGRE_DIR to the
directory containing a CMake configuration file for OGRE. The file will
have one of the following names:

OGREConfig.cmake
ogre-config.cmake
I can find FindOGRE.cmake, but have no idea where CMAKE_MODULE_PATH is (tried setting it as an evironment variable). I can see how to set OGRE_DIR, but OGREConfig.cmake and ogre-config.cmake don't exist.

A .sln! My kingdom for a .sln!
Nodrev
Gremlin
Posts: 193
Joined: Fri Jan 25, 2008 6:55 pm
Location: Nantes / France
x 17

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Nodrev »

For windows, the cmake's Ogre search path is defined as this:

Code: Select all

  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ENV_OGRE_HOME}/CMake)
So the environment variable name is "OGRE_HOME". You said that you use a source version, that's not the problem, I always use sources versions. But the message give me a good idea about your problem, especially this line:

Code: Select all

Search path: x:/kenshi/ogre_src_v1-7-1/
It seems that you setted your OGRE_HOME environment variable to "x:/kenshi/ogre_src_v1-7-1/" instead of "x:/kenshi/ogre_src_v1-7-1/sdk", where sdk is the directory where Ogre's files goes when you do the "INSTALL" build in Ogre (I'm pretty sure that you forgot to do that, it's the equivalent of gcc "make install"). I do not remember the default "install" dir, maybe it's something like "Program Files\Ogre\...", you'll have to check your OGRE CMAKE configuration.
I wish I was clear enough :)

If you don't succeed, I'll post my cmake generated sln file, but you'll have to change all the directories :( ...
User avatar
Captain_Deathbeard
Gremlin
Posts: 179
Joined: Mon Nov 21, 2005 6:16 pm
Location: UK
x 7
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Captain_Deathbeard »

Ok I tried that, I tried /sdk, /OgreMain, /CMake, same result. I also tried rebooting to make sure the environment variables changed properly.

Would you mind sending me a .vcproj file? Any version is fine. I seriously don't mind hand-editing the paths, I've done it enough times before, it will be quicker for me in the end.
Thanks for your help!
Nodrev
Gremlin
Posts: 193
Joined: Fri Jan 25, 2008 6:55 pm
Location: Nantes / France
x 17

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Nodrev »

Ok, I'll check that after work, because I use a static build of Ogre here, got to take my dll version at home.
<edit>About the env variable, it's true that cmake edi do not reload them between launches, so for your information, it's necessary to close cmake edi, change the env, and relaunch cmake.</edit>
Nodrev
Gremlin
Posts: 193
Joined: Fri Jan 25, 2008 6:55 pm
Location: Nantes / France
x 17

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Nodrev »

Here it comes, I generated vs2010 files with cmake, and clean all cmake related stuff manually, tested rapidly, everything seems to compile correctly. You'll have to change all the full path with relative path:
http://www.megaupload.com/?d=WH15NTZT
Don't your kingdom is the United one? I won a bunch of land with such small files :p!
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Xavyiy »

Hi all!

It has been some weeks since I've released SkyX 0.2.1 and since then there aren't much news from me! The reason why I'm not very active on the forums is because I've my final exams on January and now I'm studying almost the whole day :/ So I can't focus on SkyX during these weeks.

Btw, SkyX 0.3 is almost funded and I'll happily work on it one time I'll have finished my exams (maybe I will start before, but don't expect lot of progress!).

Xavier
noorus
Halfling
Posts: 75
Joined: Wed Apr 20, 2011 9:55 pm
Location: Helsinki, Finland
x 3

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by noorus »

The vclouds look totally great. Sweet performance too, I get a steady 220 FPS in the demos at 1920x1200 on a GeForce GTX 260. (700+ in the first demo.)
Good work :)
Creator of Nice Input Library, for your advanced input needs.
Image
User avatar
ghiboz
Goblin
Posts: 205
Joined: Wed Apr 25, 2007 9:47 pm
Location: Centallo (I)
x 2
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by ghiboz »

hi!
congrats for this...
I have only a question.. using skyx,how can I manage the fog in my scene? :D
User avatar
ghiboz
Goblin
Posts: 205
Joined: Wed Apr 25, 2007 9:47 pm
Location: Centallo (I)
x 2
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by ghiboz »

just another little question...
if I wish have the time realistic, so If I launch my app now that is 12.12, and after 10 minutes I wish have the time 12.22, what value I need to use in timemultiplier? thanks in advance!
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Xavyiy »

Hi!
Finally I've finished all my exams (though unfortunately not as good as other times).

So, during the following month I'll be working on the thunderstorm system, and SkyX 0.3 will be released around the end of Febrary/start of March.
Btw, SkyX 0.3 is now funded =) Thanks to all donators! It is awesome having this kind of support from the community!

@ghiboz
For fog, you can add the SkyX ground scattering pass to all materials you're using in the scene: SkyX::GPUManager::addGroundPass(...). Otherwise you can always use the Ogre built-in fog or a home-made fog solution, but you'll have to deal with setting the fog parameters according to SkyX settings (time of the day, atmosphere settings, etc).

And for realistic time, as far as I remember, in the simple controller the time is stored in 0-24 range, where the time since last frame multiplied by the time multiplier is added each frame.
So... the multiplier must be: 24/(24*60*60) = 1/3600, this way 3600 seconds (one hour) will increment the time in one unit, which is one hour in SkyX =)

@noorus
Thanks =)

Xavier
User avatar
ghiboz
Goblin
Posts: 205
Joined: Wed Apr 25, 2007 9:47 pm
Location: Centallo (I)
x 2
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by ghiboz »

Xavyiy wrote:Hi!
Finally I've finished all my exams (though unfortunately not as good as other times).
oops... you used your time for skyx and not for the study ? :wink:
Xavyiy wrote: @ghiboz
For fog, you can add the SkyX ground scattering pass to all materials you're using in the scene: SkyX::GPUManager::addGroundPass(...). Otherwise you can always use the Ogre built-in fog or a home-made fog solution, but you'll have to deal with setting the fog parameters according to SkyX settings (time of the day, atmosphere settings, etc).
sorry, can you explain better how can I add the ground scattering pass to my materials?
Xavyiy wrote: And for realistic time, as far as I remember, in the simple controller the time is stored in 0-24 range, where the time since last frame multiplied by the time multiplier is added each frame.
So... the multiplier must be: 24/(24*60*60) = 1/3600, this way 3600 seconds (one hour) will increment the time in one unit, which is one hour in SkyX =)
so I need to set the multiplier as 0.00027777..

thank you very much!!
User avatar
Oggo87
Gnoblar
Posts: 12
Joined: Thu Oct 27, 2011 9:47 pm
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Oggo87 »

Hi!
first of all, thank you very much for this impressive project, it's simply amazing!
I'm having some problems getting SkyX to work with infinite far clipping distance. VClouds are showing up correctly, but the sky is completely black, although lightning works nicely.
By checking SkyX' source code, I noticed that the new mInfiniteCameraFarClipDistance member seems not to be used anywhere.
Any clues about this?
Thank you!
Image
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Xavyiy »

@ghiboz
You've an example of how to add the ground scattering pass to a material in the Demo1, where I add it to the terrain =)
If you've any other question, just ask here =)

@Oggo87
Hi! Thanks for the kind words :)
I think that the problem must be related with some specific part of your project since my tests are all working as expected.
Check that your near clip distance is not too small, but I doubt that can be problem.
Try to recompile the demos setting the far clip distance as 0 (infinite) and check if it works on your computer (it works here).
About where SkyX uses the mInfiniteCameraFarClipDistance, it's used through SkyX::getInfiniteCameraFarClipDistance() in SkyX::MeshManager, SkyX::MoonManager and SkyX::VCloudsManager =) (As far as I remember! :P)

Xavier
User avatar
Oggo87
Gnoblar
Posts: 12
Joined: Thu Oct 27, 2011 9:47 pm
Contact:

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Oggo87 »

Thank you so much for the reply, Xavyiy!
I've re-checked everything again, and apparently I messed around something when I compiled 0.21. Somehow I managed to use the new headers with the old cpp files from 0.2 :roll:
Sorry about that! Everything's working nicely now! :D
Image
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by Xavyiy »

Great to know now it's working!

Xavier
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: SkyX 0.2 [SkyX 0.2.1 released!]

Post by drwbns »

Hi! I got some trouble trying to integrate SkyX 0.2.1 - I can run the demos just fine but when adding the code to my Ogre project, I just have a light grey background instead of the sky. I have this line in my log -

Code: Select all

Can't assign material _NULL_ to SubEntity of SkyXMeshEnt because this Material does not exist. Have you forgotten to define 
My init code basically looks like so -

Code: Select all

      // Create SkyX
	mBasicController = new SkyX::BasicController();
	mSkyX = new SkyX::SkyX(mKeyDevices.mSceneMgr, mBasicController);

   SkyX::AtmosphereManager::Options options = mSkyX->getAtmosphereManager()->getOptions();
   options.Exposure = 2.0f;
   options.G = .991f;
   options.HeightPosition = 0.01f;
   options.InnerRadius = 9.77501f;
   options.MieMultiplier = 0.000675f;
   options.OuterRadius = 10.2963f;
   options.RayleighMultiplier = 0.0022f;
   options.NumberOfSamples = 2;
   options.SunIntensity = 30;
   options.WaveLength = Vector3(0.57, 0.54, 0.44);

   mSkyX->getAtmosphereManager()->setOptions(options);
   mSkyX->setTimeMultiplier(1.0f/60.0f);

	mSkyX->create();

	mBasicController->setMoonPhase(0.75f);

   // Add the atmospheric scattering pass to our terrain material
	// The ground atmospheric scattering pass must be added to all materials that are going to be used to 
	// render object which we want to have atmospheric scattering effects on. 
	mSkyX->getGPUManager()->addGroundPass(
		static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().
		getByName("Worldcraft/Greengrass"))->getTechnique(0)->createPass(), 5000, Ogre::SBT_TRANSPARENT_COLOUR);

   //Add Listeners
	mKeyDevices.mRoot->addFrameListener(mSkyX);
   mKeyDevices.mWindow->addListener(mSkyX);

	// Add a basic cloud layer
	mSkyX->getCloudsManager()->add(SkyX::CloudLayer::Options(/* Default options */));
UPDATE: I found it was some other init code which was overwriting skyX - One of these lines or both was overwriting SkyX -

Code: Select all

  // mKeyDevices.mSceneMgr->setAmbientLight(Ogre::ColourValue((float)0.8,(float)0.8,(float)0.8));
   //mKeyDevices.mSceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_MODULATIVE);
Post Reply