
Neva
Nodrev wrote:Or alternatively, you can checkout this repository:
http://trac.arkeon.be/projects/so3engin ... /show/SkyX
It's a SkyX version that work both on DirectX/OpenGL (except a bug in VClouds), I had grabbed opengl shaders files somewhere on this (long) post.
CMake system too (althought it's not the same as Thoran's one), and it works with trunk version (1.8 ), so it should work with 1.7.
After taking a look at the SkyX_VolClouds.fragment shader I noticed it was missing one crucial line in the code.Kaylx wrote:Anyone got the GLSL shaders working with the SkyX Demo (2)? I get the program to run but I just end up with black clouds.
I've got the shaders compiling properly after replacing saturate( x ) with clamp( x, 0.0, 1.0 ).
I also added the missing unified SkyX_Ground_HDR_FP fragment program material definition (although i don't think it gets used).
Looking at the ogre log nothing stands out, the only thing is the 'Can't assign material _NULL_ to SubEntity of SkyXMeshEnt because this Material does not exist. Have you forgotten to define it in a .material script?'
Code: Select all
uniform float uInterpolation;
uniform vec3 uSunDirection;
uniform vec3 uAmbientColor;
uniform vec3 uSunColor;
uniform vec4 uLightResponse;
uniform vec4 uAmbientFactors;
uniform sampler3D uDensity0;
uniform sampler3D uDensity1;
uniform sampler2D uNoise;
varying vec3 o3DCoord;
varying vec2 oNoiseUV;
varying float oOpacity;
varying vec3 oEyePixel;
varying float oDistance;
void main(void)
{
vec3 noise = texture2D(uNoise, oNoiseUV*5.0).rgb;
vec3 final3DCoord = o3DCoord+0.002575*(noise-0.5f)*2.0;
final3DCoord.z = clamp(final3DCoord.z, 0.0, 1.0);
vec3 density0 = texture3D(uDensity0, final3DCoord).rgb;
vec3 density1 = texture3D(uDensity1, final3DCoord).rgb;
vec3 density = density0*(1.0-uInterpolation) + density1*uInterpolation;
vec3 finalColor = vec3(0,0,0);
float opacity = 0.0;
if (density.x > 0.0)
{
float cos0 = clamp(dot(uSunDirection,oEyePixel), 0.0, 1.0);
float c3=cos0*cos0;
c3*=c3;
float beta = c3*uLightResponse.y*(0.5f+0.5*density.y);
float sunAccumulation = clamp( beta+density.y*uLightResponse.x+pow(oDistance,1.5)*uLightResponse.w, 0.0, 1.0 );
float ambientAccumulation = clamp(uAmbientFactors.x + uAmbientFactors.y*o3DCoord.z + uAmbientFactors.z*pow(o3DCoord.z,2.0) + uAmbientFactors.w*pow(o3DCoord.z,3.0), 0.0, 1.0)*uLightResponse.z;
finalColor = uAmbientColor*ambientAccumulation + uSunColor*sunAccumulation; // <<<<< MISSING LINE <<<<<
opacity = (1.0 - exp(-density.x*(7.5-6.5*o3DCoord.z)))*oOpacity;
}
gl_FragColor = vec4(finalColor, opacity);
}
Please read the thread carefully, especially the last pages.Stinkfist wrote:...Also usage of cross-platform build system (f.ex. CMake) would be great too.
Xavyiy wrote:Hi all!
I've some good news: I've finally finish my exams! So I'll have a big part of the summer with a lot free time, perfect for large coding sessions!
About my priorities during the summer, I think the roadmap will be something like that:
1. Work on some aspects on the paradise engine engine.
2. Make the latest SkyX version(It's a little advanced than the official v0.1, I've been working on it about 1 year ago) and demos compile under Ogre 1.7.2 and also write native GLSL shaders.
3. Integrate SkyX in the Paradise Engine, adding to it the needed features to make it possible: multicamera support, etc.. (That must be the hardest point, maybe 2 weeks of work since it'll be the first plugin for the engine+editor)
4. Work on new SkyX features, such thunderstorm support, better under-horizont rendering, etc.
These four points must take me the most part of the summer, since at the same time I'll start to code a big set of materials for the (paradise) engine.
After that, I'll do the same thing with Hydrax, but since it's a lot more complex than SkyX, I've decided to start with this second one.
The idea is to have all this finished byt the end of november, so SkyX 0.2 must be released someday in setember/october and Hydrax v0.6 around december(since some features I want to work on must take me a long time...)
--------------------------------------------------------------------------------------
@Zeal
As far as I know, this it the best approach for bottom point of view volumetric cloud rendering. When I was designing the volumetric cloud system, I have been reading a lot of articles/methods, but all these methods was far from the results this approach is able to make.
Anyway, I think I'll be able to implement a cool thunderstorm/precipitation system, so... this will give to SkyX some extra points!
@Stinkfist
For future versions, I want to release them in some kind of code repository, but dunno if I'll choose a public one or maybe some repository system at paradise-studios server!
Xavier
So according to that static linking is out of the question if I want to keep my source private. Is this current, or is there a chance that the licensing has changed?Licensing: The Paradise Framework isn't yet available for licensing. Hydrax and SkyX are out of the comercial scope and future versions are going to be released under the LGPL terms.
How did you get it to work ? I'm getting:Sargo Darya wrote:Heya, just a short question. I can't seem to be able to checkout stuff from http://trac.arkeon.be/projects/so3engin ... yX/sources
Also, I'm on Mac and would like to get it to work there. Is there any actual repo already SkyX alone? Really would like to help with that.
Thanks in advance,
Sargo Darya
Edit: Well I finally got it to work, although it seems to be quite a bit fast. Going to write a blog post about it in the following few days with working GLSL shaders so I hope it will be helpful.
Code: Select all
Checkout from http://trac.arkeon.be/projects/so3engine/repository/show/SkyX/sources/v0-1-2, revision HEAD, Fully recursive, Externals included
Server sent unexpected return value (405 Method Not Allowed) in response to
OPTIONS request for 'http://trac.arkeon.be/projects/so3engine/repository/show/SkyX/sources/v0-1-2'
Thank you, I think the first post of this thread should be updated with this link, or a new thread made. I don't know the "big" changes that were made except the GLSL shaders.Sargo Darya wrote:If I did everything correctly you should find the file with the updated source and shaders here:
http://www.sargodarya.de/fileadmin/media/SkyX_2.zip