modeling for pioneer
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
modeling for pioneer
haven't seen any user models so far, that's why i start this thread. 
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
progress so far[attachment=107:predator pre07.jpg]
RE: modeling for pioneer
That's looking good potsmoke.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
yet another shot of my predator v0[attachment=108:predator_pre09.jpg]i will post this pre release here, it will be updated, a new version is in work, which will include some animations.but to shorten the time meanwhile, this for you to try.[url]http://privat293.web.officelive.com/Documents/mercury_predator%20v0.zip[/url] is very busy, three new ships under construction:-cobra mk1-laura blackbird-e.y.e (a police vessel)
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
some standarts for modelers:- basic scale, ~10x FE2/FFE (exactly 8.7x), models in this scale are compliant to meters in pioneer and have not to be scaled. one unit = 1m (vertex spacing, it's not exactly fe2, 1m would be 1.149 units). if you setup such a grid in your 3d modeling prog. you can exactly determine where you have to position sub models, thrusters, pos. lights and such things in the lua script.- you can put assets of models for one model in to the mods folder. best if you setup a folder in mods named ships (leaves possibility for "buildings", or "general" (or others) folder, and into that you can drop the new ship into a separate folder named same as the model (just that you know what it is afterwards).- for each material you like to set to your ship in pioneer, you will need a separate .obj file- take the "Cobra MKIII" and my "Mercury Predator" as a guide, check how materials been specified and applied.- example model script,
Code:
-- first we load the engine modeldefine_model('mercury_tip', { -- give here a unique name to the model (no spaces)info = { -- model specslod_pixels= { 50, 100, 200, 0 }, -- level of detailbounding_radius = 50, -- this sizes the ship so that it fits to the preview windowmaterials={'default','thrusters', 'matvar0', 'matvar1'}, -- all used materials must be listed here},static = function(lod) -- open static functions -- material specifications; diffuse r,g,b, alpha trans, specular r,g,b, shinyness, environmental r,g,bset_material('default', .70, .70, .85,1, .90, .90, 1, 50, 0, 0, 0) use_material('default')load_obj('mercury_tip1.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) -- load model, transform matrix (see also cobra_mk3use_material('matvar0') -- color variable material1, set in dynamic functionsload_obj('mercury_tip2.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1)))use_material('matvar1') -- color variable material2, set in dynamic functionsload_obj('mercury_tip3.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1)))set_material('thrusters', .30, .30, .30,1, .30, .30, .30, 20)use_material('thrusters')-- note, not all thrusters are listed here, compare with cobra_mk3.lua or ships.lualocal vBackThruster = v(0, 0, 30) -- vector x,y,z, last number is how far back down the ship it is, y is heightlocal vFrontThruster = v(0, 0, -16)xref_thruster(vBackThruster, v(0,0,1), 40, true) -- main thruster position, directional vector, float size and bool linear_only (true/false)xref_thruster(vFrontThruster, v(0,0,-1), 10, true)local TopThrustForward = v(0, 3, 16) -- define thruster positionlocal BottomThrustForward = v(0, -3, 16)thruster(TopThrustForward, v(0,1,0), 10) -- use thruster position, set directional vector, float size and bool linear_only (true/false)thruster(BottomThrustForward, v(0,-1,0), 10)local LeftForwardThruster = v(-3, 0, 16)local RightForwardThruster = v(3, 0, 16)thruster(LeftForwardThruster, v(-1,0,0), 10)thruster(RightForwardThruster, v(1,0,0), 10)end, -- end of static functions. important! if you specify no dynamic functions end without commadynamic = function(lod) -- open dynamic functionsset_material('matvar0', get_arg_material(0)) -- set color variable material1set_material('matvar1', get_arg_material(1)) -- set color variable material2, there is at least one matte color variable material (2), you can use this also for textif get_arg(0) ~= 0 then -- requests landing gear anim-- pos. light redlocal lightphase = math.fmod(get_arg(1), 1)if lightphase > .7 then -- determinates when the light has to glowbillboard('smoke.png', 4, v(1,0,0), { v(0, 2.5, 20) }) -- call texture and specify size, color and vector (rotation?)end -- ends ifend -- ends dynamic functionsend -- ends define model}) -- careful with the brackets, close allways as much as you opened. check "stdout.txt" if the script fails.-- now we load the main modeldefine_model('mercury', {info = { lod_pixels = { 50, 100, 200, 0 },bounding_radius = 100,materials = {'thrusters', 'text', 'default', 'matvar0', 'matvar1', 'matte'},tags = {'ship'}, -- what kind of model it is, (ship or station)ship_defs = { -- ship specs{'Mercury Predator', -- the name that appears on the shiplist{ 2*10^7,-3*10^7,1*10^7,-1*10^7,-1*10^7,1*10^7 }, -- acceleration ratio, rev, fwd, empty, ladden 4*10^7, -- acceleration base? (has not much effect, i'm not shure){ v(0,0.6,-24.2), v(0,0,-1)}, -- position, direction vector lasers (i left out the others, but still the game crashes when only one gunmounting is specified, i entered some values but nothing seems to happen?){ 140, 1, 2, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, -- capacity(again?), ?, gunmountings (crashes when specified 1), missile pylons, the rest ?????????????????140, 180, 32000000, -- tons capacity, tons hull mass, price in cents4 -- pre mounted hyperspace drive class }}},static = function(lod)-- material_name, diff r, diff g, diff b, alpha, spec r, spec g, spec b, shiny, env r, env g, env bset_material('default', .70, .70, .85,1, .90, .90, 1, 50, 0, 0, 0)set_material('matte', 0, 0, 0,1, .60, .60, .60, 10, 0, 0, 0)set_material('text', .9, .9, .9,1, .6, .6, .6, 10, 0, 0, 0)use_material('default')load_obj('mercury_eng.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1)))use_material('matvar1')load_obj('mercury_top.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) use_material('matvar0')load_obj('mercury_bot.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) use_material('matte')load_obj('mercury_mat.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) end,dynamic = function(lod)local v10 = v(31.6, -11.1, -9.3) -- you can also pre define vectors (very important for scripted models)local v11 = v(-31.6, -11.1, -9.3)set_material('matvar0', get_arg_material(0))set_material('matvar1', get_arg_material(1))call_model('mercury_tip', v10, v(-1,0,0), v(0,-1,0), 1) -- call model only works as dynamic function vector position, vector xaxis, vector yaxis, float scalecall_model('mercury_tip', v11, v(-1,0,0), v(0,-1,0), 1)-- geomflag(0x8000) -- turns off collision level-- local reg = get_arg_string(0) -- set "reg" to reg. nr.-- text(reg, v(20, 2, 1), v(20, 2, 30), v(0,0,-1), 2.0, {xoffset=0, yoffset=0}) -- text "reg", vector pos, vector normals, vector textdir, float scale [,{center=true/false}], additional offset-- text(reg, v(-20, 2, 1), v(-20, 2, 30), v(0,0,1), 2.0, {xoffset=0, yoffset=0})-- geomflag(0) -- turns on collision levelif get_arg(0) ~= 0 then -- requests landing gear anim-- lights local lightphase = math.fmod(get_arg(1), 1)if lightphase > .4 thenbillboard('smoke.png', 4, v(.2,.2,1), { v(0, 7, 18) }) -- pos. light blueelseif lightphase > .1 thenbillboard('smoke.png', 4, v(.8,.8,.8), { v(0, 0.2, -19) }) -- pos. light white endendend})
i hope this will help
it looks more complicated then it is.
pioneer is cool
[attachment=109:predator_pre10.jpg]
Code:
-- first we load the engine modeldefine_model('mercury_tip', { -- give here a unique name to the model (no spaces)info = { -- model specslod_pixels= { 50, 100, 200, 0 }, -- level of detailbounding_radius = 50, -- this sizes the ship so that it fits to the preview windowmaterials={'default','thrusters', 'matvar0', 'matvar1'}, -- all used materials must be listed here},static = function(lod) -- open static functions -- material specifications; diffuse r,g,b, alpha trans, specular r,g,b, shinyness, environmental r,g,bset_material('default', .70, .70, .85,1, .90, .90, 1, 50, 0, 0, 0) use_material('default')load_obj('mercury_tip1.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) -- load model, transform matrix (see also cobra_mk3use_material('matvar0') -- color variable material1, set in dynamic functionsload_obj('mercury_tip2.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1)))use_material('matvar1') -- color variable material2, set in dynamic functionsload_obj('mercury_tip3.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1)))set_material('thrusters', .30, .30, .30,1, .30, .30, .30, 20)use_material('thrusters')-- note, not all thrusters are listed here, compare with cobra_mk3.lua or ships.lualocal vBackThruster = v(0, 0, 30) -- vector x,y,z, last number is how far back down the ship it is, y is heightlocal vFrontThruster = v(0, 0, -16)xref_thruster(vBackThruster, v(0,0,1), 40, true) -- main thruster position, directional vector, float size and bool linear_only (true/false)xref_thruster(vFrontThruster, v(0,0,-1), 10, true)local TopThrustForward = v(0, 3, 16) -- define thruster positionlocal BottomThrustForward = v(0, -3, 16)thruster(TopThrustForward, v(0,1,0), 10) -- use thruster position, set directional vector, float size and bool linear_only (true/false)thruster(BottomThrustForward, v(0,-1,0), 10)local LeftForwardThruster = v(-3, 0, 16)local RightForwardThruster = v(3, 0, 16)thruster(LeftForwardThruster, v(-1,0,0), 10)thruster(RightForwardThruster, v(1,0,0), 10)end, -- end of static functions. important! if you specify no dynamic functions end without commadynamic = function(lod) -- open dynamic functionsset_material('matvar0', get_arg_material(0)) -- set color variable material1set_material('matvar1', get_arg_material(1)) -- set color variable material2, there is at least one matte color variable material (2), you can use this also for textif get_arg(0) ~= 0 then -- requests landing gear anim-- pos. light redlocal lightphase = math.fmod(get_arg(1), 1)if lightphase > .7 then -- determinates when the light has to glowbillboard('smoke.png', 4, v(1,0,0), { v(0, 2.5, 20) }) -- call texture and specify size, color and vector (rotation?)end -- ends ifend -- ends dynamic functionsend -- ends define model}) -- careful with the brackets, close allways as much as you opened. check "stdout.txt" if the script fails.-- now we load the main modeldefine_model('mercury', {info = { lod_pixels = { 50, 100, 200, 0 },bounding_radius = 100,materials = {'thrusters', 'text', 'default', 'matvar0', 'matvar1', 'matte'},tags = {'ship'}, -- what kind of model it is, (ship or station)ship_defs = { -- ship specs{'Mercury Predator', -- the name that appears on the shiplist{ 2*10^7,-3*10^7,1*10^7,-1*10^7,-1*10^7,1*10^7 }, -- acceleration ratio, rev, fwd, empty, ladden 4*10^7, -- acceleration base? (has not much effect, i'm not shure){ v(0,0.6,-24.2), v(0,0,-1)}, -- position, direction vector lasers (i left out the others, but still the game crashes when only one gunmounting is specified, i entered some values but nothing seems to happen?){ 140, 1, 2, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, -- capacity(again?), ?, gunmountings (crashes when specified 1), missile pylons, the rest ?????????????????140, 180, 32000000, -- tons capacity, tons hull mass, price in cents4 -- pre mounted hyperspace drive class }}},static = function(lod)-- material_name, diff r, diff g, diff b, alpha, spec r, spec g, spec b, shiny, env r, env g, env bset_material('default', .70, .70, .85,1, .90, .90, 1, 50, 0, 0, 0)set_material('matte', 0, 0, 0,1, .60, .60, .60, 10, 0, 0, 0)set_material('text', .9, .9, .9,1, .6, .6, .6, 10, 0, 0, 0)use_material('default')load_obj('mercury_eng.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1)))use_material('matvar1')load_obj('mercury_top.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) use_material('matvar0')load_obj('mercury_bot.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) use_material('matte')load_obj('mercury_mat.obj', Mat4x4.new(v(1,0,0),v(0,1,0),v(0,0,1))) end,dynamic = function(lod)local v10 = v(31.6, -11.1, -9.3) -- you can also pre define vectors (very important for scripted models)local v11 = v(-31.6, -11.1, -9.3)set_material('matvar0', get_arg_material(0))set_material('matvar1', get_arg_material(1))call_model('mercury_tip', v10, v(-1,0,0), v(0,-1,0), 1) -- call model only works as dynamic function vector position, vector xaxis, vector yaxis, float scalecall_model('mercury_tip', v11, v(-1,0,0), v(0,-1,0), 1)-- geomflag(0x8000) -- turns off collision level-- local reg = get_arg_string(0) -- set "reg" to reg. nr.-- text(reg, v(20, 2, 1), v(20, 2, 30), v(0,0,-1), 2.0, {xoffset=0, yoffset=0}) -- text "reg", vector pos, vector normals, vector textdir, float scale [,{center=true/false}], additional offset-- text(reg, v(-20, 2, 1), v(-20, 2, 30), v(0,0,1), 2.0, {xoffset=0, yoffset=0})-- geomflag(0) -- turns on collision levelif get_arg(0) ~= 0 then -- requests landing gear anim-- lights local lightphase = math.fmod(get_arg(1), 1)if lightphase > .4 thenbillboard('smoke.png', 4, v(.2,.2,1), { v(0, 7, 18) }) -- pos. light blueelseif lightphase > .1 thenbillboard('smoke.png', 4, v(.8,.8,.8), { v(0, 0.2, -19) }) -- pos. light white endendend})
i hope this will help
RE: modeling for pioneer
Excellent work there potsmoke!
I kinda knew your first Pioneer ship would be an IC
Lets hope others join in and contribute their models too.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
tia, tiatwo other models get released soon, one is already in my setup (e.y.e), but it isn't finished yet , ships specs have to be set properly at least (you might like to work on it yourself maybe) and the texture isn't shown correct in pioneer (i have no idea why in blender it's placed ok, but in pioneer it gets partwisely smeared). the other is a cobra mk I, which i started to figure out the scale and vertex spacing of pioneer, i will upload it soon as the script for the model is (at least roughly) finished. also the eye will get a proper script and i would like to see the possibility to set a "unique" police vessel in the script, it would be great if you could specify a separated model only for the police to define a special skin and the flashing blue and red lights. additionally this CW culling in pioneer gives me a liitle problem and many programs like blender work allways with double sided polys so you won't see the winding order, this makes some parts of my models "invisible" or inverted, i have to fix that, but like i said, hard if you don't see and i have to load the .obj to a simple viewer to "see" the culled polys. sadly i haven't found a flip poly command in blender (maybe becaus blender didn't mind), so i will have to re-edit it in another program.hint for blender users, you will have to edit your models .obj to make it work for pioneer.you can open them with worpad or so and check that all material and object names are as you set them (the output plugin produces sometimes a mess), open also the .mat file and check the listing of materials used, maybe you like to use only one for all .obj, take "Mercury Predator" as example. also i splitted the model into separate .obj files to allow different materials specificated for them in the .lua script.You can use many cad programs to create wavefront objects, for beginners i still recommend old free Z-Modeler 1.7. even if you can't load and save the models as .obj and you will need a converting utility such as 3DWin5, to convert them between .3ds or .lwo and .obj, but the simplicity of the program is major. also implemented a cool guide to 3d modeling in general that covers most of the functions of Z-Modeler. i know the program let's open some wishes and texturing is not easy, but it's never and allways a lot of boring work imo. animations also can't be made, but that's deniable because you will have to animate your model anyways in the .lua script (which i still not exactly know how to animate a "solid" model, maybe i will have to use a model for each frame?). or do there exist a transform/rotate command, can it be solved with the transform matrix?btw. is my file acsessable for you? i don't know because i will always have acsess to them.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
just to keep things goin' on[attachment=111:whereismyship.jpg]
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
snakes, erm thanks!
check models progress for further......it's anything rather then easy (to me) to setup the lua scripts for the models, but slowly i get experienced.others (like you) might be intrested in how to do so. if i'm satisfied with my models i will upload them all with a description how to bind the models in pioneer in and get things animated, colored, and randomized (yes, random use of models, parts or colors, nice!)at this time i'm willing to offer you, that i do the job for you if you got a model in wavefront .obj format (not necessairly, i can convert most anything except .max, i don't wan't to use further, piracy is theft). just let me know, how you wan't the model been set up, colors (3 variable colors possible, like in good old frontier, 2 glossy 1 matte), animated parts, setup dependent parts (like the scoop or the scanner, maybe laser guns to, have to work on that, but got a idea allready), randomly placed parts (why not), thruster positions (if not visible), position lights, glowing parts (engine), (semi)transparent parts, interiors (cockpit). best if you split your model to the needed different parts befor you hand it to me. your guessed setup for the ship (netto/tara weight, accel. ratio, etc..scale:scale your models in 1/10 meters, that's the best way imo, if you scale them 1/1 they're to big to handle in blender (and other CAD progs. as well. let me know the used scale, it could be 1/100 or 1/50 for the spacestations or huge transporters) and get "fogged" out in front or back. thats simple and you don't have to think to much about how big your ship is, you will have it under control. further this makes things easy for me to position the ships lights and thrusters, because i can assume 10/1m for my grid and got the right value for the vectors in the script. you can scale the model in the script to any needet size, but 1/10 is best to handle and we(i) don't loose control over the size(s) in pioneer.really i just assumed this scale and i have no idea what is the scale "tomm" have guessed, but it seems to be ok.i just compared frontiers ships to the size and mass of the allready ported ships and addet some guessing of mine (1/1 vertex spacing to "real" scale in meters, 1.15/1 (or 87%) to frontiers scale, because i dont want to have such a complicated scale compared to integer vertex spacing).
simplified this means; build your models in the scale 1/10 or 1/100 to "real" size. example: to scale a FFED3D model to pioneer, multiply the models size 0.87 times.
[attachment=112:cobra MKI 001.jpg]twin lasers, cool he? 8-)for those who are really interested in building scripted models (what a piece of work!), assume 1m for integer vertex spacing. make a sketch of your model on a grided sheet, then you can port the vectors easely to the script, use them to create then the polygons.short example of a octaeder building;the sketch:[attachment=114:luamodelsketch[1].jpg]scale i used 1/1, except for y vector which i divided by 2, i found it looks better flat.final dimensions: 14m width, 7m heightthe script:
Code:
define_model('octaeder', {info = {bounding_radius = 25,materials={'matvar2', 'mat1', 'wins'}},static = function(lod)local v0 = v(-3,7,3)local v2 = v(-3,7,-3)local v4 = v(-3,5,7)local v6 = v(-7,5,3)local v8 = v(-7,5,-3)local v10 = v(-3,5,-7)local v12 = v(-3,2,7)local v14 = v(-7,2,3)local v16 = v(-7,2,-3)local v18 = v(-3,2,-7)local v20 = v(-3,0,3)local v22 = v(-3,0,-3)local v1 = v(3,7,3)local v3 = v(3,7,-3)local v5 = v(3,5,7)local v7 = v(7,5,3)local v9 = v(7,5,-3)local v11 = v(3,5,-7)local v13 = v(3,2,7)local v15 = v(7,2,3)local v17 = v(7,2,-3)local v19 = v(3,2,-7)local v21 = v(3,0,3)local v23 = v(3,0,-3)local v24 = v(-2,4.7,-7)local v25 = v(2,4.7,-7)local v26 = v(2,3.5,-7)local v27 = v(-2,3.5,-7)set_material('mat1', 0,.8,.3, 1,.8,.8,.8,10) -- i made the top green, just to see where is topuse_material('mat1')quad(v0,v1,v3,v2) -- all 90° quads-- quad(v20,22,21,23) bottom not neededuse_material('matvar2') -- matte colorvariable material, has to be specified in dynamic functionquad(v6,v8,v16,v14)quad(v9,v7,v15,v17)quad(v10,v11,v19,v18)quad(v5,v4,v12,v13)quad(v4,v6,v14,v12)quad(v8,v10,v18,v16)quad(v11,v9,v17,v19)quad(v7,v5,v13,v15)quad(v0,v2,v8,v6) -- all 22.5° quadsquad(v3,v1,v7,v9)quad(v2,v3,v11,v10)quad(v1,v0,v4,v5)quad(v18,v19,v23,v22)quad(v13,v12,v20,v21)quad(v14,v16,v22,v20)quad(v17,v15,v21,v23)tri(v0,v6,v4) -- all tristri(v2,v10,v8)tri(v3,v9,v11)tri(v1,v5,v7)tri(v20,v12,v14)tri(v22,v16,v18)tri(v19,v17,v23)tri(v15,v13,v21)set_material('wins', .7,.8,.9,1,.8,.9,1,100) -- light blue for the windows, so faruse_material('wins')extrusion( v(0,4.7,0), v(0,3.5,0), v(0,0,-1), 1.0, -- makes that thing looking like somekind of windowv(2,-7,0), v(-2,-7,0), v(-2,-7.05,0), v(2,-7.05,0))end,dynamic = function(lod)set_material('matvar2', get_arg_material(2)) -- matte colorvariable material (you won't see any of them in preview)end})-- comment, he i thought all poly's must be wind counterclockwise?-- yes, but i looked at the model righthandet (stupid me, can't look from back and bottom at the model).
see, you can build the model wrongways, but it works still, it's a left handed model, polys wound clockwise, usually you will build pioneer models right handed, polys wound counter clockwise (have to fix that in the script). in the editor it will look like this; back, top, right side.hint: copy the code, paste it to a file named building1.lua, rename the model 'building1', put it to the models folder, or if you use my installation of pioneer, put it to "mods\MODELS - octaeder building1\data\models\city\building1" to exchange with the existing "building1"actual version of my installation: edit: haven't ready now, sorry
the preview:[attachment=113:octaeder_pre.jpg]oh, before i forgot, you can use the modelviewer (only)for your scripted models, if you rename your script to models.lua, place it to models folder and call the model by it's name (you will have to put submodels used in the same script, else they won't appear).that was quite a long text.... sorry for the many edits but....have phun!
Code:
define_model('octaeder', {info = {bounding_radius = 25,materials={'matvar2', 'mat1', 'wins'}},static = function(lod)local v0 = v(-3,7,3)local v2 = v(-3,7,-3)local v4 = v(-3,5,7)local v6 = v(-7,5,3)local v8 = v(-7,5,-3)local v10 = v(-3,5,-7)local v12 = v(-3,2,7)local v14 = v(-7,2,3)local v16 = v(-7,2,-3)local v18 = v(-3,2,-7)local v20 = v(-3,0,3)local v22 = v(-3,0,-3)local v1 = v(3,7,3)local v3 = v(3,7,-3)local v5 = v(3,5,7)local v7 = v(7,5,3)local v9 = v(7,5,-3)local v11 = v(3,5,-7)local v13 = v(3,2,7)local v15 = v(7,2,3)local v17 = v(7,2,-3)local v19 = v(3,2,-7)local v21 = v(3,0,3)local v23 = v(3,0,-3)local v24 = v(-2,4.7,-7)local v25 = v(2,4.7,-7)local v26 = v(2,3.5,-7)local v27 = v(-2,3.5,-7)set_material('mat1', 0,.8,.3, 1,.8,.8,.8,10) -- i made the top green, just to see where is topuse_material('mat1')quad(v0,v1,v3,v2) -- all 90° quads-- quad(v20,22,21,23) bottom not neededuse_material('matvar2') -- matte colorvariable material, has to be specified in dynamic functionquad(v6,v8,v16,v14)quad(v9,v7,v15,v17)quad(v10,v11,v19,v18)quad(v5,v4,v12,v13)quad(v4,v6,v14,v12)quad(v8,v10,v18,v16)quad(v11,v9,v17,v19)quad(v7,v5,v13,v15)quad(v0,v2,v8,v6) -- all 22.5° quadsquad(v3,v1,v7,v9)quad(v2,v3,v11,v10)quad(v1,v0,v4,v5)quad(v18,v19,v23,v22)quad(v13,v12,v20,v21)quad(v14,v16,v22,v20)quad(v17,v15,v21,v23)tri(v0,v6,v4) -- all tristri(v2,v10,v8)tri(v3,v9,v11)tri(v1,v5,v7)tri(v20,v12,v14)tri(v22,v16,v18)tri(v19,v17,v23)tri(v15,v13,v21)set_material('wins', .7,.8,.9,1,.8,.9,1,100) -- light blue for the windows, so faruse_material('wins')extrusion( v(0,4.7,0), v(0,3.5,0), v(0,0,-1), 1.0, -- makes that thing looking like somekind of windowv(2,-7,0), v(-2,-7,0), v(-2,-7.05,0), v(2,-7.05,0))end,dynamic = function(lod)set_material('matvar2', get_arg_material(2)) -- matte colorvariable material (you won't see any of them in preview)end})-- comment, he i thought all poly's must be wind counterclockwise?-- yes, but i looked at the model righthandet (stupid me, can't look from back and bottom at the model).
see, you can build the model wrongways, but it works still, it's a left handed model, polys wound clockwise, usually you will build pioneer models right handed, polys wound counter clockwise (have to fix that in the script). in the editor it will look like this; back, top, right side.hint: copy the code, paste it to a file named building1.lua, rename the model 'building1', put it to the models folder, or if you use my installation of pioneer, put it to "mods\MODELS - octaeder building1\data\models\city\building1" to exchange with the existing "building1"actual version of my installation: edit: haven't ready now, sorry
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
finally, you can put the model together something like this,[attachment=115:octaeder_pre2.jpg]futuristic looking building, isn't it?let's see if you find out how :Pyou can still download a actual version of my installation from here: [url]http://privat293.web.officelive.com/Documents/pioneer_p66mod1.zip[/url] it's still in progress and a lot of things left unsolved. ;)or here, [url]http://www.spacesimcentral.com/downloads.php?view=detail&df_id=277[/url]
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
getting slowly to the core.i will do the model (octaeder) new, i should have used xref_, haven't known exactly whatfor it is now i know
will post results soon.you might ask, why this guy takes himself so much time to build a scripted model, when you could do the same thing in 15mins in blender(or so), simply i wan't to know how it works. things like that get you to the inner structures of CAD, like in the past when i did my first steps and i allready learned a lot.i.e. i've been working for more than 20 years in constructing airconditions, but still had allways problems to unfold a body proper so it can be read by others, this have helped me much to understand better the two general systems used (left or right handed). took me years, can you imagine, but do your first scripted model (don't use a CAD prog.) and quickly you will understand, funny.next will be a transscription of a original FE2 model (eagle perhaps), let's see if that works.hint; if you like to do something like that for yourself, don't hasitate, get jongwares, ShowMesh.exe, this will spit out a long list of all FFE's models. you can use it as pattern for your scripted models, if you dare.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
interested in scripted models?setting up missions?[url]http://pioneerspacesim.net/wiki/index.php?title=Main_Page[/url] will help you!
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
you might know the modelviewer won't work for solid (.obj) models, but still it's a handy toy to check your scripted models.but with the altered directory structure of my installation it's hard to get any model opened, because modelviewer only searches for models in the models.lua file.so you would have to copy and rename allways your scripted models (and submodels) to view them.now i created a little batch which does the job for me:
Code:
sory something went wrong, might because it was allready morning, but i keep it up, have patience please. i just forgot that while i was testing my batch it was allways opening models.lua in data\models and tried to work on it in a default install. idiot!
copy & paste it if needet to a file named "whatever.bat", which you will have to place in your pioneer installation, else it won't work, because it didn't looks in which path it is in, this could be done, but it seems useless to me.it's not perfect, but comfortable enough. on the prompt you will have to specify first the file which contains the model, thus because it could be any .lua file, you will have to enter the path to the file, therefore it can be located anywhere and not especially in ...data\models\ and the extension doesn't have to be .lua at all. so you have the possibility to open a script for testing purposes.it will be copied to a temp dir and renamed to models.lua to allow the modelviewer to open it.next you will be prompted to enter the models name, since it could be that you don't remember the right name, models in the chosen file will be listed roughly.issues:the batch terminates if you enter no filename or no model at the first prompt,after it will keep the vars as long as the batch is running, so you can repetitive open the same model by just pressing enter.external (not in the same file) submodels & routines, which are called by the script don't get loadet of course.if you enter a unknown model name, modelviwer will try to open that model, which means it terminates, but the batch is still running, unfortunatly the wrong term is been held until you enter the right one. the second IF request isn't working properly by now, that's why the batch allways ports the models name to the viewer, no matter if exist or not.but still handy to quickly check your work
any questions, suggestions and enhancements are welcome.of course i can't give absolutely no warranty for what it does else (nothing), or if the file gets opened by the viewer.
Code:
sory something went wrong, might because it was allready morning, but i keep it up, have patience please. i just forgot that while i was testing my batch it was allways opening models.lua in data\models and tried to work on it in a default install. idiot!
copy & paste it if needet to a file named "whatever.bat", which you will have to place in your pioneer installation, else it won't work, because it didn't looks in which path it is in, this could be done, but it seems useless to me.it's not perfect, but comfortable enough. on the prompt you will have to specify first the file which contains the model, thus because it could be any .lua file, you will have to enter the path to the file, therefore it can be located anywhere and not especially in ...data\models\ and the extension doesn't have to be .lua at all. so you have the possibility to open a script for testing purposes.it will be copied to a temp dir and renamed to models.lua to allow the modelviewer to open it.next you will be prompted to enter the models name, since it could be that you don't remember the right name, models in the chosen file will be listed roughly.issues:the batch terminates if you enter no filename or no model at the first prompt,after it will keep the vars as long as the batch is running, so you can repetitive open the same model by just pressing enter.external (not in the same file) submodels & routines, which are called by the script don't get loadet of course.if you enter a unknown model name, modelviwer will try to open that model, which means it terminates, but the batch is still running, unfortunatly the wrong term is been held until you enter the right one. the second IF request isn't working properly by now, that's why the batch allways ports the models name to the viewer, no matter if exist or not.but still handy to quickly check your work
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
referring to naval and aeronautic system i guess we should use a similar, somewhat expandet lighting system for our space vessels.Right-of-way lights (Position lights): Port side (left, as seen by the pilot) - red, flashing, covering side at least by 180°, on the wingtips, if there are some, else on the most outrigging section.Starboard (right, in pilots view) - green, flashing, covering side at least by 180°, same as port side.Astern (the back) - white, flashing, covering back. somewhat higher than starbord and port lights, to show a upwards triangle from astern, likewise from bow, not to get confused where is bow, astern, port side or starboard, because in space you have no horizon, else if you see the red starboard light you won't know if the vessel is turned overhead. also it gives you an idea of the direction the craft is heading to.Masthead light (topmost) - white, flashing. on a spacecraft it would be on the most upper section of the fuselage, i guess. covering maybe 360°. together with starboard and port side lights, it gives the triangle a upwards direction, likewise astern light and also seen when looked at starboard or port side, together they mark the direction of the vessel.even if there is no horizon.it will be like this:pov from observer, left a red light, right a green one, white is pointing upwards, the craft is heading towards you, white is pointing downwards, the ship is overhaed and heading away from you.vice versa, right red, left green, white is pointing up the ship is heading away from you, white is pointing downwards the ship is heading towards you overhead.now even when the ship is a sphere or has a complete irregular geometry, you will allways know where it's heading.thus marks only the main thruster movement, if it uses only retro thrusters or only strafes by use of side thrusters, it's not that clear where it is moving to (heading wont characterize movement then), but usually you won't use your "weak" side or retro thrusters to accelerate in main direction.Collision warners:used primarely at launching and landing/docking procedure to warn service personnel, landet or aproaching crafts.space ships, should engage them, before launching and leave them on after docking or landing for a while, i guess.Wingtips - white, flashingBow (front) - white, optional, can be a headlight or searchlamp, non flashing.Keel (bottomside) - white, flashing, covering 360°a poem:
Quote:
When all three lights I see ahead,I turn to Starboard and show my Red:Green to Green, Red to Red,Perfect Safety -- Go Ahead.But if to Starboard Red appear,It is my duty to keep clear --To act as judgment says is proper:To Port or Starboard, Back or Stop her.And if upon my Port is seenA Steamer's Starboard light of Green,I hold my course and watch to seeThat Green to Port keeps Clear of me.Both in safety and in doubtAlways keep a good look out.In Danger, with no room to turn,Ease her, Stop her, Go Astern.
red over red, the captain is dead
Quote:
When all three lights I see ahead,I turn to Starboard and show my Red:Green to Green, Red to Red,Perfect Safety -- Go Ahead.But if to Starboard Red appear,It is my duty to keep clear --To act as judgment says is proper:To Port or Starboard, Back or Stop her.And if upon my Port is seenA Steamer's Starboard light of Green,I hold my course and watch to seeThat Green to Port keeps Clear of me.Both in safety and in doubtAlways keep a good look out.In Danger, with no room to turn,Ease her, Stop her, Go Astern.
red over red, the captain is dead
RE: modeling for pioneer
I just stumbled on an old ship I mde for FFED3D a year or so back.I reckon with a new texture the ship could look ok, heres a pic:[hsimg]http://s20dan.webs.com/wyvern.jpg[/hsimg]Anyway the ship is here in the format for FFED3D if anyone can find a use for it.I may just try and convert it if I can drag myself away fromDwarf Fortress for a bit ;)Just found some other pics, these have an even worse texture and have some Normal mapping problems, which I fixed. But you can at least see the shape.[hsimg]http://s20dan.webs.com/FFE%20Wyvern.png[/hsimg][hsimg]http://s20dan.webs.com/FFE%20Wyvern2.png[/hsimg]
RE: modeling for pioneer
Very interesting thread with a lot of information and amazing models!You are a talented guy!Thanks for that potsmoke66.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
thanks i need some compliments from time to time
and there's still more to comebut also still a lot to learn
RE: modeling for pioneer
potsmoke66 wrote:
thanks i need some compliments from time to time
Do you,keep going keep going.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: modeling for pioneer
uff, second ship to import to pioneer, why not, coolhand "free's" his viper to me to and i havent started yet.i will in time.i guess i delayed the importing of standart frontier ships because of two reasons,first, i would like to see unique ship designs in pioneer, they could lean on frontier but not exactly covering themsecond, i like to work on scripted models by now, it's a challenge. building a model with a CAD is one thing, scripting from a scratch is a complete different task. it will take you maybe much longer to complete one, but possibilities i mean flexibility it offers is unrevealed.well the Lanner, a nice transporter, what you think if i would rebuild it from the original ingame model used in ffe, it could be done. textures can be made (in near future, i guess).
RE: modeling for pioneer
Yes, I like that Potsmoke.
I really think that red scratched texture really suits it. Shows how it would realistically look after many re-entries. Nice work! Could anything be done though about the registration numbers? They spoil its look.