Page 5 of 21

Posted: Tue Apr 10, 2007 3:51 pm
by JensAyton
Star Gazer wrote:
@ ahruman - I've got some pictures using Snapz, can I email them to you? - I have no way to host them at the moment.
Yes, please. Command-shift-4 would do fine, mind you. :-) This comment exists purely to highlight to any passers-by that no special equipment is needed to take screenshots of Oolite under OS X.
Star Gazer wrote:
hold on... should I have done this...?
after adding “#define OOLITE_LIGHT_0_FIX” at the top of each shader
Doesn’t matter.

#define OOLITE_LIGHT_0_FIX currently causes the model to be illuminated at all times by what amounts to a light attached to the camera, which is generally undesirable. The idea is that Oolite will predefine OOLITE_LIGHT_0_FIX when light 0 doesn’t have this problem.

This isn’t very useful in practice for checking specular highlights. Hard-coding (in the shader) a light which illuminates the ship at an angle would be more practical for this purpose. (In the LIGHT() macro, replace gl_LightSource[idx].position.xyz with something like vec3(1.0, 1.0, 1.0), then fiddle with the numbers until something useful happens.)

Posted: Thu Apr 12, 2007 6:49 pm
by Griff
Edit: sorry, deleted my post, i thought there might be info in a default rendermonkey shader code preset to help find out what was causing the blue in the texture on some ATi video cards, turns out the stuff i posted wasn't going to be of any help at all, i'm not even sure it was glsl shader code!

Posted: Sat Apr 14, 2007 11:11 am
by JensAyton
The new texture loading code seems to have resulted in the specular highlights being much more noticable, possibly related to a known problem (textures were being premultipled on loading). It definitely needs a smack with the subtle stick. I couldn’t get a shot of the most extreme bling, though.

In the mean time, “ We're in the future! Things are very shiny here.” (The glow effects aren’t very shiny, because the engines aren’t running hard. …and the engine cowling glow is broken again. Bah.)

Image Image Image Image

These demonstrate the effect of mip-mapping. In the existing game, scaled-down textures have “crawling” artefacts due to the lack of mip-mapping. In the new code, mip mapping is on by default unless in reduced detail mode, but can be forced on or off on a per-material basis. (More on “materials” to come.)
Image Image Image

Posted: Sat Apr 14, 2007 11:29 am
by Charlie
specular highlights!

Nice :D

TBH I rather like the 'over done' style...

Metal behemoths flashing & glittering in the vacuum of space...

Posted: Sat Apr 14, 2007 12:48 pm
by Captain Hesperus
@Ahruman & the other developers - Yet again I doff my hat, throw myself at your feet and grovel at the brilliant work you are turning out. By the time Elite IV comes out, Oolite might be 7.0LY ahead of it :D

Captain Hesperus

Posted: Sat Apr 14, 2007 1:17 pm
by JensAyton
Charlie wrote:
specular highlights!

Nice :D

TBH I rather like the 'over done' style...
Yeah, but like I said, this is when it's looking subtle. Also, this is a dark ship, near-matte black suits it.

Now, the behemoth, or the Coriolis, with their vast expanses of clear-doped sheet metal…

Posted: Sat Apr 14, 2007 2:22 pm
by JensAyton
So, looking at those screen shots, you might think the connection between the specular highlights and the appearance of the ship seems somewhat tenuous. Well, there’s a reason for that:
Image
The new code has a slight problem dealing with greyscale textures. :-)

Posted: Sun Apr 15, 2007 10:37 am
by TGHC
Captain Hesperus wrote:
@Ahruman & the other developers - Yet again I doff my hat, throw myself at your feet and grovel at the brilliant work you are turning out. By the time Elite IV comes out, Oolite might be 7.0LY ahead of it :D
It already is!!!!


Absolutely bloody brilliant!

Posted: Sun Apr 15, 2007 10:51 am
by JensAyton
Ahruman wrote:
The new code has a slight problem dealing with greyscale textures. :-)
-has +had.

Posted: Sun Apr 15, 2007 11:15 am
by JensAyton
Attempted bug fix for Griff Krait shaders: in each fragment shader, find the line:

Code: Select all

    vec4 diffuse, specular;
and replace it with:

Code: Select all

    vec4 diffuse = vec4(0.0), specular = vec4(0.0);
(With the Apple Floating Point Software Renderer, this provides something that looks at least vaguely right, although the specular highlight intensity is wrong for some reason.)

Edit: changing the line “float specIntensity = specMap.g;” to “ float specIntensity = specMap.g * 1.0;” fixes the latter issue. This looks like a renderer bug, but it’s worth testing on problematic hardware.
Edit 2: Fixed the fix code, which was broken. Have reported the latter bug to Apple, it appears to be a bona fide error in the software renderer (and so shouldn’t be affecting anyone).

Posted: Sun Apr 15, 2007 12:26 pm
by Star Gazer
@ ahruman - Very nice - good to see them as was intended at last!!

A resounding success - thank you for your persistence in sussing this one - this will revolutionise the quality of the modelling available - maybe not for the faint-hearted, 'tho...!! :wink:

Posted: Sun Apr 15, 2007 12:35 pm
by JensAyton
I take it that means it works, then? :-)

Posted: Sun Apr 15, 2007 12:43 pm
by Star Gazer
oh yes!! ...well... ...they look like the pictures originally posted - I'll send you the pics, then you can decide if there are any glitches still... :wink:

Posted: Sun Apr 15, 2007 1:17 pm
by JensAyton
Ahh. That’s rendering without any shaders.

Reason is, the code I posted was wrong; it should be:

Code: Select all

vec4 diffuse = vec4(0.0), specular = vec4(0.0);

Posted: Sun Apr 15, 2007 2:14 pm
by Star Gazer
:lol: :lol: