SkyX plugin [SkyX 0.1 released! - Page 1]

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!
savox
Gnoblar
Posts: 3
Joined: Sat Aug 28, 2010 5:21 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by savox »

Great pluggin!
Anyway I noticed something strange about moon.
I built both demoes without problems, but moon disappear everytime i move fpcamera with WASD keys. Keydown and moon disappear. Release any key and moon come back.

built with vc2008 - nvidia card 9600gt - d3d9.

Anyone else has experieced a similar issue?

Thank You ahead.
Houdini
Gnoblar
Posts: 15
Joined: Mon Oct 12, 2009 12:15 am

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by Houdini »

savox wrote:Great pluggin!
Anyway I noticed something strange about moon.
I built both demoes without problems, but moon disappear everytime i move fpcamera with WASD keys. Keydown and moon disappear. Release any key and moon come back.

built with vc2008 - nvidia card 9600gt - d3d9.

Anyone else has experieced a similar issue?

Thank You ahead.
Yes, this is a known issue, and I believe Xavyiy already has this fixed in his current dev version of SkyX.

- Houdini
savox
Gnoblar
Posts: 3
Joined: Sat Aug 28, 2010 5:21 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by savox »

Thanks indeed, Houdini.
Doc_QuicknDirty
Gnoblar
Posts: 16
Joined: Mon Aug 30, 2010 4:48 pm
x 1

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by Doc_QuicknDirty »

Hello Xavyiy,

I really appreciate your work and want to say thank you. I'm looking forward to further releases.

Best wisehs

Ralf

(Please feel free to use this images within http://www.ogre.org)
Ship.jpg
Ship_2.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by Doc_QuicknDirty on Tue Aug 31, 2010 4:34 pm, edited 1 time in total.
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 plugin [SkyX 0.1 released! - Page 1]

Post by Xavyiy »

Hi all!
Finally I'm back from my long -almost 2 months- holidays!

I'll try to reply to all question quickly, and talk a little about the future plans for SkyX and Hydrax.

@Beauty
Thanks for creating the SkyX Wiki page!, I'll fill it with some new contents along this week =)

Fog support
At the moment there isn't built-in Ogre fog support - Only the ground scattering pass is available -, but it's not so hard to implement it. The fact is that the fog pass applied to the SkyX skydome mesh should be a little modified version of the standar fog materials since I think people is looking for a solution that even is at really the fog must "hide" the sky, allows the user to see the bottom par of the sky at the same time that the horizont is covered by the fog.
I'll work on this for the next SkyX release.

Z-Fighting issues - Garzul, foxbat and Superfeesh problem -
As foxbat has said, all terrain shaders must handle the space transformation in exactly the same way, but somethimes this is not enough and you'll continue to get these flickering issues. To solve it you just must to reduce your camera clip distance. Usually it'll be enough with setting a bigger value of the NearClipDistance. This way the Z precission will be enough to correctly display all terrain passes.

@Houdini
During this summer I've been working on the Paradise Engine + Sandbox, so next Hydrax and SkyX versions will have to wait a little more, anyway my plans are starting to work in the next Hydrax/SkyX versions in a near future.

@savox
As Houdini sais this is a know issue and it's fixed in my current dev version =)

@Doc_QuicknDirty
Thanks to all you for using my plugins =)
And very cool screenshots! I really like the water ship trails, are you render them using Hydrax decals or custom particles under the water surface? (Or something else!)

---------------------------------------------------

My plans for Hydrax 0.6 and SkyX 0.2:
I'll start with it's development as soon as I'll integrate them in the Paradise Engine Sandbox, in about 1 month.
I'll fix all know bugs and add some cool features like multiple camera rendering, improved underwater rendering, native GLSL support, etc.

Xavi
Doc_QuicknDirty
Gnoblar
Posts: 16
Joined: Mon Aug 30, 2010 4:48 pm
x 1

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by Doc_QuicknDirty »

Hello Xavi,

The wake and smoke are Ogre ParticleSystem.

Best wishes

Ralf
Ship_3.jpg
You do not have the required permissions to view the files attached to this post.
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 plugin [SkyX 0.1 released! - Page 1]

Post by Xavyiy »

Cool!
It looks really great! Looking forward a little video and some more info about your game/simulator =)

Xavi
Doc_QuicknDirty
Gnoblar
Posts: 16
Joined: Mon Aug 30, 2010 4:48 pm
x 1

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by Doc_QuicknDirty »

haltendehand
Halfling
Posts: 98
Joined: Wed Jun 16, 2010 11:44 pm
Location: Freiburg, Germany

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by haltendehand »

:shock: :shock: :shock:
Wow!
venomouswaste
Gnoblar
Posts: 1
Joined: Thu Apr 22, 2010 10:13 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by venomouswaste »

Great works Xavyiy.. Hope to see you make it better :)
By the way can anyone help me about building the "SkyX_d.dll"?? I'm using code::blocks with ogre1.7.1

I managed to build the hydrax_d.dll. like it when I tried to build SkyX, It gives me a lot of errors :D But I can build the release dll without errors :S

Code: Select all

obj\Debug\src\SkyX\AtmosphereManager.o:C:\OgreSDK_mingw_v1-7-1\src\SkyX\AtmosphereManager.cpp|56|undefined reference to `_imp___ZN4SkyX10GPUManager22setGpuProgramParameterERKNS0_10GpuProgramERKSsRKfRKb'|
.
.
.
.
.
C:\OgreSDK_mingw_v1-7-1\src\SkyX\CloudsManager.cpp|35|undefined reference to `_imp___ZN4SkyX13ColorGradientC1Ev'|
So is there anybody to help me or give me idea??? :cry:

By the way;
@Doc_QuicknDirty

what a brilliant idea that you are using with particle system, I'm new to Ogre and i really want to make good stuffs :)you people give me a lot of good ideas thank you all :)
XSampled
Gnoblar
Posts: 8
Joined: Mon Sep 13, 2010 9:38 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by XSampled »

Hi guys

I also have this so called Z-depth fighting i assume but playing around a bit with near/far clip planes do nothing about it. Is is still depthfighting issue?

Ive made an illustration to this problem
Image

Is there a way to fix it?

Here is my code init/update SkyX code

Init function

Code: Select all

               void SubGame::PrepareSky(void){
		mSkyX = new SkyX::SkyX(m_pSceneMgr, m_pCamera);
		mSkyX->create();

				// Add our ground atmospheric scattering pass to terrain material
		MaterialPtr Matptr = m_pMainTerrain->getMaterial();
		mSkyX->getGPUManager()->addGroundPass(Matptr->getTechnique(0)->createPass(), 5000, Ogre::SBT_TRANSPARENT_COLOUR);
		// Add a basic cloud layer
		mSkyX->getCloudsManager()->add(SkyX::CloudLayer::Options(/* Default options */));
		
}
Update function

Code: Select all

		mSkyX->update(timeSinceLastFrame);	

		mSunPosition = mSkyX->getAtmosphereManager()->getSunPosition();

			// Update terrain material
		MaterialPtr Matptr = m_pMainTerrain->getMaterial();
		Matptr->getTechnique(0)->getPass(0)
		->getFragmentProgramParameters()->setNamedConstant("uLightY", -mSkyX->getAtmosphereManager()->getSunDirection().y);
		
		mSunLight->setDirection(mSkyX->getAtmosphereManager()->getSunDirection());
I build all libs from source. SkyX ver 0.5. Win7 D3D
By the way Xavyiy you got broken links to SkyXHydraxX demo could you please update them.

Thanks Xavyiy for this awesome libraries anyway.
plfiorini
Gnoblar
Posts: 15
Joined: Thu Feb 21, 2008 8:24 am

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by plfiorini »

I'm using the new terrain component, so I made a custom material generator:

Code: Select all

Ogre::MaterialPtr TerrainCustomMaterialGenerator::generate(
    const Ogre::Terrain* terrain)
{
	Ogre::MaterialPtr matPtr =
	    Ogre::TerrainMaterialGenerator::generate(terrain);
	if (matPtr.isNull())
		return matPtr;

        mSkyX->getGPUManager()->addGroundPass(matPtr->getTechnique(0)->createPass());

        return matPtr;
}
But an exception is raised:

Code: Select all

OGRE EXCEPTION(2:InvalidParametersException): This pass does not have a vertex program assigned! in Pass::getVertexProgramParameters at ..\..\OgreMain\src\OgrePass.cpp (line 1462)
The vertex program is correctly assigned because I log the vertex program name after calling addGroundPass(). Is there anyone who has a clue about this problem?
Toweli
Gnoblar
Posts: 8
Joined: Sat Sep 18, 2010 12:04 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by Toweli »

Where can I download SkyX sources? link in wiki broken.
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 plugin [SkyX 0.1 released! - Page 1]

Post by Xavyiy »

@Toweli
I know that all Hydrax/SkyX packages download links are broken at the moment, sorry for that. I've planed to re-upload all packages some days ago but due to a "extra" work I haven't found the time for doing it. Tomorrow morning I'll re-upload all latest versions and post on the forum these temporal links.

The fact is that http://www.rigsofrods.com has migrated to a new server and some services aren't yet available. (More info: at http://www.rigsofrods.com/content/114-W ... ods-forums )

Xavi
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 plugin [SkyX 0.1 released! - Page 1]

Post by Xavyiy »

Here are the new temporal download links:

SkyX 0.1 lib: http://www.megaupload.com/?d=28Y8SWA4
SkyX 0.1 precompiled demos: http://www.megaupload.com/?d=VYXRJHR3

Xavi!
XSampled
Gnoblar
Posts: 8
Joined: Mon Sep 13, 2010 9:38 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by XSampled »

Are there any changes since last SkyX 0.1 library. Bugfixes maybe? Is the moon still flickering as example.
Thank you
grol
Gnoblar
Posts: 9
Joined: Wed Apr 07, 2010 9:27 am

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by grol »

Has anybody run it with os x?

I've compiled ths glsl version and changed saturate to clamp (and validate the shaders), but when I run my project it crashes

I'll post the exact point when it crashes,in case anybody can help me, but by the way, anyone using it in os x?

thanks for your great job Xavyiy!
mamairaja
Halfling
Posts: 60
Joined: Fri Dec 25, 2009 3:31 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by mamairaja »

Hello
I couldn't understand whether this is a skyx related problem. I post it here because i don't know to do what.
In my scene I don't have any lights.
So when it comes to night my sky(skyx) is darker but the environment (terrain, trees, etc.. ) are not dark at all.
Here is a screenshot
Image
Do i need to setup a light and make it darker when the skyx says it's night? I mean when the sky is night do i have to make the environment darker by my self?
Please help
plfiorini
Gnoblar
Posts: 15
Joined: Thu Feb 21, 2008 8:24 am

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by plfiorini »

mamairaja wrote:Hello
I couldn't understand whether this is a skyx related problem. I post it here because i don't know to do what.
In my scene I don't have any lights.
So when it comes to night my sky(skyx) is darker but the environment (terrain, trees, etc.. ) are not dark at all.
Here is a screenshot
Image
Do i need to setup a light and make it darker when the skyx says it's night? I mean when the sky is night do i have to make the environment darker by my self?
Please help
In my project I've created two directional lights, one for the sun and on for the moon.
For each frame it sets the correct direction, specular and diffuse colours. Also, the ambient light gets changed at night.
When I'll be back at home, I will post my code here, but basically my goal (after some trys) was to achieve the same nice effect I've got when I was using Caelum.
mamairaja
Halfling
Posts: 60
Joined: Fri Dec 25, 2009 3:31 pm

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by mamairaja »

plfiorini wrote: In my project I've created two directional lights, one for the sun and on for the moon.
For each frame it sets the correct direction, specular and diffuse colours. Also, the ambient light gets changed at night.
When I'll be back at home, I will post my code here, but basically my goal (after some trys) was to achieve the same nice effect I've got when I was using Caelum.
Thank you for the reply. Any suggestion, code, example helps me much.
plfiorini
Gnoblar
Posts: 15
Joined: Thu Feb 21, 2008 8:24 am

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by plfiorini »

Here's the code, both lights are directional (moon direction is just sun direction * -1).
You can tweak and adjust the multipliers as you like.
Night lights are more blueish, but you can change it.

For a nicer look, SkyX's yellowish sunset colour should be changed to something more orange/red.

Code: Select all

void Sky::update(const Ogre::Real& elapsed)
{
    // We don't want to risk a segfault!
    if (!mSkyX)
        return;

    Ogre::SceneManager* sceneManager =
        Graphics::GraphicsManager::getSingleton().getSceneManager();

    Terrain* terrain = World::Scene::getSingleton().getTerrain();
    Ocean* ocean = World::Scene::getSingleton().getOcean();

    Ogre::Vector3 lightDir = mSkyX->getAtmosphereManager()->getSunDirection();

    // Calculate current colour gradient point
    float point = (-lightDir.y + 1.0f) / 2.0f;

    // 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
    mLight0->setDirection(lightDir);
    mLight0->setSpecularColour(ambCol * sunSpecularMult);
    mLight0->setDiffuseColour(sunCol * sunDiffuseMult);

    // Set moon direction and colours
    mLight1->setDirection(-lightDir);
    mLight1->setSpecularColour(moonCol * moonSpecularMult);
    mLight1->setDiffuseColour(moonCol * moonDiffuseMult);

    // Manage ambient light
    Ogre::ColourValue ambient = Ogre::ColourValue::Black
        + mLight0->getDiffuseColour() * sunAmbientMult
        + mLight1->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);

    // Set lightmap direction
    if (terrain && terrain->isCreated())
        terrain->setLightMapDirection(lightDir);

    if (ocean && ocean->isCreated()) {
        // Set sun position and colour
        ocean->setSunPosition(getSunPosition());
        ocean->setSunColour(sunCol);
    }

    // Update sky simulation
    mSkyX->update(elapsed);
}
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by LBDude »

I like to report broken links. All the links on first page failed for me. Thanks!

SORRY I FOUND THE LINK. Ignore this!
Last edited by LBDude on Tue Oct 19, 2010 8:04 am, edited 1 time in total.
My blog here.
Game twitter here
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by LBDude »

I'm looking into implementing spherical harmonics lighting with SkyX. Does SkyX already does this? I assume it doesn't. If I finish I will upload it somewhere.
My blog here.
Game twitter here
User avatar
Sieben
Halfling
Posts: 46
Joined: Wed Aug 18, 2010 4:24 pm
Location: Black Forest, Germany

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by Sieben »

I need an extra point light source in my skyx scene casting shadows as well, but adding a texture shadowTechnique gives me no shadow at all (ok, doesn't work for point lights unfortunately), adding a stencil shadowTechnique causes the skyx environment to disappear. Do you have a guess what to do? I tried a directional light source, but still that gave me no shadows.
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

Re: SkyX plugin [SkyX 0.1 released! - Page 1]

Post by LBDude »

Does it crash on anyone in debug mode in SkyX::MeshManager::create() under Ogre 1.8? SkyX works for me in release mode. I've been developing in release mode for awhile now today finally went back to debug mode (so the build can be faster).

Crashes on Resource on a call to memcpy during xstring.
My blog here.
Game twitter here