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'.Ahruman wrote: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.DaddyHoggy wrote:Wow!
Ahruham, the scale of your genius never ceases to amaze me...
Shaders’ Outpost
Moderators: winston, another_commander
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Ahh, but it isn’t “in”. Shaders are OXP components. Anyone could have implemented this, it doesn’t require any special support from Oolite.
E-mail: [email protected]
- Simon B
- ---- E L I T E ----
- Posts: 836
- Joined: Thu Oct 23, 2008 5:54 am
- Location: Red Beach NZ
- Contact:
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... :)
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
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
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.)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?
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.
E-mail: [email protected]
- Simon B
- ---- E L I T E ----
- Posts: 836
- Joined: Thu Oct 23, 2008 5:54 am
- Location: Red Beach NZ
- Contact:
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.
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
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Use an IDE. :-) Or perhaps a script to assemble the OXP from its logically-organized state…
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
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?
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?
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
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:Griff wrote:I'm getting really weird problems with it, in that oolite is choosing the wrong textures or something - is there a limit?
Code: Select all
#if OO_TEXTURE_UNIT_COUNT >= 5
// Do stuff involving the fifth texture here.
#else
// Do simpler approximation here.
#endif
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
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
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
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
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
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Oh, Griff if only you'd put out an appeal - I could have scanned in my original cover artwork at silly resolutions!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
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
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?
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?
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.zipGriff 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?
Download Fighter HUD, Stingray and System Redux from the EliteWiki