Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Nov 19, 2017 5:44 pm

All times are UTC




Post new topic  Reply to topic  [ 411 posts ]  Go to page Previous 124 25 26 27 28 Next
Author Message
 Post subject: Re: Shaders’ Outpost
PostPosted: Sat Apr 28, 2012 3:12 am 
Offline
Commodore
Commodore
User avatar

Joined: Thu Nov 10, 2011 7:49 am
Posts: 248
Quote:
From lusting after the lovely planet screenshots going up in the 'progress' thread i dug out the old Earth example shader (based on the example shader in ATI's Rendermonkey) and added in a small rim light atmosphere effect i pinched off a shader tutorial website
Griff - do you mind if I include this in the sample SHADY_PLANETS oxp , for use as reference in getting planets with shaders and materials working ?

Also - regarding rim atmosphere effects , I have seen some use of a clever vertex shader to simulate this effect also (it does require additional geometry - perhaps the oolite planet atmosphere could use a similar method).

The code I think I found here
http://rapidlibrary.com/files/spo-sandb ... i89on.html
It produces an atmosphere halo like this
Image
I've yet to reproduce this with Oolite however I think with a couple of uniform bindings (radius and atmosphere radius) for the planet entity, it would be feasible.

_________________
Povray Planets - Planet textures for your galaxy


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Sat Apr 28, 2012 11:50 am 
Offline
Oolite 2 Art Director
Oolite 2 Art Director
User avatar

Joined: Fri Jul 14, 2006 12:29 pm
Posts: 2265
Location: Wales
Quote:
Griff - do you mind if I include this in the sample SHADY_PLANETS oxp , for use as reference in getting planets with shaders and materials working ?
Yes please do if it'll help you guys with the amazing looking work your doing with the planet code! This oxp is just my hamfisted mangling of a normal map shader Ahruman wrote just after normalmapping became available in Oolite and some bits of code (& textures) out of an example shader that ships with AMD/ATI's Rendermonkey. The atmoshpere 'rim light' bit comes from here http://entitycrisis.blogspot.co.uk/2011 ... hader.html
He has a link to slightly more advanced effect on that page that looks a bit like your screenshot but i couldn't get it working nicely in oolite (it looks OK on the dark side of the planet, but on the lit side the whole surface takes on the colour of the atmosphere rather than just limiting itself to a halo effect)
If you'd like the original rendermonkey shader code i can post it up here - it seems to have a lot of advanced stuff in it that probably doesn't apply to what Oolite needs)

There's some mad shader work here - way to advanced for me to understand, looks a lot like the effect in your screenshot!
http://http.developer.nvidia.com/GPUGem ... ter16.html

_________________
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Sat Apr 28, 2012 12:27 pm 
Offline
Commodore
Commodore
User avatar

Joined: Thu Nov 10, 2011 7:49 am
Posts: 248
Quote:
Quote:
Griff - do you mind if I include this in the sample SHADY_PLANETS oxp , for use as reference in getting planets with shaders and materials working ?
Yes please do if it'll help you guys with the amazing looking work your doing with the planet code!
Great - thanks. I will include it as a test case in the reference OXP.
Quote:
There's some mad shader work here - way to advanced for me to understand, looks a lot like the effect in your screenshot!
http://http.developer.nvidia.com/GPUGem ... ter16.html
Yup - that is the approach being taken in the shader in my previous screenshot, approximate simulation of scattering and the resulting decay of different frequencies of the transmitted light. Also too tricky for me to grasp right now. :?

_________________
Povray Planets - Planet textures for your galaxy


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Fri Oct 05, 2012 12:45 pm 
Offline
Retired Assassin
Retired Assassin
User avatar

Joined: Tue Feb 09, 2010 11:31 am
Posts: 8297
Location: Disunited Kingdom
I am currently developing a revolutionary player ship for OXP release sometime in the future. The 'nuts and bolts' of the project are taking shape and I am going to be looking at texturing the ship soon. However one area I still know nothing about is shaders, and I would like to offer a shader version of the ship alongside the normal diffuse/emission mapped version.
So, in a word, I will be looking for a volunteer to 'shaderify' the ship for me. There will be two models to 'skin'. I am not yet at the stage where this is necessary, but if anybody would be interested in looking at this for me some time, please get in touch.

_________________
Commander Smivs, the friendliest Gourd this side of Riedquat.


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Wed Oct 10, 2012 9:07 pm 
Offline
Oolite 2 Art Director
Oolite 2 Art Director
User avatar

Joined: Fri Jul 14, 2006 12:29 pm
Posts: 2265
Location: Wales
What sort of stuff do you want to do in the shader Smivs? You might not actually need them - there's lots of stuff you can do with 'Materials', [wiki]Materials_in_Oolite[/wiki] nearly all the shader effects in my shipset can be done with materials - i think the only things not supported are the engine/lasergun glows that change with speed/temperature and the random decals and paint colour stuff

_________________
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Thu Oct 11, 2012 1:53 am 
Offline
Commodore
Commodore
User avatar

Joined: Thu Nov 10, 2011 7:49 am
Posts: 248
Quote:
What sort of stuff do you want to do in the shader Smivs? You might not actually need them - there's lots of stuff you can do with 'Materials', [wiki]Materials_in_Oolite[/wiki] nearly all the shader effects in my shipset can be done with materials - i think the only things not supported are the engine/lasergun glows that change with speed/temperature and the random decals and paint colour stuff
This is very true. The way the ship is coming together at the moment it will probably be the usual suspects of diffuse,specular,normal,emission and illumination maps - all possible using the regular materials. Not sure if environment reflection mapping can be done there.

_________________
Povray Planets - Planet textures for your galaxy


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Thu Oct 11, 2012 6:16 am 
Offline
Grand Admiral Emeritus
Grand Admiral Emeritus
User avatar

Joined: Sat Apr 02, 2005 2:43 pm
Posts: 6657
Location: Sweden
Quote:
Not sure if environment reflection mapping can be done there.
Nope.

_________________
E-mail: jens@oolite.org


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Thu Oct 11, 2012 8:56 am 
Offline
Retired Assassin
Retired Assassin
User avatar

Joined: Tue Feb 09, 2010 11:31 am
Posts: 8297
Location: Disunited Kingdom
Quote:
Quote:
What sort of stuff do you want to do in the shader Smivs? You might not actually need them - there's lots of stuff you can do with 'Materials', [wiki]Materials_in_Oolite[/wiki] nearly all the shader effects in my shipset can be done with materials - i think the only things not supported are the engine/lasergun glows that change with speed/temperature and the random decals and paint colour stuff
This is very true. The way the ship is coming together at the moment it will probably be the usual suspects of diffuse,specular,normal,emission and illumination maps - all possible using the regular materials. Not sure if environment reflection mapping can be done there.
I can see I will need to expand my knowledge a bit here. Diffuse, emission and illumination maps I'm OK with, but have not dabbled with normal and specular maps, largely because my computer has not been good enough to use these! However a recent upgrade has made all things possible :)
My original thought was to offer two versions of the OXP, one with full shaders and one for non-shader machines relying just on diffuse and emission maps. It seems this may not be necessary, and that a 'materials' based version may be equally good for shader and non-shader computers.
@ submersible - I'll stay in touch via PM
@Griff - Many thanks for the offer of help. While I may not need to ask you to 'do' anything, I can see me needing some advice and explanations as to how to do things and how things works. :)

_________________
Commander Smivs, the friendliest Gourd this side of Riedquat.


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Thu Oct 11, 2012 9:39 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sat Oct 20, 2007 2:52 pm
Posts: 2267
To get a feeling for the supported keys you could try the [wiki]Cabal_Common_MaterialsFinder[/wiki].
This way you can play around with different settings and watch it in the game.


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Mon Oct 15, 2012 7:24 pm 
Offline
Grand Admiral Emeritus
Grand Admiral Emeritus
User avatar

Joined: Sat Apr 02, 2005 2:43 pm
Posts: 6657
Location: Sweden
It’s only a proof of concept, and focussed on 2D, but anyone interested in shaders should take a look at http://pixelshaders.com. (A modern browser with WebGL enabled is required for best effect.)

_________________
E-mail: jens@oolite.org


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Tue Oct 16, 2012 5:44 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Dec 05, 2006 9:43 pm
Posts: 8501
Location: Newbury, UK
Quote:
It’s only a proof of concept, and focussed on 2D, but anyone interested in shaders should take a look at http://pixelshaders.com. (A modern browser with WebGL enabled is required for best effect.)
Excellent - I've made a note of the site for my students when they take their Computer Graphics module of their course.

_________________
Quote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Tue Oct 16, 2012 12:39 pm 
Offline
Commodore
Commodore
User avatar

Joined: Thu Nov 10, 2011 7:49 am
Posts: 248
Quote:
Quote:
Not sure if environment reflection mapping can be done there.
Nope.
And it's a big Nope too. I think all my attempts at funky environment lighting are defeated because I cannot grasp the matrix math to get normals and positions back into world space. Would it be possible to hack a model-only matrix into the default uniforms ?

_________________
Povray Planets - Planet textures for your galaxy


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Sun Jun 09, 2013 9:29 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Tue Sep 07, 2010 2:23 pm
Posts: 803
Well, having successfully downloaded and built Oolite from source, and then discovered that not only is it running at an acceptable frame rate, but I can also have "simple" shaders enabled, I was rather excited! Since I've been getting to grips quite nicely with GLSL in my own projects, I've been rummaging through the Oolite documentation on the wiki, and I have a question...

What are the light sources that are exposed to the shaders? THe example shader on the "Shaders in Oolite page calls gl_LightSource[0], but I'm not sure what this corresponds to. Is it the light attached to the camera, or something else? Similarly, is there a light source representing the sun, or not?
Quote:
Quote:
There's some mad shader work here - way to advanced for me to understand, looks a lot like the effect in your screenshot!
http://http.developer.nvidia.com/GPUGem ... ter16.html
Yup - that is the approach being taken in the shader in my previous screenshot, approximate simulation of scattering and the resulting decay of different frequencies of the transmitted light. Also too tricky for me to grasp right now. :?
I've had some success in using his shaders for the atmosphere from the sky in my own stuff, so I'm curious as to the state of your shady-planets branch. I attempted to compile it, and Oolite runs, but I get a whole host of errors in the log, and no shady planets at all...


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Sun Jun 09, 2013 9:55 pm 
Offline
Grand Admiral Emeritus
Grand Admiral Emeritus
User avatar

Joined: Sat Apr 02, 2005 2:43 pm
Posts: 6657
Location: Sweden
Quote:
What are the light sources that are exposed to the shaders? THe example shader on the "Shaders in Oolite page calls gl_LightSource[0], but I'm not sure what this corresponds to. Is it the light attached to the camera, or something else? Similarly, is there a light source representing the sun, or not?
Whoops! Someone should update that example. *Rolls thumbs, whistles tunelessly*

For historical reasons, only gl_LightSource[1] is used in Oolite. It represents the sun, or the showroom light, or an unspecified light source in interstellar space.

For ambient light, use gl_LightModel.ambient, not gl_LightSource[0].ambient.

_________________
E-mail: jens@oolite.org


Top
   
 Post subject: Re: Shaders’ Outpost
PostPosted: Sun Jun 09, 2013 10:34 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Tue Sep 07, 2010 2:23 pm
Posts: 803
Cheers, that clears that up! I'll continue perusing examples in oxps to get an idea of how to use the various Oolite parameters available, and then have a go at writing my own. No doubt if it all goes wrong I'll be back with a few other questions...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 411 posts ]  Go to page Previous 124 25 26 27 28 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited