Headlights
Moderators: winston, another_commander
Headlights
Headlights would be really handy for collecting loot in systems with low ambient light and when the sun is blocked by the planet. It would also be handy for docking sometimes. Anyone agree?
- aegidian
- Master and Commander
- Posts: 1161
- Joined: Thu May 20, 2004 10:46 pm
- Location: London UK
- Contact:
Mmm. It's certainly possible (and relatively easy to code).
How about a forward spotlight, emerging from a point near the main forward weapon, available as an upgrade (EQ_SPOTLIGHT) for a few hundred credits.
Harder to code (given the limited number of dynamic lights OpenGL can offer) would be NPC ships with spotlights... but I could think about it.
How about a forward spotlight, emerging from a point near the main forward weapon, available as an upgrade (EQ_SPOTLIGHT) for a few hundred credits.
Harder to code (given the limited number of dynamic lights OpenGL can offer) would be NPC ships with spotlights... but I could think about it.
That'd be great! Exactly what I was thinking!aegidian wrote:How about a forward spotlight, emerging from a point near the main forward weapon, available as an upgrade (EQ_SPOTLIGHT) for a few hundred credits.
It would definitely look cool but whether or not your time could be spent elsewhere is another question. Either way I'd be happy with just the first option.aegidian wrote:Harder to code (given the limited number of dynamic lights OpenGL can offer) would be NPC ships with spotlights... but I could think about it.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
The good news is, OpenGL has support for a spotlight lighting model.
The bad news is, it looks crap on low-poly models (since lighting is per-vertex).
The usual solution is to use a projected light-map texture. This’d be a big, big change to the rendering model, though.
The bad news is, it looks crap on low-poly models (since lighting is per-vertex).
The usual solution is to use a projected light-map texture. This’d be a big, big change to the rendering model, though.
E-mail: [email protected]
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
You’ve got a pervertex sense of humour.Wiggy wrote:Is that some new space-age material with a wipe-clean finish...?Ahruman wrote:lighting is pervertex.
Technically, it doesn’t need to be as strong as in air for any given range.Wiggy wrote:On a more serious note, you're going to need a pretty strong torch bulb to illuminate space!
Thermal would be a lot of work. Light-amplification would probably be easier… but would be better done after we’ve got glare effects. ;-)Wiggy wrote:Should I mention the IR goggles again....?
E-mail: [email protected]
Yes, obviously thermal imaging would be a bit radical.Thermal would be a lot of work. Light-amplification would probably be easier… but would be better done after we’ve got glare effects.
The idea was more along the lines of 'false colour', like <real world> images of deep space.
System too dark? Just re-calibrate your sensors to a different waveband.
Someone first mentioned it harking back to Predator 2, when they lock him in a fridge so his IR sensors don't work. The creature then switches to UV or similar. And then the killing begins...
You came in that? You're braver than I thought!
- winston
- Pirate
- Posts: 731
- Joined: Mon Sep 27, 2004 10:21 pm
- Location: Port St. Mary, Isle of Man
- Contact:
When my hand heals a bit and it's not quite as uncomfortable to type as it is now, I was thinking of looking at doing an Advanced Naval Targeting System - which can highlight all targets in range (much like the scanner targeting enhancement does for a single target). I did start looking at the HUD code last week to see what was happening. Only believe that I'm doing it though when you see a branch appear in SVN - I'm notoriously unreliable!
Hey hedlights is a cool idea! after all what did Han Solo do immediately after entering the Aster...erm Big Worm? he switched on the Headlights! It would really be funny if some craft have flip up headlights too but that's probably a lot more code and polygons then necessary.
I do agree that the ambient lighting in the game is often way too dark. Most of the time when you're dealing with a pesky pirate in some dark colored ship especially if powered off you really can't tell anything till you crash into it. Some kind of light or advanced imaging system (maybe even with zoom?) would probably help here.
I do agree that the ambient lighting in the game is often way too dark. Most of the time when you're dealing with a pesky pirate in some dark colored ship especially if powered off you really can't tell anything till you crash into it. Some kind of light or advanced imaging system (maybe even with zoom?) would probably help here.
Cmdr. EAGLE 5
Hero for Hire
Hero for Hire
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
I think the ambient lighting is too bright. What is too dark is the texturing on some ships… you just can’t get a black surface that’s anywhere near totally absorbent, i.e. as dark as space. A “black” ship should turn up as medium grey on the lighted side and dark grey on the dark side (the jabberwocky and bandersnatch are about right). Specular lighting would help make the sunny side show up better, though.
E-mail: [email protected]
I had a look too, this simple patch (against linux SVN rev361) highlights all non-active targets with the targetting reticle in dark yellow (It's always active, it lacks the code to be an item and all that stuff). :winston wrote:When my hand heals a bit and it's not quite as uncomfortable to type as it is now, I was thinking of looking at doing an Advanced Naval Targeting System - which can highlight all targets in range (much like the scanner targeting enhancement does for a single target). I did start looking at the HUD code last week to see what was happening. Only believe that I'm doing it though when you see a branch appear in SVN - I'm notoriously unreliable!
Code: Select all
Index: src/Core/HeadUpDisplay.m
===================================================================
--- src/Core/HeadUpDisplay.m (revision 361)
+++ src/Core/HeadUpDisplay.m (working copy)
@@ -56,6 +56,7 @@
GLfloat red_color[4] = {1.0, 0.0, 0.0, 1.0};
GLfloat redplus_color[4] = {1.0, 0.0, 0.5, 1.0};
GLfloat yellow_color[4] = {1.0, 1.0, 0.0, 1.0};
+GLfloat darkyellow_color[4] = {0.75, 0.75, 0.0, 1.0};
GLfloat green_color[4] = {0.0, 1.0, 0.0, 1.0};
GLfloat darkgreen_color[4] ={0.0, 0.75, 0.0, 1.0};
GLfloat blue_color[4] = {0.0, 0.0, 1.0, 1.0};
@@ -486,6 +487,12 @@
foundHostiles = YES;
break;
}
+ // adds reticles to all stuff inside max_scanner_range2
+ // if advanced_scanner_item is present...
+ if ((drawthing->isShip) && (drawthing->zero_distance <= max_scanner_range2))
+ {
+ hudDrawReticleOnTarget(drawthing, player, z1);
+ }
// exit if it's off-scanner
if (drawthing->zero_distance > max_zoomed_range2)
continue;
@@ -1973,7 +1980,12 @@
//rotate to face player1
glMultMatrixf(back_mat);
// draw the reticle
- glColor4fv(green_color);
+ if (target == [player1 getPrimaryTarget])
+ {
+ glColor4fv(green_color);
+ } else { //use (different || darker) colour if ! target
+ glColor4fv(darkyellow_color);
+ }
glBegin(GL_LINES);
glVertex2f(rs0,rs2); glVertex2f(rs0,rs0);
glVertex2f(rs0,rs0); glVertex2f(rs2,rs0);
It could be useful in addition to the AdvNavTarSys, allowing you to go pick the precious cargo if you're in a hurry.
About the light, i think there's no need to look very fancy, a simple GL spotlight with attenuation and wide angle (so that you can spot cargo containers at 1-2km range) should be ok, but i found no way to code it properly :\ (it seemed to light planets in the inverse direction when i pumped up the wattage, bah i have no idea).
The shop could look like:
1.000 - Spotlight - "A simple 100.000 watts bulb"
5.000 - X-Ray Container Scanner - "Useful for choosing what to scoop"
30.000 - Advanced Naval Targetting System - "The ultimate targetting computer"