Page 2 of 4

Posted: Sun Jun 27, 2010 9:49 am
by Smivs
Ahruman wrote:
Run, don’t walk, to the material test suite and compare it against the sample screen shots. The most interesting one is test six; compare it to the sample screen shot. If you can see the blueish spotlight effect, the glowing green ring (unfortunately not very obvious, but in shadow it should have a green tint) and the white 6, you’re seeing a diffuse map, an emission map and an illumination map all at once.
I don't think I'm seeing what I should.
Test 5 doesn't seem to be illuminating...looks the same as the diffuse map only.

Image

Test 6 seems to be 'emitting', perhaps with some illumination, but no hint of colour anywhere.

Image

From the log :-

Code: Select all

========== [Marker 1] ==========
[materialTest.start]: Starting material test suite 1.0 under Oolite 1.74 and Linux (x86-32 test release) with OpenGL renderer "Mesa DRI Intel(R) G33 GEM 20090712 2009Q2 RC3 x86/MMX/SSE2", vendor "Tungsten Graphics, Inc"; shaders are not supported.
[materialTest.runTest]: Running test fixed-function:1 (diffuse_map).
[materialTest.runTest]: Running test fixed-function:2 (diffuse_map + emission_map).
[materialTest.runTest]: Running test fixed-function:3 (emission_map only).
[materialTest.runTest]: Running test fixed-function:4 (diffuse_map + illumination_map).
[materialTest.runTest]: Running test fixed-function:5 (illumination_map only).
[screenshot]: Saved screen shot "oolite-085.png" (1440 x 900 pixels).
[materialTest.runTest]: Running test fixed-function:6 (diffuse_map + emission_map + illumination_map).
[screenshot]: Saved screen shot "oolite-086.png" (1440 x 900 pixels).
[materialTest.runTest]: Running test fixed-function:7 (diffuse_map + emission_and_illumination_map).
[materialTest.complete]: Shader test suite complete.
Does this help?

Posted: Sun Jun 27, 2010 10:15 am
by Eric Walch
Smivs wrote:
Ahruman wrote:
Run, don’t walk, to the material test suite and compare it against the sample screen shots. The most interesting one is test six; compare it to the sample screen shot. If you can see the blueish spotlight effect, the glowing green ring (unfortunately not very obvious, but in shadow it should have a green tint) and the white 6, you’re seeing a diffuse map, an emission map and an illumination map all at once.
I don't think I'm seeing what I should.
Test 5 doesn't seem to be illuminating...looks the same as the diffuse map only.
When comparing with the screen samples Arhruman put on the wiki, I think your cube is okay. When I remember right, not all cubes are created the same way. I think nr 5 is only defined as a plain black cube as base, with the number 5 and the circle added through the illumination map.

Posted: Sun Jun 27, 2010 10:39 am
by JensAyton
Test 5 is correct (note that the 5 is fully visible on the side in shadow; the 5 and the ring are the illumination map). Test 6 appears to be missing its emission map. Not sure how that could possibly happen in non-shader mode… To confirm, please download the updated version of the test suite. I suspect there won’t be a ring in test 6.

Posted: Sun Jun 27, 2010 10:51 am
by Smivs
Ahruman wrote:
Test 5 is correct (note that the 5 is fully visible on the side in shadow; the 5 and the ring are the illumination map). Test 6 appears to be missing its emission map. Not sure how that could possibly happen in non-shader mode… To confirm, please download the updated version of the test suite. I suspect there won’t be a ring in test 6.
OK, just done that, to me it looks better. There's definitely colour there now. The ring also seems to be present!

Image

Posted: Sun Jun 27, 2010 12:19 pm
by JensAyton
Getafix has produced a testing build with extra facilities for testing non-shader glow maps. Download

Note that this package will replace your current install. (It’s based on what will soon be released as Oolite 1.74.1.)

When using this version, the game will spit out images for each step involved in converting coloured emission maps and illumination maps into a single ready-to-use emission map. Please run it with the material test suite and confirm that the generated files match these. (The files will appear in ~/oolite-saves/snapshots/. If you have other OXPs installed, additional files may be generated and the numbers may differ.)

You can also run it with your own OXP to see what Oolite is doing with your textures. If it doesn’t provide any insight, please send me the generated files so I can stare at them for a bit. :-)

Posted: Sun Jun 27, 2010 8:11 pm
by Smivs
Success at last! I really couldn't tell you what I did different, but I just had another go at bringing all the pieces together, and it worked. :)
The only thing I'm not sure about is the level of the illumination. It looks good when the ship is in darkness, but facing the sun with full light falling on it, the illumination seems too much and everything looks washed out. How can I reduce the lighting effect?
Below is a composite image of my python showing these two. I must point out that the illumination map was made hastily for test purposes. It looks pants and I promise the final version will be much more arty. :P

Image

Posted: Sun Jun 27, 2010 8:39 pm
by JensAyton
Smivs wrote:
The only thing I'm not sure about is the level of the illumination. It looks good when the ship is in darkness, but facing the sun with full light falling on it, the illumination seems too much and everything looks washed out. How can I reduce the lighting effect?
Didn’t we have this bit of the conversation already? ;-)

The best way is to simply darken the light map. The less best way is to use illumination_modulate_color = (0.3, 0.3, 0.3); (or some other grey value), and emission_modulate_color for the emission map.

One advantage of foo_modulate_color is that you can use a greyscale texture and recolour it, which saves memory on systems with shaders but just causes extra work on systems without.

Posted: Sun Jun 27, 2010 10:24 pm
by Smivs
Ahruman wrote:
Smivs wrote:
The only thing I'm not sure about is the level of the illumination. It looks good when the ship is in darkness, but facing the sun with full light falling on it, the illumination seems too much and everything looks washed out. How can I reduce the lighting effect?
Didn’t we have this bit of the conversation already? ;-)
Sorry, yes we did.
I really appreciate all the help, it's been fun learning this. Many thanks.
:)

Re: Help needed with light-maps

Posted: Thu Jul 01, 2010 1:19 pm
by Smivs
Ahruman wrote:
The suggested approach is to convert the maps into a single emission map.
In a layer-based editor such as Photoshop, Acorn or GIMP: put the diffuse map in the bottommost layer, then the illumination map in Multiply mode, then the emission map in Lighten mode.
Hi, I'm back again, I'm afraid. The good news is I've got all the parts working now, and things are starting to look pretty good.
The bad news is I have only got it working with separate texture (diffuse map), emission map and illumination map...3 graphics for each ship!
For the life of me I can't get this layered thing working at all.
If I follow the instructions above, the illumination map and emission map work but are applied to the default Oolite texture, with only the parts of my texture which are illuminated showing.
The 3-layer image created looks odd to the human eye, because the black background to the emission and illumination maps cover the base texture. Is this right? Giving them transparent backgrounds seems to kill the diffuse map, so all I get is the default Oolite texture, but very bright.
Just to confirm, I'm applying my diffuse map (texture) as layer one in Normal mode, the illumination map is layer two in Multiply mode and the emission map goes on last as layer three in Lighten Only mode. This is using Gimp.
I guess I must be doing something wrong...any ideas?

Posted: Thu Jul 01, 2010 2:53 pm
by DaddyHoggy
I didn't get anywhere with illumination maps when I was building Tycho 8 - Ahruman helpful told me that my illumination map should have worked - it just didn't... :roll:

I'd love to be able to help, but I've not had chance to pick through the Material Test file and to see if I can apply those techniques (which clearly do work) to my own models.

Posted: Thu Jul 01, 2010 3:55 pm
by Smivs
DaddyHoggy wrote:
I didn't get anywhere with illumination maps when I was building Tycho 8 - Ahruman helpful told me that my illumination map should have worked - it just didn't... :roll:
Frustrating, isn't it :x
DaddyHoggy wrote:
I'd love to be able to help, but I've not had chance to pick through the Material Test file and to see if I can apply those techniques (which clearly do work) to my own models.
I've been looking at this a lot lately, but unfortunately it doesn't seem to contain a combined diffuse map, illumination map and emission map, so I have no reference point. :cry:

Posted: Fri Jul 02, 2010 5:54 am
by ADCK
Hmm, the hull spotlights on your ship could use some work, try bluring the edges a few times, and make it more darker (blacker) the further away from the light source it is, here's an example:

Image

Posted: Fri Jul 02, 2010 1:44 pm
by Smivs
ADCK wrote:
Hmm, the hull spotlights on your ship could use some work, try bluring the edges a few times, and make it more darker (blacker) the further away from the light source it is,
Hi ADCK,
Yes, I know. I only posted that image to show the effect I was discussing. It was so embarrasingly bad I covered myself with this rider:-
Smivs wrote:
I must point out that the illumination map was made hastily for test purposes. It looks pants and I promise the final version will be much more arty. :P
The final version will look much more like this Anaconda I'm working on:-

Image

The above uses separate diffuse map, illumination map and emission map (3 images). My main problem right now is trying to get these combined diffuse-, illumination- and emission-maps (1 image) working. :(

Posted: Sat Jul 03, 2010 11:10 am
by ADCK
<EDIT> Can you post both the illumination map and effects map here? I'll have a go at merging them.

Posted: Sat Jul 03, 2010 11:32 am
by Smivs
ADCK wrote:
I'm confused, why are you using an illumination map AND a emission map when you could merge the two and use emission_and_illumination_map or just a single emission map?

From http://wiki.alioth.net/index.php/Materials_in_Oolite
A texture whose RGB channels act like emission_map, and whose alpha channel acts like illumination_map (and can be coloured with illumination_modulate_color). This uses less memory (on systems with shaders) than using separate shaders, although blending the emission and illumination maps into a single emission map, as described above, is still preferable.
Hi ADCK,
I'm confused as well! :?
I'm trying to get all three elements working in a single map (diffuse map, illumination map and emission map) as per Ahruman's post further up, and I just can't get it to work.
I have got illumination_and_emission maps working (with a few minor glitches), but adding the diffuse map as the base layer just won't work for me for some reason.
I just find it easier to make each one seperately and then merge them. I have no training of any kind in any of this, so I'm learning as I go along, and tend to do things in the way that I find easiest. So currently I have seperate maps for everything, and I'm hoping to crack this soon so that I can merge them all into a single map for each model.
Perhaps you can advise.
Just to re-iterate I'm placing the diffuse map as the first layer in Normal mode, then adding the illumination map as the second layer in Multiply mode, and finally adding the emission map as the third layer in Lighten Only mode. This is using Gimp, following Ahruman's instructions further up this thread. It doesn't work. If I do this the illumination and emission elements are OK, but the base texture (diffuse map) doesn't show...the resulting ship has the default Oolite texture, except where the illumination is. Here it shows my texture.
Any thoughts? By the way, I should mention that my computer doesn't support shaders. Am I trying to do something my computer can't handle?