Shaders’ Outpost
Moderators: winston, another_commander
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Nope. The infrastructure is mostly there, though, so I can add it for 1.71. Until then, you’re stuck with doing one float per channel.
Edit: added; also added ability to set constant quaternion uniforms as matrix (default) or vector (by adding asMatrix = no to binding dictionary).
Edit: added; also added ability to set constant quaternion uniforms as matrix (default) or vector (by adding asMatrix = no to binding dictionary).
E-mail: [email protected]
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
well, i dug my shaders for game artists book out again with the idea of reading up on how corona effects are done around light sources - which turned out to be in a whole chapter of the book that dealt with lots of interesting effects - blurs, colour manipulation etc.
Right, i'm completely out of my depth here, but it looks like these effects mostly seem to be done by rendering the normal camera view to a seperate 'offscreen' texture, which is then manipulated by shader code to get the desired effect, before then being re-combined with the normal camera view and finally sent out to the screen for the player to see, is that right?
Am i right in thinking this 'rendering to offscreen textures' part of the process can only be done by programming it into the oolite graphic engine, it's not something you can do in glsl? i'm just asking because i'm kind of interested in these effects but i don't want to spend much time worrying about them if the technique to achieve them isn't supported in Oolite - uh, that's not a feature request by the way
Edit: just started flipping through pages at random, oo, this sounds interesting, 'polynormal texture mapping' - self shadowing bumpmaps!
Right, i'm completely out of my depth here, but it looks like these effects mostly seem to be done by rendering the normal camera view to a seperate 'offscreen' texture, which is then manipulated by shader code to get the desired effect, before then being re-combined with the normal camera view and finally sent out to the screen for the player to see, is that right?
Am i right in thinking this 'rendering to offscreen textures' part of the process can only be done by programming it into the oolite graphic engine, it's not something you can do in glsl? i'm just asking because i'm kind of interested in these effects but i don't want to spend much time worrying about them if the technique to achieve them isn't supported in Oolite - uh, that's not a feature request by the way
Edit: just started flipping through pages at random, oo, this sounds interesting, 'polynormal texture mapping' - self shadowing bumpmaps!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Correct. And no, not gonna happen.Griff wrote:Am i right in thinking this 'rendering to offscreen textures' part of the process can only be done by programming it into the oolite graphic engine, it's not something you can do in glsl?
I really should get around to adding tangent information, shouldn’t I?Griff wrote:Edit: just started flipping through pages at random, oo, this sounds interesting, 'polynormal texture mapping' - self shadowing bumpmaps!
Incidentally, I just noticed that the emission property for default-shader materials is broken; the specular colour is used instead of the emission colour. (It works fine with shaders off, and is fixed for 1.71.)
E-mail: [email protected]
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Ah well, nevermind, you've already given us loads of cool graphics possibilities!Ahruman wrote:Correct. And no, not gonna happen.
About the Tangent lighting thing, my shader book has an example vertex shader that ''..illustrates a basic
implementation of how you can determine the tangent space for a simple light"
any use to you as reference if i type it out here? it's only about 30 short lines of code so it's no big problem doing it - not that i'm trying to suggest you don't know how to write one of your own Oh, it's in HLSL though.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
I've been mucking around a bit more with the heated metal effect from the glowing alloy shader and thought i'd apply it to one of the station models since i think we're missing one of the missions from the spectrum version of Elite? (i don't know how to the the 'spoiler' thing to hide text so i won't go into details about which mission is missing).
I wanted to try the 'discard' thing to give crinkly edges to the polygons too.
Griff_burning_coriolis
http://www.box.net/shared/kqz9yeftw8 (1Mb)
I wanted to try the 'discard' thing to give crinkly edges to the polygons too.
Griff_burning_coriolis
http://www.box.net/shared/kqz9yeftw8 (1Mb)
Got to say, it is amazing, as always!
Btw I've written a spoiler here:hello everybody. the original code isYou'll need to change the 'color' value to match the background colour, of course.
Edit: Now you've got to tell us what the missing mission was!
Btw I've written a spoiler here:hello everybody. the original code is
Code: Select all
[color=#eeeeff][b]hello everybody[/b][/color]
Edit: Now you've got to tell us what the missing mission was!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Cheers Kaks for the spoiler tutorial!
uh, i think i might have got my wires crossed with the missing mission, i thought it was...
...Spoiler:You are sent to defend a station that is under attack by Thargoids
which i thought might be easily scriptable, but it look like it really is this...
...Spoiler:You are sent to destroy a space station overrun with Thargoids, you get a new Elite Rank of Archangel and a new Galaxy (Galaxy 9) becomes available
Which seems like it needs a whole load of new features written into the game itself.
Most of the credit for the oxp should really go to OpenGl and the shader code Ahruman wrote for the Shady Cobra oxp, i've just been cribbing everything from that and clone brushing gritty metal textures around in photoshop, but don't tell anyone!
uh, i think i might have got my wires crossed with the missing mission, i thought it was...
...Spoiler:You are sent to defend a station that is under attack by Thargoids
which i thought might be easily scriptable, but it look like it really is this...
...Spoiler:You are sent to destroy a space station overrun with Thargoids, you get a new Elite Rank of Archangel and a new Galaxy (Galaxy 9) becomes available
Which seems like it needs a whole load of new features written into the game itself.
Most of the credit for the oxp should really go to OpenGl and the shader code Ahruman wrote for the Shady Cobra oxp, i've just been cribbing everything from that and clone brushing gritty metal textures around in photoshop, but don't tell anyone!
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Commander McLane, you're more than welcome to use the station in an oxp, i can't see myself doing any scripting with it so i'd love to see it put to good use somewhere - it should work just like any normal station and the docking bay is the same size as the original coriolis model built into the game.
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
That's been on my wish list ever since Frontier:Elite 2!ovvldc wrote:Perhaps it could be set up to load your favourite 1st/3rd person shooter game when you enter?
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
updated version of a griff_krait ship with a new glowing laser effect.
download it here:http://www.box.net/shared/p0feglnwos
edit: fixed the link: http://www.box.net/shared/6ugzbf1ofo
this makes use of a new ability in Oolite 1.71 to bind shader uniforms to subentities! there's a short topic about it here: https://bb.oolite.space/viewtopic.php?t=4063
download it here:
edit: fixed the link: http://www.box.net/shared/6ugzbf1ofo
this makes use of a new ability in Oolite 1.71 to bind shader uniforms to subentities! there's a short topic about it here: https://bb.oolite.space/viewtopic.php?t=4063
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Does Oolite support Cubemaps? (textureCube)
I've been mucking about with them in rendermonkey and you can get some really neat chrome effects, excuse the screenshot, rendermonkey only supports cubemaps in .dds format, i'm not quite sure what they are so i'm using one of it's built in example cubemaps of a snowy landscape, you can see it in the screenshot as snow.dds
I've downloaded a few free cubemaps and they just seems to be 6 png images for each of the axis of the 'cube'
edit:
the example on this page http://www.ozone3d.net/tutorials/glsl_texturing_p04.php
does a similar thing but doesn't need a cubemap, i've added it into a oxp here, it looks a bit wonky though, i must have something wrong with the maths in the vertex shader
download it here http://www.box.net/shared/akiil10sog
The oxp puts 4 chrome griff_kraits tumbling outside the station when you launch, there's something odd going on with the environment map though, it streaks a lot along some of the polygons, maybe something to do with the topology of the model?
I've been mucking about with them in rendermonkey and you can get some really neat chrome effects, excuse the screenshot, rendermonkey only supports cubemaps in .dds format, i'm not quite sure what they are so i'm using one of it's built in example cubemaps of a snowy landscape, you can see it in the screenshot as snow.dds
I've downloaded a few free cubemaps and they just seems to be 6 png images for each of the axis of the 'cube'
edit:
the example on this page http://www.ozone3d.net/tutorials/glsl_texturing_p04.php
does a similar thing but doesn't need a cubemap, i've added it into a oxp here, it looks a bit wonky though, i must have something wrong with the maths in the vertex shader
download it here http://www.box.net/shared/akiil10sog
The oxp puts 4 chrome griff_kraits tumbling outside the station when you launch, there's something odd going on with the environment map though, it streaks a lot along some of the polygons, maybe something to do with the topology of the model?
Last edited by Griff on Fri May 09, 2008 8:34 am, edited 2 times in total.