Page 18 of 32

Posted: Sun Mar 01, 2009 8:46 pm
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:

Posted: Sun Mar 01, 2009 8:53 pm
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.

Posted: Mon Mar 02, 2009 3:27 am
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... :)

Posted: Mon Mar 02, 2009 9:34 am
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.

Posted: Mon Mar 02, 2009 11:17 am
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.

Posted: Mon Mar 02, 2009 3:31 pm
by JensAyton
Use an IDE. :-) Or perhaps a script to assemble the OXP from its logically-organized state…

Posted: Thu Mar 12, 2009 12:03 am
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

Posted: Thu Mar 12, 2009 12:26 am
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

Posted: Thu Mar 12, 2009 8:50 am
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 :)

Posted: Fri Mar 13, 2009 3:40 am
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

Posted: Fri Mar 13, 2009 9:39 am
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:

Posted: Fri Mar 13, 2009 9:45 am
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:

Posted: Fri Mar 13, 2009 10:27 am
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?

Posted: Sun Mar 15, 2009 1:49 pm
by Vajo
I like the cube! Good work Griff.

Posted: Tue Mar 17, 2009 8:19 pm
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