Page 6 of 6

Re: CCloudSceneNode - clouds with levels of detail

Posted: Mon Jul 08, 2013 8:39 pm
by hybrid
Also, we have irrext project, where all such projects can be hosted for unlimited access. But community has to take at least some work.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Mon Jul 08, 2013 10:09 pm
by robmar
Yes but how to make that happen... inspiration?

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 12:16 am
by hybrid
If someone wrote an extension which more than a few people think is useful, we (i.e. Irrlicht admins) will add the user to the irrext project, where he can place his software and continue development with all benefits from SF.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 7:40 am
by robmar
That would be good but I wonder if the skill level needed to take Irrlicht forward is beyond casual / part-time involvement.

Okay, Linux was to a large extent developed that way but it was also developed by and for universities, whose staff had salaries.

If one or two of you dedicated 5 days time you could add back the weather manager, true environment mapping, reflective surfaces etc., and maybe even include the latest DX11 driver, if those involved wanted to release their code updates.

That would give Irrlicht a major boost, but only if some exmples, as per 3D Labs from 2005, were included, which they could be quite easily.

I feel that if some of you don´t do that Irrlicht will continue to loose steam... which would be really a shame given all the effort to date.

Well, if its worth anything that´s my view.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 9:11 am
by hybrid
Well, this thread here is about the cloud scene node, so please leave it for this. If you feel to provide constructive criticism or useful suggestions, please find a thread over at the open discussion forum - or create a new one there.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 3:00 pm
by robmar
Okay, so is the irrWeathermanager open source because there are comments in the source saying its :-

irrWeatherManager weather system for the Irrlicht rendering engine.
Copyright (C) 2009-2010 Josiah Hartzell (Skyreign Software)

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 3:02 pm
by robmar
and :-

// Copyright (C) Pazystamo
// This file is part of the "irrWeatherManager" weather management library for the Irrlicht rendering engine.
// The code in this file was separated from its original file, and the code belongs to Pazystamo from the Irrlicht forums.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 3:04 pm
by robmar
and not sure if anyone can really copyright what is little more than standard 3D procedures, many of which are snippets from other people that was freely distributed.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Tue Jul 09, 2013 10:57 pm
by hybrid
Not sure where you are from, but most parts of the free world support a rather complete copyright system. Which means that most things that are produced by someone is automatically copyrighted. The hurdle to jump there is rather low, innovation starts almost immediately when writing things. I think I have the original wheather scene node from Pazystamo somewhere on my hdd, I think he gave this code free after the project was closed down.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Wed Jul 10, 2013 6:17 am
by robmar
If only life were so simple. Let us know maybe sometime if it is open source or not.

Re: CCloudSceneNode - clouds with levels of detail

Posted: Sat Jul 13, 2013 11:43 am
by robmar
Have found a little bug in the ICloudscenenode:-

Code: Select all

//! render
void ICloudSceneNode::render()
{
    video::IVideoDriver* driver = SceneManager->getVideoDriver();
    ICameraSceneNode* camera = SceneManager->getActiveCamera();
 
    if (!camera || !driver)
        return;
 
    // Calculate vectors for letting particles look to camera
 
// Robmar comment ?????? This may need a mod to stop clouds rotating with camera when view direction is up to sky!
    core::vector3df campos = camera->getAbsolutePosition();
    core::vector3df target = camera->getTarget();
    core::vector3df up = camera->getUpVector();
    core::vector3df view = target - campos;
    view.normalize();
 
    core::vector3df horizontal = up.crossProduct(view);
    horizontal.normalize();
 
    core::vector3df vertical = horizontal.crossProduct(view);
    vertical.normalize();
 
Now this code works okay until the camera looks up at the sky, right up, then spins around. Like as if you stand in a field, look up at the clouds, and spin yourself around...

The IClouds track the camera alright, but they spin with it too, causing a weird effect, that of the clouds spinning with you... the clouds start spinning in space, which is clearly not very realistic.

So for those geometrically minded its just a matter of having the clouds facing to camera, but stopping them rotating with it....

I think we need to mod the Up vector so that it does not rotate the clouds.... mmmm

Re: CCloudSceneNode - clouds with levels of detail

Posted: Sat Jul 13, 2013 12:39 pm
by robmar
Clouds need a horizontal vector based around sky top centre (0,1,0) : whichever side they are off the top 0,1,0 should be their horizon.

When exactly at 0,1,0 their horizon could be fixed along the X-axis 1,0,0.

So, a bit of vector math and the clouds will stop spinning in space

Re: CCloudSceneNode - clouds with levels of detail

Posted: Sat Jul 13, 2013 2:27 pm
by robmar
This seems to be a very quick fix for this issue:-

Code: Select all

 
up = core::vector3df(0.f,1.f,0.f);      // Fix up vector to stop spin-tracking of camera (clouds now only spin when camera tracks across the sky top spot (0,1,0) )
    core::vector3df horizontal = up.crossProduct(view);
    horizontal.normalize();
 
This removes the camera-cloud spin connection and works well until the gaze of the camera cross sky top spot (at maximum elevation).

Anyone interested in having a good cloud system... or has the code now been completed and only shared for those developing commercial games...? :)