Posted: Tue Mar 24, 2009 11:09 am
I'm really rubbish at explaining stuff, but i made a pdf guide on how to take a greyscale image and a colour images and merge the 2 together using Gimp http://www.box.net/shared/jk87l4f0gw
Using the alpha channel for a 1 channel texture map (like a specular map or an illumination map) is a great way to save video memory as you can stuff them in the otherwise unused alpha channel of your ships 'skin' map.
Alpha channels are a confusing nightmare though, i've never found a proper way of removing an alpha channel from a png after it's been saved into it, so if anyone knows how to do this i'd really like to know (the only way i've found is to use amd's rendermonkey, it has a built in texture viewer that allows you to switch between the rgb and the alpha channels of a texture, then i do a screen grab of the channels i want and paste them into a new image file!)
The griff_cobra_III shaders are probably the most complex of the ones i've cobbled together from Ahrumans original shader code examples, i've written a little list of what texture maps it expects to see and in what order, but i don't know where it is at hte moment, it might even be in the oxp's readme!, i'll have a hunt about and post it up here when i find it.
here's a post i made a while back about painting out the 'effects map' (basically a texture map where each colour channel controls the strength of a shader effect - i'm using them to add in the glows around the ships engines and guns)
-------
Painting your own effects map can be a bit confusing especially if you try and split an image into seperate colour channels, you just end up with a series of greyscale images, it always gives me headaches, but there is a much simpler way of working, just create seperate layers for each colour 'channel' stack them above your usual texture map (diffuse map) and work by paining only red in teh red layer, blue in the blue layer and green in the green layer. When it comes time to save out your final effects map, just switch off the visibility of the diffuse map and a "save as.." so you can save out a copy of your effects map .png
-------
Here's the textures for my cobra3 & viper oxp's in psd format (photoshop format, but gimp should open them) so you can see all the layers and how i stack them up so i know where to paint effects and stuff, all the images that will go into the alpha channels are on seperate layers so you can see how they all fit together rather than looking at the final images in the oxp's which just look like odd patches of colour on a transparent background
http://www.box.net/shared/4jpsppapev
this isn't gospel, it's just the way i do it, have a look at SimonB's and Scarecrows texturing tutorials, those guys really know what they're doing!
----
edit: ah, found the list of the textures in the normal mapped version griff_cobra oxp:
colour map RGB channels = the colour texture for shader & non shader mode
colour map A channel = the specular intensity map for shaders mode
Effects map - R channel - the red hot metal around the 'rocket exhaust'
Effects map - B channel - the cyan coloured exhaust glow
Effects map - G channel - Mask 1 for the re-painting effect
Effects map - A channel - Mask 2 for the re-painting effect
Normal Map -RGB Channels - Used for normal Mapping
Normal Map -A Channel - Illumination map for the hull lights (including the faked spill light from the cockpit window)
Decal Map - RGBA Channels, 4 different decals in each channel arranged horizontally in the image, chosen randomly for NPC's fixed for the player version, see the uDecalSelect 'uniform' in the griff_cobraIII's shipdata.plist - it's bound to 'entitypersonality' - which is a number in the range 0.0 to 1.0 ranomly generated when the ship is spawned.
http://wiki.alioth.net/index.php/Shader ... :_uniforms
'uniforms' are used to send information from the oolite game engine to your shader
Using the alpha channel for a 1 channel texture map (like a specular map or an illumination map) is a great way to save video memory as you can stuff them in the otherwise unused alpha channel of your ships 'skin' map.
Alpha channels are a confusing nightmare though, i've never found a proper way of removing an alpha channel from a png after it's been saved into it, so if anyone knows how to do this i'd really like to know (the only way i've found is to use amd's rendermonkey, it has a built in texture viewer that allows you to switch between the rgb and the alpha channels of a texture, then i do a screen grab of the channels i want and paste them into a new image file!)
The griff_cobra_III shaders are probably the most complex of the ones i've cobbled together from Ahrumans original shader code examples, i've written a little list of what texture maps it expects to see and in what order, but i don't know where it is at hte moment, it might even be in the oxp's readme!, i'll have a hunt about and post it up here when i find it.
here's a post i made a while back about painting out the 'effects map' (basically a texture map where each colour channel controls the strength of a shader effect - i'm using them to add in the glows around the ships engines and guns)
-------
Painting your own effects map can be a bit confusing especially if you try and split an image into seperate colour channels, you just end up with a series of greyscale images, it always gives me headaches, but there is a much simpler way of working, just create seperate layers for each colour 'channel' stack them above your usual texture map (diffuse map) and work by paining only red in teh red layer, blue in the blue layer and green in the green layer. When it comes time to save out your final effects map, just switch off the visibility of the diffuse map and a "save as.." so you can save out a copy of your effects map .png
-------
Here's the textures for my cobra3 & viper oxp's in psd format (photoshop format, but gimp should open them) so you can see all the layers and how i stack them up so i know where to paint effects and stuff, all the images that will go into the alpha channels are on seperate layers so you can see how they all fit together rather than looking at the final images in the oxp's which just look like odd patches of colour on a transparent background
http://www.box.net/shared/4jpsppapev
this isn't gospel, it's just the way i do it, have a look at SimonB's and Scarecrows texturing tutorials, those guys really know what they're doing!
----
edit: ah, found the list of the textures in the normal mapped version griff_cobra oxp:
colour map RGB channels = the colour texture for shader & non shader mode
colour map A channel = the specular intensity map for shaders mode
Effects map - R channel - the red hot metal around the 'rocket exhaust'
Effects map - B channel - the cyan coloured exhaust glow
Effects map - G channel - Mask 1 for the re-painting effect
Effects map - A channel - Mask 2 for the re-painting effect
Normal Map -RGB Channels - Used for normal Mapping
Normal Map -A Channel - Illumination map for the hull lights (including the faked spill light from the cockpit window)
Decal Map - RGBA Channels, 4 different decals in each channel arranged horizontally in the image, chosen randomly for NPC's fixed for the player version, see the uDecalSelect 'uniform' in the griff_cobraIII's shipdata.plist - it's bound to 'entitypersonality' - which is a number in the range 0.0 to 1.0 ranomly generated when the ship is spawned.
http://wiki.alioth.net/index.php/Shader ... :_uniforms
'uniforms' are used to send information from the oolite game engine to your shader