Random Hits OXP
Moderators: winston, another_commander
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
@ LB: Another thing about the GalMine Hopper. It has a beacon code "H", which happens to be the same as for a "H"acker Outpost. Unfortunately both hackers and hoppers appear (only) in Anarchy systems, which may lead to confusion on the player's side. Do you see any chance of giving them another beacon code? (Or do they need a beacon code at all?)
Hmm, maybe the hacker outpost could be given the three cogs icon instead of the letter H, the same way Ramirez is getting castle icons for his lodges...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Ooops. They're not meant to have a beacon code at all. I gave them a H beacon whilst I was testing their AIs. (They should stay in the Asteroid field near the bar at all times unless all the mining machines run out of mining pods or all get destroyed, in which case they fly to the main planet and land with their cargo of ore. If attacked they flee towards the bar to bring themselves in the protective range of the bar's turrets. They also message the bar to launch hunters to protect them. Giving them a beacon was an easy way to test if they had wandered off when the shoudn't). But I forgot to take the beacon out for the released version.
On the shaders, on my system the model never turns orange; the engine housings just glow when it accelerates, so I'm not sure what is causing that. How does it look on other peoples machines?
On the shaders, on my system the model never turns orange; the engine housings just glow when it accelerates, so I'm not sure what is causing that. How does it look on other peoples machines?
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
No problems - but as I said, I had this bug some months ago in general for ships/asteroids and such while using the ATI drivers before they had been fixed for OpenGL.LittleBear wrote:On the shaders, on my system the model never turns orange; the engine housings just glow when it accelerates, so I'm not sure what is causing that. How does it look on other peoples machines?
Screet
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
the glowing hopper ship looks like a bug i've made in the fragment shader, i'll have a look at what i've done and report back, sorry about the LB
edit: hmm, well i've just downloaded the oxp and copied the hopper shader files, model & textures into rendermonkey and it's working OK, the glow associated with acceleration is being limited to only the 'engine vents'.
I checked the shipdata.plist and that's OK too, the correct effects map & shader uniforms are being specified. Not that it's likely but has anything overwritten griff_hopper_effects.png or griff_hopper.fragment or your system CMCl? the griff_hopper.fragment should look like this
and griff_hopper_effects.png looks like a collection of black dots on a white background, if you can strip the alpha out of it in your image viewer, you should just see a small blue triangle shape with some red dots in it.
that all 'over the hull' red to yellow glow effect looks like the one linked to the ship temperature and it's accidentaly being linked into the ship acceleration shader uniform, but that shader effect isn't even coded into the hopper shader so i'm officially at alert condition = perplexed
edit: oops, just noticed - there is a bug in griff_hopper.frament, line 97
should be
at the moment the hopper isn't being lit by the system sun, it's using another light fixed to the camera position and possibly disabled during play and only used in the ship showroom load/save screens
edit: hmm, well i've just downloaded the oxp and copied the hopper shader files, model & textures into rendermonkey and it's working OK, the glow associated with acceleration is being limited to only the 'engine vents'.
I checked the shipdata.plist and that's OK too, the correct effects map & shader uniforms are being specified. Not that it's likely but has anything overwritten griff_hopper_effects.png or griff_hopper.fragment or your system CMCl? the griff_hopper.fragment should look like this
Code: Select all
// Texture Information from Oolite.
uniform sampler2D tex0; // Difuse and Specular Intensity map
uniform sampler2D tex1; // Effects map
// Uniforms from Oolite
uniform float uTime;
uniform float engine_power;
// Information from vertex shader.
varying vec3 v_normal; // Surface normal
varying vec3 v_pos; // Vertex/fragment position in eye space
// set the specExponent level (the specular highlight size, higher specExponent
// settings make the specular highlight smaller which makes the surface look
// more glossy - good for glass & plastics
const float specExponent = 2.0;
// Cyan color exhaust glow
vec4 cyanGlow(float level)
{
vec4 result;
result.rgb = vec3(0.3, 0.6, 0.7) * level * 1.5;
result.a = 1.0;
return result;
}
// Red/Orange color exhaust glow and engine heated metal
vec4 redGlow(float level)
{
vec4 result;
result.rgb = vec3(2.0, 0.5, 0.0) * level * 9.5;
result.a = 1.0;
return result;
}
// Irregular flickering function
#ifdef OO_REDUCED_COMPLEXITY
#define Pulse(v, ts) ((v) * 0.95)
#else
float Pulse(float value, float timeScale)
{
float t = uTime * timeScale;
float s0 = t;
s0 -= floor(s0);
float sum = abs( s0 - 0.5);
float s1 = t * 0.7 - 0.05;
s1 -= floor(s1);
sum += abs(s1 - 0.5) - 0.25;
float s2 = t * 1.3 - 0.3;
s2 -= floor(s2);
sum += abs(s2 - 0.5) - 0.25;
float s3 = t * 5.09 - 0.6;
s3 -= floor(s3);
sum += abs(s3 - 0.5) - 0.25;
return (sum * 0.1 + 0.9) * value;
}
#endif
// Calculate the contribution of a single light. Ought to be a function, but OS X's GLSlang implementation isn't sufficiently clever.
#define LIGHT(idx) \
{ \
vec3 lightVector = normalize(gl_LightSource[idx].position.xyz); \
vec3 reflection = normalize(-reflect(lightVector, v_normal)); \
diffuse += gl_FrontMaterial.diffuse * gl_LightSource[idx].diffuse * max(dot(v_normal, lightVector), 0.0); \
specular += gl_LightSource[idx].diffuse * pow(max(dot(reflection, eyeVector), 0.0), specExponent); \
}
void main(void)
{
vec4 diffuse = vec4(0.0), specular = vec4(0.0);
vec3 eyeVector = normalize(-v_pos);
// Load texture data
vec2 texCoord = gl_TexCoord[0].st;
vec4 diffuseMap = texture2D(tex0, texCoord);
vec4 effectsMap = texture2D(tex1, texCoord);
// calculate specular effects
float specIntensity = diffuseMap.a;
/* Light 0 is the "showroom" light, used in the demo screen and shipyard.
Light 1 is the sun.
*/
#ifdef OO_LIGHT_0_FIX
LIGHT(0);
#endif
LIGHT(0);
diffuse += gl_FrontMaterial.ambient * gl_LightModel.ambient;
// Calculate the basic ship colour & add in the specular effects
vec4 color = diffuse * diffuseMap + (diffuseMap * 3.0 * specular) * specIntensity;
//add in the cyan engine glow around the rockets
color += cyanGlow(effectsMap.r * Pulse(min(engine_power, 1.0), 1.0));
//add in the red heated metal glow around the exhaust
color += redGlow(effectsMap.b * diffuseMap.r * Pulse(min(engine_power, 1.0), 1.0)) * 0.5;
// add in the hull light glows
color += effectsMap.a * diffuseMap;
// Output final color
gl_FragColor = vec4(color.rgb, 1.0);
}
that all 'over the hull' red to yellow glow effect looks like the one linked to the ship temperature and it's accidentaly being linked into the ship acceleration shader uniform, but that shader effect isn't even coded into the hopper shader so i'm officially at alert condition = perplexed
edit: oops, just noticed - there is a bug in griff_hopper.frament, line 97
Code: Select all
LIGHT(0);
Code: Select all
LIGHT(1);
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Hmmm. Applied the fix (which however isn't related to the engine glow effects), no change.
Re-downloaded the OXP, applied the fix, no change. Still the whole ship glows.
As other people don't seem to have the issue, perhaps it is my drivers in the end? Will do some searching.
EDIT: As I am comparing the hopper shader to a Griff Cobra shader, I notice that in the Griff Cobra Shader the whole exhaust glow effect is enclosed in the "// Irregular flickering function", while in the hopper shader it is not. Could that make a difference?
From Griff_Cobra_mk3_Mainhull_b_decals_cleaner.fragment:
EDIT AGAIN: No, it doesn't make a difference. Still the whole ship glows.
Re-downloaded the OXP, applied the fix, no change. Still the whole ship glows.
As other people don't seem to have the issue, perhaps it is my drivers in the end? Will do some searching.
EDIT: As I am comparing the hopper shader to a Griff Cobra shader, I notice that in the Griff Cobra Shader the whole exhaust glow effect is enclosed in the "// Irregular flickering function", while in the hopper shader it is not. Could that make a difference?
From Griff_Cobra_mk3_Mainhull_b_decals_cleaner.fragment:
Code: Select all
// Irregular flickering function
#ifdef OO_REDUCED_COMPLEXITY
#define Pulse(v, ts) ((v) * 0.95)
#define Blink_on_off(value) (1.0)
#else
float Pulse(float value, float timeScale)
{
float t = uTime * timeScale;
float s0 = t;
s0 -= floor(s0);
float sum = abs( s0 - 0.5);
float s1 = t * 0.7 - 0.05;
s1 -= floor(s1);
sum += abs(s1 - 0.5) - 0.25;
float s2 = t * 1.3 - 0.3;
s2 -= floor(s2);
sum += abs(s2 - 0.5) - 0.25;
float s3 = t * 5.09 - 0.6;
s3 -= floor(s3);
sum += abs(s3 - 0.5) - 0.25;
return (sum * 0.1 + 0.9) * value;
}
// Hull Temperate heat glow effect
vec4 TemperatureGlow(float level)
{
vec4 result = vec4(0);
result.r = level;
result.g = level * level * level;
result.b = max(level - 0.7, 0.0) * 2.0;
result.a = 1.0;
return result;
}
// Blink_on_off_function.
float Blink_on_off(float value)
{
if (value < 0.90)
value = 0.0;
else value = 1.0;
return (value);
}
// Cyan color exhaust glow effect
vec4 cyanGlow(float level)
{
vec4 result;
result.rgb = vec3(0.2, 0.7, 0.9) * level * 1.5;
result.a = 1.0;
return result;
}
// Red/Orange color heated metal effect
vec4 redGlow(float level)
{
vec4 result;
result.rgb = vec3(1.5, 0.55, 0.2) * level * 1.3;
result.a = 1.0;
return result;
}
#endif
Yep, that's a somewhat incomplete debugging message needed by LittleBear to figure out how to improve RH's 'intelligence'. If you're feeling confident you can comment out the code that generates that on-screen message inside your copy of RH!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Since LittleBear had "retired" does anyone else have any plans of picking up where he left on this?
It's a great expac, would be a shame to see it die.
Especially since it's unfinished, I've already fixed the %X Surname bug, The H Hopper bug, and changed the debug message to something more fitting on my personal version (as well as added my own ships {Which didnt work so well} ) But would be nice to see this expac continue to grow...
Also, another of LittleBear's addons "Asteroid Storm" doesn't work at all in the trunk version... Come back LittleBear!
It's a great expac, would be a shame to see it die.
Especially since it's unfinished, I've already fixed the %X Surname bug, The H Hopper bug, and changed the debug message to something more fitting on my personal version (as well as added my own ships {Which didnt work so well} ) But would be nice to see this expac continue to grow...
Also, another of LittleBear's addons "Asteroid Storm" doesn't work at all in the trunk version... Come back LittleBear!
I have been having a lot of fun with this OXP.ADCK wrote:Since LittleBear had "retired" does anyone else have any plans of picking up where he left on this?
It's a great expac, would be a shame to see it die.
Especially since it's unfinished, I've already fixed the %X Surname bug, The H Hopper bug, and changed the debug message to something more fitting on my personal version (as well as added my own ships {Which didnt work so well} ) But would be nice to see this expac continue to grow...
Also, another of LittleBear's addons "Asteroid Storm" doesn't work at all in the trunk version... Come back LittleBear!
I hadn't noticed any visual effects bugs, though... maybe I need to get closer to the hopper or whatever.
The H Hopper beacon was confusing at first until I figured that one out, I thought it was supposed to be there for some reason.
I had not noticed the debug messages (maybe it slipped by me).
I'm not sure what is meant by "Surname Bug", but on the last hit I did, when I destroyed the target the comm log (and message... I had to look at the purple comm log just to make sure, I thought it was my imagination) said something like "Qurium Bomb has destroyed Captain Quelch!". I guess that's what is meant... instead of "Qurium Bomb" it should have been my callsign.
ADCK;
If it isn't considered improper, could I get a copy of your "fixed" version of the RandomHits OXP? I could PM you with my email address, or maybe they will let you post it as a fixed version on the wiki.
... Thanks
The debug messages appear after accepting a contract from a space bar, see ZygoUgo's post a few posts up ^
Surname Bug, sometimes targets will have the surname %X "eg: BillyBob %X" This only effects the lastest versions of oolite if i remember right.
I don't have permsission from LittleBear to make released updates, but i can offer a step by step guide on how to fix those bugs.
Surname Bug, sometimes targets will have the surname %X "eg: BillyBob %X" This only effects the lastest versions of oolite if i remember right.
I don't have permsission from LittleBear to make released updates, but i can offer a step by step guide on how to fix those bugs.