Seems to be a bit quiet at work so i had a quick look at the oxp, well, what a balst from the past! i grabbed the "Griff Rocket Shader Test - Engine Level Lights.zip file" from
http://www.box.com/shared/h95rd0n25x (listed as Griff Rocket Example 2 in the first post of this thread), if you change the shipdata.plist to this
Code:
{
// ++++++ Griff Rocket Example ++++++
"griff_rocket" =
{
like_ship = "cobra3-trader";
exhaust = ("0 0 -49.0 10.0 10.0 25.0");
model = "griff_rocket.dat";
name = "Griff Rocket";
roles = "griff_rocket";
smooth = true;
shaders =
{
"griff_rocket_unshaded_diffuse.png" =
{
vertex_shader = "ahruman-generic.vertex";
fragment_shader = "griff_rocket.fragment";
textures =
(
"griff_rocket_shaded_diffuse.png",
"griff_rocket_enginelevel_glowmap.png",
"griff_rocket_effects.png"
);
uniforms =
{
tex0 = { type = texture; value = 0; };
tex1 = { type = texture; value = 1; };
tex2 = { type = texture; value = 2; };
time = "universalTime";
engine_level = "speedFactor";
hull_heat_level = "hullHeatLevel";
laser_heat_level = "laserHeatLevel";
};
};
};
};
}
(Sorry, i had to change it from XML to Openstep format - i could't remember how to do the XML code)
and also change the script.js file in the Config folder to this:
Code:
// Configuration -- customize here
this.role = "griff_rocket";
this.count = 3;
// Standard attributes
this.name = "Spawn-" + this.role;
this.author = "Jens Ayton";
this.copyright = "This script is hereby placed in the public domain.";
this.version = "1.0.1";
this.description = "Script to make several ships of a given role appear at the witchpoint after every jump."
this.shipWillLaunchFromStation = function()
{
system.legacy_addSystemShips(this.role, this.count, 1.0);
log("testscript.spawn", "Generated " + this.count + " " + this.role + " for testing purposes.");
}
it should get the oxp working again, although it still used the macro lighting code that we shouldn't be using!
When you launch the ammended script.js will spawn 3 rocket example ships near the station.
The next step i think will be to change the fragment shader to the normal map one that uses the Function to calculate lighting and re-post the oxp
How do you want to do the engine glows for your ship MiMoriarty, the current method is to just use the red and blue channels in a texture map recolour them orange and cyan in the shader and mix them into the texture - you don't have to do it this way - a simpler method would just be to paint out your final engine glow as a standard texture and add this onto the ship without having to mess around with single colour channels etc
here's a post where i seem to be trying to explain the single channel effects texture painting method
viewtopic.php?f=4&t=3460&start=285