Yep.drwbns wrote:I can't remember, but was it not possible to go through the cloud layer before?
@Xavyiy, what are your plans for the future of this project ?
Yep.drwbns wrote:I can't remember, but was it not possible to go through the cloud layer before?
There are still a lot of things to enhance: rewrite the layered clouds system, a new and more eye-candy starfield system, maybe aurorae support, etc.@Xavyiy, what are your plans for the future of this project ?
Code: Select all
void StateA::update(Ogre::Real deltaTimeSecs)
{
// We don't want to risk a segfault!
if (!mSkyX)
return;
Ogre::SceneManager* sceneManager = sceneMgr;
Ogre::Vector3 lightDir = mSkyX->getController()->getSunDirection();
Ogre::Vector3 moonDir = mSkyX->getController()->getMoonDirection();
// Calculate current colour gradient point
float point = (-lightDir.y + 1.0f) / 2.0f;
//lightDir = (lightDir);
cout << sun->getDirection() << "\n";
// Sun and ambient colours
Ogre::ColourValue sunCol = vectorToColour(
mSkyX->getVCloudsManager()->getSunGradient().getColor(point));
Ogre::ColourValue ambCol = vectorToColour(
mSkyX->getVCloudsManager()->getAmbientGradient().getColor(point));
// Minimum ambient light
Ogre::ColourValue minAmbientLight(0.1f, 0.1f, 0.2f);
// Sun multipliers
Ogre::ColourValue sunSpecularMult(0.9f, 0.9f, 0.9f);
Ogre::ColourValue sunDiffuseMult(0.8f, 0.8f, 0.7f);
Ogre::ColourValue sunAmbientMult(0.5f, 0.5f, 0.5f);
// Moon multipliers
Ogre::ColourValue moonCol = Ogre::ColourValue::White;
Ogre::ColourValue moonSpecularMult = Ogre::ColourValue::White;
Ogre::ColourValue moonDiffuseMult(0.3f, 0.3f, 0.4f);
Ogre::ColourValue moonAmbientMult(0.2f, 0.2f, 0.3f);
// Set sun direction and colours
sun->setDirection(lightDir);
sun->setSpecularColour(ambCol * sunSpecularMult);
sun->setDiffuseColour(sunCol * sunDiffuseMult);
// Set moon direction and colours
moon->setDirection(moonDir);
moon->setSpecularColour(moonCol * moonSpecularMult);
moon->setDiffuseColour(moonCol * moonDiffuseMult);
// Manage ambient light
Ogre::ColourValue ambient = Ogre::ColourValue::Black
+ sun->getDiffuseColour() * sunAmbientMult
+ moon->getDiffuseColour() * moonAmbientMult;
ambient.r = std::max(ambient.r, minAmbientLight.r);
ambient.g = std::max(ambient.g, minAmbientLight.g);
ambient.b = std::max(ambient.b, minAmbientLight.b);
ambient.a = std::max(ambient.a, minAmbientLight.a);
sceneManager->setAmbientLight(ambient);
sceneManager->setShadowColour(ambient);
// Update sky simulation
mSkyX->update(deltaTimeSecs);
}
Code: Select all
mBasicController = new SkyX::BasicController();
mSkyX = new SkyX::SkyX(sceneMgr, mBasicController);
mSkyX->create();
//this->setPreset(SkyXSettings(Ogre::Vector3(17.16f, 7.5f, 20.5f), 0, 0, SkyX::AtmosphereManager::Options(9.77501f, 10.2963f, 0.01f, 0.0017f, 0.000675f, 30, Ogre::Vector3(0.57f, 0.54f, 0.44f), -0.991f, 2.5f, 4), false));
//this->setPreset(SkyXSettings(Ogre::Vector3(8.85f, 7.5f, 20.5f), -0.08f, 0, SkyX::AtmosphereManager::Options(9.77501f, 10.2963f, 0.01f, 0.0022f, 0.000675f, 30, Ogre::Vector3(0.57f, 0.52f, 0.44f), -0.991f, 3, 4), false, true, 300, false, Ogre::Radian(270), Ogre::Vector3(0.63f,0.63f,0.7f), Ogre::Vector4(0.35, 0.2, 0.92, 0.1), Ogre::Vector4(0.4, 0.7, 0, 0), Ogre::Vector2(0.8,1)));
//this->setPreset(SkyXSettings(Ogre::Vector3(12.23, 7.5f, 20.5f), 0, 0, SkyX::AtmosphereManager::Options(9.77501f, 10.2963f, 0.01f, 0.00545f, 0.000375f, 30, Ogre::Vector3(0.55f, 0.54f, 0.52f), -0.991f, 1, 4), false, true, 300, false, Ogre::Radian(0), Ogre::Vector3(0.63f,0.63f,0.7f), Ogre::Vector4(0.25, 0.4, 0.5, 0.1), Ogre::Vector4(0.45, 0.3, 0.6, 0.1), Ogre::Vector2(1,1), true, 0.5, Ogre::Vector3(1,0.976,0.92), 2));
//this->setPreset(SkyXSettings(Ogre::Vector3(10.23, 7.5f, 20.5f), 0, 0, SkyX::AtmosphereManager::Options(9.77501f, 10.2963f, 0.01f, 0.00545f, 0.000375f, 30, Ogre::Vector3(0.55f, 0.54f, 0.52f), -0.991f, 0.5, 4), false, true, 300, false, Ogre::Radian(0), Ogre::Vector3(0.63f,0.63f,0.7f), Ogre::Vector4(0, 0.02, 0.34, 0.24), Ogre::Vector4(0.29, 0.3, 0.6, 1), Ogre::Vector2(1,1), true, 0.5, Ogre::Vector3(0.95,1,1), 2));
this->setPreset(SkyXSettings(Ogre::Vector3(7.59f, 7.5f, 20.5f), 0.15, -0.8f, SkyX::AtmosphereManager::Options(9.77501f, 10.2963f, 0.01f, 0.0072f, 0.000925f, 30, Ogre::Vector3(0.71f, 0.59f, 0.53f), -0.997f, 2.5f, 1), true));
//this->setPreset(SkyXSettings(Ogre::Vector3(21.5f, 7.5, 20.5), 0.03, -0.25, SkyX::AtmosphereManager::Options(), true));
sceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_TEXTURE_MODULATIVE);
sun = sceneMgr->createLight("Sun");
sun->setType(Ogre::Light::LightTypes::LT_DIRECTIONAL);
sun->setCastShadows(true);
moon = sceneMgr->createLight("Moon");
moon->setType(Ogre::Light::LightTypes::LT_DIRECTIONAL);
moon->setCastShadows(false);
moon->setDirection(sun->getDirection() * -1);
Hehe, thanks!Awesome job on Hydrax and SkyX! They are really taking my engine to the next level.
Well, I will need a video because of I don't exactly understand the effects of the problem. Anyway, as far as I remember, getSunDirection() gives you the direction of earth-to-sun, not the direction fo the sun-to-earth. So you've to take this account. sun->setDirection(lightDir); should be sun->setDirection(-lightDir);It seems like during the day according to SkyX the Light that I have for the sun is Dark like it's night time and during the night it's bright like it's day time. I've tried different ways to get them correctly synced and nothing seems to be working.
Hydrax itself is quite fast now, the geometry and noise update is done in about 2ms, the rest of the time comes from updating the reflection/refraction/depth RTTs which only depends on your own scene.Do you have any info about framerate?
Here is what night time looks like and Day time is Dark instead of light. Also these were taking AFTER I made the correction to the light direction that you pointed out.Xavyiy wrote:Hehe, thanks!Awesome job on Hydrax and SkyX! They are really taking my engine to the next level.
Well, I will need a video because of I don't exactly understand the effects of the problem. Anyway, as far as I remember, getSunDirection() gives you the direction of earth-to-sun, not the direction fo the sun-to-earth. So you've to take this account. sun->setDirection(lightDir); should be sun->setDirection(-lightDir);It seems like during the day according to SkyX the Light that I have for the sun is Dark like it's night time and during the night it's bright like it's day time. I've tried different ways to get them correctly synced and nothing seems to be working.
---------------
Btw, here is another video of Hydrax 2.0, this time with SSS (sub-surface scattering)!
[youtube]To1gWyz1lm8[/youtube]
Xavier
Sorry but I don't know what the problem is. You should debug step by step to find our where the problem is.Here is what night time looks like and Day time is Dark instead of light. Also these were taking AFTER I made the correction to the light direction that you pointed out.
Not, it's not possible (it would require some internal changes, a lot of for Hydrax). But.., what do you want to do with two oceans/skies one up and the other down? I'm looking forward to see some concept art! Inception!Currently, is it possible and easy to have two skies, one up, one down? Same question with seas for hydrax.
Haha really only some ideas, maybe I'll make a concept art later.Xavyiy wrote:Not, it's not possible (it would require some internal changes, a lot of for Hydrax). But.., what do you want to do with two oceans/skies one up and the other down? I'm looking forward to see some concept art! Inception!Currently, is it possible and easy to have two skies, one up, one down? Same question with seas for hydrax.
Code: Select all
Ogre::Terrain* pTerrrain = 0;
// (...)
// downloading hmap, blendmaps, etc
// (...)
Ogre::String name = pTerrain->getMaterialName();
// checked here the name. it is like OgreTerrain/2241708416 (the number varies each time I run test)
Ogre::MaterialPtr mat = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName(name));
for(int nt=0; nt<mat->getNumTechniques(); nt++)
{
m_pSkyX->getGPUManager()->addGroundPass(mat->getTechnique(nt)->createPass(), 25000, Ogre::SBT_MODULATE);
}
Sounds very cool! Indeed, a game immersed in such virtual fantasy environment and with decent gameplay would indeed be very interesting!Haha really only some ideas, maybe I'll make a concept art later.
Basically the game I'm making is not at all realistic, it happens in a virtual world (I mean, the game's world is a virtual "fantasy" computer network, not a virtual reality) so I can just slap any kind of background to it and I aready planned to have a over/under sea stage. As there is no up nor down in this game, I was wondering if something totally between skies or between seas would have quite q huge impact... watching your videos reminded me about some old stuffs (games and anime) which had crazy visuals for the time. I didn't smoke anything I swear!
Yes, more or less you would have that change the local up axis (hardcoded, intrinsic in the maths, but there is a Z-up fork of SkyX 0.3.1, maybe that could help you). Also, you'll have to deal with renaming internal resources created by SkyX and Hydrax since at the moment two SkyX or Hydrax instances would have due to duplicated resource names. A more advanced solution like supporting two skies with the same SkyX object will require some deep structural changes, specailly for Hydrax.As I don't "need" this, I'm not asking it as a feature. However if I decide in the end to try that I think it would be fair if I try to modify the code myself and send you a patch, as it wouldn't be a generically useful feature. Basically it would require all calculations to happen relative to a "up" vector that would be variable. Not sure what it means in performance terms.
Thanks!Anyway just keep the good work, your plugins are fantastic.
Check SkyX::setRenderQueueGroups. Btw, if you don't want scattering effect in the terrain you can remove the addGroundPass stuff.Just wanted to get info, what should I do to make my terrain render under the vclouds.
Thank you. That helped a lot.Xavyiy wrote:Check SkyX::setRenderQueueGroups. Btw, if you don't want scattering effect in the terrain you can remove the addGroundPass stuff.Just wanted to get info, what should I do to make my terrain render under the vclouds.
Xavier
Code: Select all
FileSystem=C:\Users\Zodiac\Desktop\OGRE_Engine\SkyX\SkyXCommon\Bin\
FileSystem=C:\Users\Zodiac\Desktop\OGRE_Engine\SkyX\SkyXCommon\Bin\Media
FileSystem=C:\Users\Zodiac\Desktop\OGRE_Engine\SkyX\SkyXCommon\Bin\Media\packs
FileSystem=C:\Users\Zodiac\Desktop\OGRE_Engine\SkyX\SkyXCommon\Bin\Media\SkyX
FileSystem=C:\Users\Zodiac\Desktop\OGRE_Engine\SkyX\SkyXCommon\Bin\Media\Terrain
Code: Select all
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../Media/packs/OgreCore.zip
# Resource locations to be added to the default path
[General]
FileSystem=../../Media
FileSystem=../../Media/materials/programs
FileSystem=../../Media/materials/scripts
FileSystem=../../Media/materials/textures
FileSystem=../../Media/models
Zip=../../Media/packs/SkyBoxes.zip
[Hydrax] # Needed!!! (Hydrax uses resources from the 'Hydrax' resource group)
FileSystem=../../Media/Hydrax
would be interesting to see if it could do cartoon type of lookTheSHEEEP wrote:I hope that will not scare away artists because they think their assets can not keep up with that level of quality
Though not fully serious, that does seem to be a problem. Let me explain:
The quality of the water is really great.
Now if I was an indie and wanted to use SkyX + HydraX or the Paradise Engine, I'd have a great quality water. And I mean AAA like quality.
However, all my other assets would have to meet that level of quality. Which will be expensive. Or I accept that there will be a visible break in the visual quality of the different parts of the game.
So, as crazy as it sounds, I hope there are possibilities to "turn down" the quality a bit, or to introduce a more stylized look (maybe a bit cartoonish, or something).
I hope you get what I mean
This is paradoxical since some days ago I have taken a very important decision which changes the course of Paradise Engine and very probably the next two years of my life. I will not release more information about the future of the engine during the following 6-8 months, all I can say is that it's not going to target indie development or video game development, but it requires an high degree of realism in environmental elements.Now if I was an indie and wanted to use SkyX + HydraX or the Paradise Engine, I'd have a great quality water. And I mean AAA like quality.
However, all my other assets would have to meet that level of quality. Which will be expensive. Or I accept that there will be a visible break in the visual quality of the different parts of the game.
Whew, that's a very reasonable price.Xavyiy wrote:Hydrax 2.0 will become available during the Summer, licensing will go from 60€ for hobbyist/indie games, to 300€, 600€ and 2000€ for medium/big companies, simulators and game engines, respectively (royalty-free), with update access for 9 months. A hobbyist/indie license will be given for free to all SkyX donors.
Xavier
Yes, of course, by "engines" I mean licensed to third-party developers. So for a home-made engine which is only used to create custom games/apps the price would be 60€ (little teams), 300€ (middle/big companies), or 600€ in the case it's a naval/aerial simulator. In any case, for third-party licensed software the price will be 2000€, included simulators. All this will be carefully explained when the time comes and Hydrax 2.0 will see the world.Mind Calamity wrote:Whew, that's a very reasonable price.
By game engines you mean engines that use Hydrax and are licensed to third-party developers (first party being the developers of the engine) ? That wouldn't apply to in-house engines, right ? (Probably so, but worth to check.)
Would be interested in that, too.Thoran wrote:Another question on Hydrax would be if Hydrax can generally be used to render rivers instead of ocean?