Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ship data for 'meteor' light courier #1219

Merged
merged 6 commits into from
Apr 28, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
964 changes: 964 additions & 0 deletions data/models/ships/meteor/gear.obj

Large diffs are not rendered by default.

Binary file added data/models/ships/meteor/gear_diff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/models/ships/meteor/glowmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions data/models/ships/meteor/meteor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
define_model('meteor_gear', {
info = {
scale = 1.0,
bounding_radius = 5,
lod_pixels = {100},
materials = {'default'},
},
static = function(lod)
set_material('default', 0.8,0.8,0.8,1, .3,.3,.3,5, 0,0,0)
use_material('default')
texture('ramjetcraft.png')
load_obj('meteor_gear.obj')
end
})

define_model('meteor', {
info = {
scale = 1.2,
bounding_radius = 13,
lod_pixels = {40 , 150, 0},
materials = {'default'},
tags = {'ship'},
},
static = function(lod)
--name, diffuse rgba, spec rgb+intensity, emit rgb
set_material('default', 0.8,0.8,0.8,1, .3,.3,.3,5, 0,0,0)
use_material('default')
texture('ramjetcraft.png')
texture_glow('glowmap.png')
if lod == 1 then
load_obj('ramjetcraft_lod1.obj')
end
if lod == 2 then
load_obj('ramjetcraft_lod2.obj')
end
if lod == 3 then
load_obj('ramjetcraft_lod3.obj')
end

--thrusters from blender
--mains (rear)
thruster(v(0.600, 0.000, 5.000), v(0.000, 0.000, 1.000), 6, true)
thruster(v(-0.600, 0.000, 5.000), v(0.000, 0.000, 1.000), 6, true)
thruster(v(0.200, 0.000, 5.000), v(0.000, 0.000, 1.000), 6, true)
thruster(v(-0.200, 0.000, 5.000), v(0.000, 0.000, 1.000), 6, true)
thruster(v(1.000, 0.000, 5.000), v(0.000, 0.000, 1.000), 6, true)
thruster(v(-1.000, 0.000, 5.000), v(0.000, 0.000, 1.000), 6, true)
--dorsal fore
thruster(v(1.300,-0.100, -7.500), v(0.000, 1.000, 0.000), 1, false)
thruster(v(-1.300,-0.100, -7.500), v(0.000, 1.000, 0.000), 1, false)
--ventral fore
thruster(v(1.400, -0.400, -7.500), v(0.000, -1.000, 0.000), 1, false)
thruster(v(-1.400,-0.400, -7.500), v(0.000, -1.000, 0.000), 1, false)
--dorsal aft (upper wings)
thruster(v(2.900, 1.300, 4.200), v(-0.500, 1.000, 0.000), 2, false)
thruster(v(-2.900, 1.300, 4.200), v(0.500, 1.000, 0.000), 2, false)
--ventral aft (lower fins)
thruster(v(3.000, -1.600, 4.200), v(-0.500, -1.000, 0.000), 2, false)
thruster(v(-3.000, -1.600, 4.200), v(0.500, -1.000, 0.000), 2, false)
--flank fore
thruster(v( 2.000,-0.200, -6.800), v(1.000, 0.000, 0.000), 1, false)
thruster(v(-2.000,-0.200, -6.800), v(-1.000, 0.000, 0.000), 1, false)
--flank aft
thruster(v( 1.800, 0.000, 4.600), v(1.000, 0.000,-0.500), 2, false)
thruster(v(-1.800, 0.000, 4.600), v(-1.000, 0.000,-0.500), 2, false)

end,
dynamic = function(lod)
--no point in visible gear on lowest lod
if lod > 1 then
local gearpos = get_animation_position('WHEEL_STATE')
call_model('meteor_gear', v(0,.5 * (1-gearpos),2.56 * (1-gearpos)), v(1,0,0), v(0,1-.4*gearpos,.2-.2*gearpos), 1.0)
end

--lights visible when the craft is docking, landing
--or landing gear is down
navigation_lights(
{v(1.500,-1.000,-0.018), v(-1.500, -1.000, 0.018), },
{v( 3.100, 1.500, 4.000), v( 3.100,-2.000, 4.000), },
{v(-3.100, 1.500, 4.000), v(-3.100,-2.000, 4.000), }
)
end
})
Loading