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!
Post Reply
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 [Demo released - page 4!]

Post by Xavyiy »

Hey sinbad,
As I can see from nimble screenshots, seems that you use some kind of slices trough the volume data like the approach I use. Since I've only one volumetric texture with clouds data, good looking altocumulus/stratocumulus formations don't seem very hard to get, the really interesting part in a good cloud system is the cumulonimbus simulation.
Yesterday while uploading a video on youtube, I've seen a xna video with a great cumulonimbus like formations (Link here:http://www.youtube.com/watch?v=XlG2nwv9QAA , check just the first 30 seconds), he is using particles, so maybe some good particles for cumulonimbus simulation can be combinated with the current system for stratocumulus/altocumulus and get a decent and diverse cloud field.
And just a little question, is there any trick to minimize the fps impact when rendering the geometry slices in older cards? (Nvidia 6600-8600)

----
Here are some clouds lighting experiments:
http://www.youtube.com/watch?v=kYd1FXZxolg (HD!)
and as always, here the direct download link: http://modclub.rigsofrods.com/xavi/SkyX ... ghting.wmv [1280x800 - 16Mb]

Xavi
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Kencho »

Vectrex wrote:But.. idea's can't be ndaed? Can they?.. Daddy??
Depends. It can be considered an industrial secret as it states how a company does something in a way that is competitively advantageous to them, and thus can be kept secret by contract.
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Kencho »

The volumetric clouds in the video you posted use the same method used in Flight Simulator X(?). The results are pretty impressive and is not hard to do (as described by Niniane Wang), though I see many cons for a general use (they look horrid when seen right from above or below --overall I see them suitable for simulators and MMORPGs but not much more). You can watch this video to get an idea: http://www.ofb.net/~eggplant/clouds/Clo ... neWang.mpg

As for the scattering test, looks beautiful :)
Image
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by sinbad »

Xavyiy wrote:As I can see from nimble screenshots, seems that you use some kind of slices trough the volume data like the approach I use. Since I've only one volumetric texture with clouds data, good looking altocumulus/stratocumulus formations don't seem very hard to get, the really interesting part in a good cloud system is the cumulonimbus simulation.
Yes - like I say, I used a very similar approach to what you've gone with, and in fact your approach includes some factors I didn't get time to address, such as wind tracking to minimise resampling artefacts.
And just a little question, is there any trick to minimize the fps impact when rendering the geometry slices in older cards? (Nvidia 6600-8600)
Mostly this is about reducing fillrate, and the techniques you use are pretty common for dealing with any case of having large amounts of transparent objects:

- Use alpha rejection to reduce the fillrate where the result is completely transparent
- Use imposters for distant results, update less frequently & maybe cross-fade to allow lower frequency updates without noticeable jerks (I never had time to finish that)
- Limit the size of the slices that you render based on actual camera/volume intersection data (minimum upper & lower bounds, but could also generate box clusters).

@Kencho: I studied Wang's technique (along with many others!) and they can be great, but are still based on particle clusters of discrete clouds - they couldn't do arbitrary full-sky volumes. The multiple scattering work was useful though.
Vectrex wrote:But.. idea's can't be ndaed? Can they?.. Daddy??
Technically anything you work on for someone else can be NDA'd or otherwise covered by confidentiality clauses, unless the information emerges from some other source. I tend to err on the side of caution with research projects like this (rather than just implementations of public ideas, which are much easier to deal with); in this case I felt I could semi-join the discussion because Xavyiy already figured out his approach independently, and the advice above is general to any kind of volume / particle rendering. But I still can't spill the beans on anything novel that I researched until the owner decides to publish it, or someone else publishes the same thing. Them's the breaks when you get paid to do non-public research I'm afraid. Although, my NDA expires early next year I believe...
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Kencho »

Oh, of course hers is an impressive method (I still love watching that video!). I was considering adding it to Caelum, but I see a lot of flaws in dynamic environments. I was considering developing algorithms to auto-generate the clouds' particle sets based on physical conditions and hierarchical structures, but even if I could get rid of the strange look they have at very extreme angles, there's still a lot of trouble with dynamic lighting IMHO (remember her method was about tinting the clouds in MAX and a bit of dynamic lighting with a simple dot product), which is not-so-acceptable in dynamic atmospheric environments (again, in my honest opinion). It's a pity, but one can't have everything in this life :roll:
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Kencho »

Accidentally found this when looking for particles' turbulence. You might find it useful :)
http://dynamo.ecn.purdue.edu/~ebertd/pa ... A_2005.pdf
Image
User avatar
vilgeits
Goblin
Posts: 298
Joined: Tue Aug 02, 2005 10:41 pm

Re: SkyX plugin [Demo released - page 4!]

Post by vilgeits »

Just a little question ... if you have less clouds it will render faster? I mean if I have an almost clear sky it will render pretty fast?


Thans in advance.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Kencho »

Well, if Xavi does what Sinbad suggested about using the alpha rejection to reduce the fillrate, the performance will definitely be better with (almost) clear skies :)
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 plugin [Demo released - page 4!]

Post by Xavyiy »

Hi all!
Sorry for the delay, these last days I haven't had much free time.. anyway I've been working on SkyX.

Now the volumetric clouds core is separated from skyx core, them are in the same project, even in the same namespace (SkyX namespace for SkyX related classes and SkyX::VClouds namespace for vol clouds classes), but them are independent :)
In future versions(with more features, better efficiency, etc..) I'll separate the volumetric clouds core to give to Caelum(Or any other sky simulator, or just a skybox..) users the possibility of use this cloud system in their applications.

At the moment I've to work on clouds light scattering depending of the day time, and night cloud ilumination..
Too, I want to write a pretty starfield system(which will allow different star types, like flickering stars, little colored planets, etc..), the current one uses just a seamless starfield texture..

There is still a lot of work, but at the moment I'm in the right direction :)

About the release date, I've not idea, I think about August, anyway in the package I'll include:

Code: Select all

- SkyX sources/media
- SkyX demo application (With sources)
- SkyX-Hydrax demo application (With sources)
After releasing this first public test skyx version, I'll work on the 'Paradise codename demo', something like Tropics Unigine demo(http://unigine.com/download/), using Hydrax and SkyX(+HDR, DOF, Volumetric lighting, smooth texture shadows, etc..). At the same time I'll work on the second SkyX release and on the new 0.6 Hydrax version.
At the moment I don't know if I should use for the Paradise project current cvs head(1.7) or develop it under current stable Ogre 1.6 version, any advice?
-----------------------------

@sindab - Kencho
About using Alpha rejection, the problem is that I need semitransparent cloud areas.. anyway I've tried alpha rejection instead of alpha blend but the frame rate is similar on my 8600GT. Am I skipping something?

@vilgeits
At the moment you'll get the same frame rate with a clear sky that with a cloudy one, the frame rate bottleneck is related with the fillrate so.. newer cards mustn't have any kind of problem to obatin decent(150+) fps. Anyway there're a lot of customisable parameters(like number of geometry slices) that you can change in order to obtain better frame rates, with a little lost of visual quality.
------------------------------

P.D.: This sunday I go to Dublin for ten days(holidays) so.. I won't post these days. (12-22 July)

Xavi
compvis
Gremlin
Posts: 165
Joined: Wed Sep 10, 2008 6:14 am

Re: SkyX plugin [Demo released - page 4!]

Post by compvis »

wow, thank you so much !

"Paradise codename demo" will be the "open-source" ?
User avatar
Xplodwild
Goblin
Posts: 231
Joined: Thu Feb 12, 2009 3:49 pm
Location: France
x 13
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Xplodwild »

Xavyiy wrote:At the moment I don't know if I should use for the Paradise project current cvs head(1.7) or develop it under current stable Ogre 1.6 version, any advice?

For me, it would be better to use current CVS head so you're sure that your code will be up to date for a long time (and there's not much much differences between 1.6 and HEAD so, it will be easy to convert to 1.6 if needed). Also, using sinbad's Terrain can be a good test with it.
User avatar
Azgur
Goblin
Posts: 264
Joined: Thu Aug 21, 2008 4:48 pm

Re: SkyX plugin [Demo released - page 4!]

Post by Azgur »

I'm with 1.7 as well. It's where all the exciting stuff is happening atm.
We've got the new Ogitor branch shaping up really nicely. We've got paging and a new terrain in the works.
Add SkyX and Hydrax to it and 1.7 while be a whole new level of awesomeness when it goes out in the wild.

A question about the clouds, can they also be used in a more unusual matter?
For example, could they be used as fog below a floating playfield and blend nicely when it hits the edges of the playfield?
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Re: SkyX plugin [Demo released - page 4!]

Post by xadhoom »

Btw. regarding to jacmoes experience Hydrax does not seem to work with the latest changes in trunk...

Ok, actually this shouldn´t be a problem when developing an application because they normally stick with the sdk.
But in case of Ogitor development we are going with the trunk because we are already working on the terrain integration.

xad
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Kencho »

Xavyiy wrote:@sindab - Kencho
About using Alpha rejection, the problem is that I need semitransparent cloud areas.. anyway I've tried alpha rejection instead of alpha blend but the frame rate is similar on my 8600GT. Am I skipping something?
I would first do some early alpha rejection in the shader itself. For instance, if you know the volume data's alpha is zero, the final alpha is zero, so you can return a (0, 0, 0, 0) right at that point instead of doing all the noise, colour, scattering and so on before rejecting. Then, while using alpha blending, add an "alpha_rejection greater 0" statement in the material, so completely transparent pixels aren't even considered to be painted (if omitted, the result is the same but the overpaint isn't). That should let you save some framerate, specially if the sky has very few clouds :)
Image
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by sinbad »

Yeah, an alpha-reject threshold can still be useful even if you want semi-transparent areas, because it discards the fragment earlier from the pipeline where there would be no useful effect, before the read-modify-write stage. If it's not making any difference then it means that either you don't have enough cases where the rejection is helping (and it will help more the more hard-edges there are in parts of your clouds), or the bottleneck is not fillrate but probably pixel shaders instead (try NVPerfHUD).

Inside the shader, try adding some early-out conditions like Kencho says for profiles that support branching.
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: SkyX plugin [Demo released - page 4!]

Post by Zeal »

This stuff looks great, nice work!

Have you released any code yet? I would really love to see how you are generating your volume textures, how you are jittering them with noise, how you are doing lighting, ect...
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

Re: SkyX plugin [Demo released - page 4!]

Post by Ruud v A »

Looking great!

I have one question: how is this going to combine with shadows? It would be great to have the clouds cast (partially transparent) shadows on terrain or other geometry, and then see the shadows move on the ground...
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: SkyX plugin [Demo released - page 4!]

Post by boyamer »

hows development going?
Could we see some source code?Maybe for education purpose? :)
compvis
Gremlin
Posts: 165
Joined: Wed Sep 10, 2008 6:14 am

Re: SkyX plugin [Demo released - page 4!]

Post by compvis »

boyamer wrote:hows development going?
Could we see some source code?Maybe for education purpose? :)
WAIT !
User avatar
ToeNails
Gnoblar
Posts: 11
Joined: Thu May 28, 2009 12:41 am
Location: Floridea

Re: SkyX plugin [Demo released - page 4!]

Post by ToeNails »

If i'm not mistaken he's on vacation....

Give the guy some time will ya.
("\(>,<)/")
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 [Demo released - page 4!]

Post by Xavyiy »

@compvis
The idea is to release the 'Paradise codename' project sources with the final 1.0 version, along with a detailled PDF explaining all rendering techniques/technologies used in the demo(Hydrax, SkyX, HDR, DOF, Shadows, etc..) and how to integrate them in Ogre.
I think it can be very useful for people and, of course, for me knowledge.

@Azgur
For soft edge blendings, a soft-particles like approach it's needed, anyway this feature is in my todo list!

@xadhoom
To get Hydrax working with last Ogre sources, some little changes are needed, see: http://www.ogre3d.org/addonforums/viewt ... 20&t=10124 :)

@Kencho, sinbad
Okey, now the cloud material has alpha rejection enabled and conditions in the fragment program to avoid transparent pixels light calculation, anyway the frame rate is similar(a little better, but just 2-3-4 fps..), in a near future I'll look into the frame rate problem using NVPerfHUD as sinbad says. I'll post results!

@Zeal, boyamer
At the moment I haven't released any code, but don't worry, the plugin will be LGPL, like Hydrax :)

@Ruud v A
For shadows, I'll generate a little texture in the GPU based on current clouds volume data and sun direction, and then use it in the GPU for shadows, I'll do a little example, maybe for the second version.

-----------------------------
As ToeNails says, I had been on vacances for 10 days, so.. now it's time to continue the SkyX development!
-----------------------------

EDIT:

A 3d artist is needed for the 'Paradise codename' demo(Palm trees, little rocks, etc.. using normal mapping), I'll post an announce in some days in the Recruitment forum, but if someone is interested.. just send me a PM!
(Models like these: http://unigine.com/screenshots/ -> tropics demo).

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 [Demo released - page 4!]

Post by Xavyiy »

Just a little off-topic.
'Paradise codename' 3D artist recruitment: http://www.ogre3d.org/forums/viewtopic.php?f=9&t=51684, maybe you're interested! :)
User avatar
vilgeits
Goblin
Posts: 298
Joined: Tue Aug 02, 2005 10:41 pm

Re: SkyX plugin [Demo released - page 4!]

Post by vilgeits »

What you will use for HDR? HDRlib?
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 [Demo released - page 4!]

Post by Xavyiy »

vilgeits wrote:What you will use for HDR? HDRlib?
No, my idea is to code a new set of compositors for HDR, DOF and volumetric lighting.
Maybe I will pack them in a little plugin, I think it could be useful for some people :)
User avatar
Nargil
Greenskin
Posts: 124
Joined: Thu Feb 15, 2007 8:47 pm

Re: SkyX plugin [Demo released - page 4!]

Post by Nargil »

Xavyiy: you're a generuos man. You really should get paid for the things you do for the ogre3d community ;>
Hardcore libertarian, hardcore programmer.
Dell M6300: T9300, 4GB, Quadro FX1600M, 17" 1920x1200p non-glare, OCZ Vertex 120 + external Seagate 120GB 7200.3
Use the power of 2 - literally. Non 2^n texture sizes may crash your graphic driver
Post Reply