Ruining the classics (screenshot heavy thread)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post 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!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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
User avatar
Charlie
---- E L I T E ----
---- E L I T E ----
Posts: 262
Joined: Wed Sep 27, 2006 5:33 pm

Post by Charlie »

specular highlights!

Nice :D

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

Metal behemoths flashing & glittering in the vacuum of space...
Benulobiweed.inc
By Appointment to
--- : GalCoop : ---

Your nearest Benulobiweed.inc dealer:
http://www.box.net/public/b2tic3tjsk#main

Charlie
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2310
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post 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
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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…
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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. :-)
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post 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!
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Ahruman wrote:
The new code has a slight problem dealing with greyscale textures. :-)
-has +had.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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).
Last edited by JensAyton on Sun Apr 15, 2007 1:18 pm, edited 1 time in total.
User avatar
Star Gazer
---- E L I T E ----
---- E L I T E ----
Posts: 633
Joined: Sat Aug 14, 2004 4:55 pm
Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)

Post 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:
Very funny, Scotty, now beam down my clothes...
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

I take it that means it works, then? :-)
User avatar
Star Gazer
---- E L I T E ----
---- E L I T E ----
Posts: 633
Joined: Sat Aug 14, 2004 4:55 pm
Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)

Post 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:
Very funny, Scotty, now beam down my clothes...
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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);
User avatar
Star Gazer
---- E L I T E ----
---- E L I T E ----
Posts: 633
Joined: Sat Aug 14, 2004 4:55 pm
Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)

Post by Star Gazer »

:lol: :lol:
Very funny, Scotty, now beam down my clothes...
Post Reply