Shaders’ Outpost

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Ahruman wrote:
DaddyHoggy wrote:
:shock: Wow!

Ahruham, the scale of your genius never ceases to amaze me...
Thanks, but I just read about this on the intertubes last week. It’s very easy to implement, most of the time was spend writing support functions in the tool that generates the distance map.
You really should take the "Scotty" stance on such matters! If you hadn't thought of including it, it wouldn't be in, and therefore I declare you 'genius'. :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Ahh, but it isn’t “in”. Shaders are OXP components. Anyone could have implemented this, it doesn’t require any special support from Oolite.
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Post by Simon B »

Hmmm... I'm keeping an eye out for things which will help my decal problem (want to use lower res color maps, but scaling the current ones down blurs the hull markings too much.) This sort of thing could go a long way - but how do we get a little Q on to a particular place on the hull? Presumably by using the current full-texture coordinates?

But I mean - way to slow down neolites shaders... :)
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Simon B wrote:
but how do we get a little Q on to a particular place on the hull? Presumably by using the current full-texture coordinates?
I did a series of posts on applying decals by fiddling with texture coordinates in the shader, starting here. (On reflection, it ought to be doing some of the coordinate transformation work in the vertex shader. Also, the alpha blending should use the mix() built-in. Oh well.)

This wouldn’t scale well to multiple decals, though. If you had many decals all over the ship, using a single distance map covering the whole ship would still give you sharper edges for those parts, with “only” the cost of one additional texture map (for instance, two 128 × 128 textures might give you a better look than one 256 × 256 one using twice as much memory). You might also consider a distance map with several decals mapped to an area of the ship using the decal shader technique above.
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Post by Simon B »

Thanks - right now I'm just using the same texture for shaded and unshaded versions and leaving these tricks for when the effects and normal maps are done.

The decal scheme should work to allow smaller maps - good. Now I really must focus.

It would be tidier to be able to keep additional textures soted to different directories though. For a 1-2 ship oxp it is not too bad, but that textures directory is starting to need search tools to look through.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Use an IDE. :-) Or perhaps a script to assemble the OXP from its logically-organized state…
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

sorry to be a massive pain, but could someone with a trunk build of oolite test this oxp out for me:
http://www.box.net/shared/5sc1u8qfp6
I'm getting really weird problems with it, in that oolite is choosing the wrong textures or something - is there a limit? it seems that after the 4th texture in the list, oolite either stops loading them or it's choosing the wrong ones in the shader - i've found that be re-ordering the textures in the shipdata .plist (and also in the uniforms list in the shader .fragment file) i can get effects to work that previously were not working because the relevant textures were being ignored or mixed up with other textures - is there a max number of textures you can pipe to a shader?

If you download the oxp and start the game, a few of these ships should be spawned outside the station - it looks like the diffuse map, the effects map, the normal map and the reflection map are all working but the decal map (which propvides the 06 in the image below) is missing and if you shoot the ship to turn it hostile it will start pulsing purple all over it's hull even though the effect should be limited to the edges of the ship but it's not as the texture map to control this effect isn't loading as it's the 6th one in the list, the decal is 5th in the list - is there a maximum number of 4 textures?
Image
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Griff wrote:
I'm getting really weird problems with it, in that oolite is choosing the wrong textures or something - is there a limit?
Yes. The limit is implementation-dependent, and I believe four is the minimum. The limit is available in the shader through the macro OO_TEXTURE_UNIT_COUNT, so you can do things like:

Code: Select all

#if OO_TEXTURE_UNIT_COUNT >= 5
    // Do stuff involving the fifth texture here.
#else
    // Do simpler approximation here.
#endif
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Thank you Ahruman, I'll add that macro into the shader, although i've been thinking i may ditch some of these extra effects (such as the relection map) and put the 'emergency lights' back as subentity 'flashers' rather than as a shader effect, that should get the number of textures back down to a more sane four :)
aceshigh
Competent
Competent
Posts: 50
Joined: Thu Mar 05, 2009 6:09 am
Location: Novo Hamburgo, Brazil

Post by aceshigh »

Griff, your textures look amazing... but this looks quite like a Borg Cube.
Image

I wonder if you could use the same texture and shaders but with a whiter material, to achieve the effect of a modern, rich system Coriolis Station like in the famous Elite DarkWheel cover

Image
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Yeah, my version it is a bit shabby looking, i went looking for images of the dark wheel cover before starting to paint the texture but i could only find a few small thumbnails, mind you, i doubt i could have matched the original artwork that closely anyway.
As to modifying my texture to make it look more like the painting, i'm not sure how it would work out, there's lots of extra lines and messy stuff in my texture that are not in the painting - so it might be easier to start again from scratch. I'm not that enthusiastic to paint another station texture at the moment though, they take me ages :lol:
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Griff wrote:
Yeah, my version it is a bit shabby looking, i went looking for images of the dark wheel cover before starting to paint the texture but i could only find a few small thumbnails, mind you, i doubt i could have matched the original artwork that closely anyway.
As to modifying my texture to make it look more like the painting, i'm not sure how it would work out, there's lots of extra lines and messy stuff in my texture that are not in the painting - so it might be easier to start again from scratch. I'm not that enthusiastic to paint another station texture at the moment though, they take me ages :lol:
Oh, Griff if only you'd put out an appeal - I could have scanned in my original cover artwork at silly resolutions! :) :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

you know i never thought to ask on the boards, it would have been the perfect place! i got excited a few weeks ago when i found my c64 elite manual & ship identification chart, but no sign of the novella.
This Oliver Fey cover for zzap64! always struck me as being very cool
http://en.wikipedia.org/wiki/Zzap64
although there are no stations in it unfortunately.

I was thinking, hasn't captkev made a shiny dodo station? i remember a few screenshots being posted, it looked loverly, it had a aztec symbol on one of the sides i think? PAGroove also have a set of futuristic stations in the pagroove_stations oxp, that are well worth installing although they don't try to recreate the dark wheel artwork if that's what you're after.
maybe it's fitting that the coriolis are shabby and the dodos are more like the dark wheel cover - all gleaming and clean and high-tec?
User avatar
Vajo
Competent
Competent
Posts: 32
Joined: Thu Apr 05, 2007 10:12 am

Post by Vajo »

I like the cube! Good work Griff.
Beam me up!
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Griff wrote:
I was thinking, hasn't captkev made a shiny dodo station? i remember a few screenshots being posted, it looked loverly, it had a aztec symbol on one of the sides i think?
You're right Griff, I'm not sure if I ever made it available for download. Here's the link http://download.marlinsoftware.co.uk/Oo ... ations.zip
Download Fighter HUD, Stingray and System Redux from the EliteWiki
Post Reply