modeling for pioneer

Pioneer is an open-ended space adventure game. Explore the galaxy, make your fortune trading between systems, or work for the various factions fighting for power, freedom or self-determination.
Homepage: http://pioneerspacesim.net/
IRC: http://pioneerspacesim.net/irc
Downloads: https://pioneerspacesim.net/page/download/
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

I just checked and wings 3d can export .obj files so there should be no problems with exporting directly from wings3d.
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

i changed both scripts nowfor the decal it's this script
Code:
--[[ sub-model for use in all models to place (cutout) decals on them, texture can have a alpha channel for a cutout decal but it's not a must if sequence is expandet so all squadrons can use all decals]]--define_model('decal', {info = {bounding_radius = 1,materials = {'decal'}},static = function(lod)end,dynamic = function(lod) selector1() -- requests "random" number from selector functionset_material('decal', .7,.7,.7, 0.99, .3,.3,.3,5) -- creates semi-transparent material to cut out alpha channel, has to be 0use_material('decal') if select1 < 26 then texture('sub_models/decals/decal_a.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) -- calls the texture for the decal, else if select1 < 51 thentexture('sub_models/decals/decal_b.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) -- if sequence could be expandet to 1000!(limited by "select1or" function) different decals, but 10 will be ok i guess ;) else if select1 < 76 thentexture('sub_models/decals/decal_c.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) -- when adding a additional one, divide 1000 through no. of total decals else if select1 < 101 thentexture('sub_models/decals/decal_d.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) -- feel free to exchange the existing ones with your own style else if select1 < 126 then texture('sub_models/decals/decal_e.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) -- accepts any quadratical sized texture, recommendet are 128x128, 256x256else if select1 < 151 thentexture('sub_models/decals/decal_f.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 176 then texture('sub_models/decals/decal_g.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 201 then texture('sub_models/decals/decal_h.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 226 thentexture('sub_models/decals/decal_i.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 251 thentexture('sub_models/decals/decal_j.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 276 thentexture('sub_models/decals/decal_a.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 301 thentexture('sub_models/decals/decal_b.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 326 thentexture('sub_models/decals/decal_c.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 351 then texture('sub_models/decals/decal_d.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 376 thentexture('sub_models/decals/decal_e.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 401 thentexture('sub_models/decals/decal_f.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 426 thentexture('sub_models/decals/decal_g.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 451 thentexture('sub_models/decals/decal_h.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 476 thentexture('sub_models/decals/decal_i.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 501 thentexture('sub_models/decals/decal_j.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 526 thentexture('sub_models/decals/decal_a.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 551 thentexture('sub_models/decals/decal_b.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 576 thentexture('sub_models/decals/decal_c.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 601 thentexture('sub_models/decals/decal_d.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 626 thentexture('sub_models/decals/decal_e.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 651 thentexture('sub_models/decals/decal_f.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 676 thentexture('sub_models/decals/decal_g.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 701 thentexture('sub_models/decals/decal_h.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 726 thentexture('sub_models/decals/decal_i.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 751 then texture('sub_models/decals/decal_j.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 776 thentexture('sub_models/decals/decal_a.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 801 thentexture('sub_models/decals/decal_b.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 826 thentexture('sub_models/decals/decal_c.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 851 then texture('sub_models/decals/decal_d.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 876 then texture('sub_models/decals/decal_e.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 901 thentexture('sub_models/decals/decal_f.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 926 thentexture('sub_models/decals/decal_g.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 951 thentexture('sub_models/decals/decal_h.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 976 thentexture('sub_models/decals/decal_i.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) elseif select1 > 975 thentexture('sub_models/decals/decal_j.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) end end end end end endendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendend zbias(100,v(0,0,0),v(0,0,0))quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1)) -- creates a quadratic shape 1m x 1m for the decalzbias(0)end})function decal(set,v_pos,v_u,v_v)if set == 1 thenselector1() if select1 < 26 then texture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 51 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 76 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 101 thentexture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 126 then texture('sub_models/decals/decal_e.png', v_pos, v_u, v_v)else if select1 < 151 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 176 then texture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 201 then texture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 226 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) else if select1 < 251 thentexture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) else if select1 < 276 thentexture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 301 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 326 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 351 then texture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 376 thentexture('sub_models/decals/decal_e.png', v_pos, v_u, v_v) else if select1 < 401 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 426 thentexture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 451 thentexture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 476 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) else if select1 < 501 thentexture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) else if select1 < 526 thentexture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 551 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 576 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 601 thentexture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 626 thentexture('sub_models/decals/decal_e.png', v_pos, v_u, v_v) else if select1 < 651 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 676 thentexture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 701 thentexture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 726 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) else if select1 < 751 then texture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) else if select1 < 776 thentexture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 801 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 826 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 851 then texture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 876 then texture('sub_models/decals/decal_e.png', v_pos, v_u, v_v) else if select1 < 901 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 926 thentexture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 951 thentexture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 976 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) elseif select1 > 975 thentexture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) end end end end end endendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendend
the function needs some argumentsdecal(set,v_pos,v_u,v_v)the idea behind is to make it more flexible,let's say one likes to add a new set of decals and even perhaps a own routine to select them, thats why i added the "set" to the arguments.v_pos,v_u,v_v, is only ment if one likes to implement the function to a scripted model, but unfortunatly you have to pass all arguments to call the function now(still that is all ment to be called from the dynamic section)that would be thendecal(1,v(0,0,0),v(0,0,0),v(0,0,0))if you call the function for as texture for a .objmaterial i left up to the modeler to assign a own one.this one would replace the squad sign or affiliation
Code:
define_model('squad_color', {info = { bounding_radius = 1,materials = {'squad'},},static = function(lod) use_material('squad')end,dynamic = function(lod) selector1()if select1 < 201 then set_material('squad', .5,0,0,.99,.6,.6,.6,30) elseif select1 < 401 then set_material('squad', .45,.35,.01,.99,.6,.6,.6,30)else if select1 < 601 thenset_material('squad', 0,.15,.7,.99,.6,.6,.6,30) else if select1 < 801 thenset_material('squad', .06,.35,0,.99,.6,.6,.6,30)elseif select1 > 800 thenset_material('squad', .2,0,.35,.99,.6,.6,.6,30)endendendendendend})define_model('squadsign_1', {info = { bounding_radius = 1,materials = {'squad'},},static = function(lod)use_material('squad')texture('squad_1.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(100,v(0,0,0),v(0,0,0))quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end,dynamic = function(lod)selector1()if select1 < 201 then set_material('squad', .5,0,0,.99,.2,.2,.2,10) elseif select1 < 401 then set_material('squad', .45,.35,.01,.99,.2,.2,.2,10)else if select1 < 601 thenset_material('squad', 0,.15,.7,.99,.2,.2,.2,10) else if select1 < 801 thenset_material('squad', .06,.35,0,.99,.2,.2,.2,10)elseif select1 > 800 thenset_material('squad', .2,0,.35,.99,.2,.2,.2,10)endendendendendend })define_model('imp_sign_1', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)end,dynamic = function(lod)selector1()if select1 < 201 then texture('sub_models/squadsign/impsign_0.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) elseif select1 < 401 then texture('sub_models/squadsign/impsign_1.png', v(0,0,0), v(0,0,-1), v(0,-1,0))else if select1 < 601 then texture('sub_models/squadsign/impsign_2.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) else if select1 < 801 then texture('sub_models/squadsign/impsign_3.png', v(0,0,0), v(0,0,-1), v(0,-1,0))elseif select1 > 800 then texture('sub_models/squadsign/impsign_4.png', v(0,0,0), v(0,0,-1), v(0,-1,0))endendendendenduse_material('mat')zbias(100,v(0,0,0),v(0,0,0))quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})function imp_sign(set,v_pos,v_u,v_v)-- preset, because i need time to update my modelslocal set = 1local v_pos = v(0,0,0)local v_u = v(-1,0,0)local v_v = v(0,-1,0)if set == 1 thenselector1()if select1 < 201 then texture('sub_models/squadsign/impsign_0.png', v_pos, v_u, v_v) elseif select1 < 401 then texture('sub_models/squadsign/impsign_1.png', v_pos, v_u, v_v)else if select1 < 601 then texture('sub_models/squadsign/impsign_2.png', v_pos, v_u, v_v)else if select1 < 801 then texture('sub_models/squadsign/impsign_3.png', v_pos, v_u, v_v)elseif select1 > 800 then texture('sub_models/squadsign/impsign_4.png', v_pos, v_u, v_v)endendendendendendendfunction fed_sign(set,v_pos,v_u,v_v)-- preset, because i need time to update my modelslocal set = 1local v_pos = v(0,0,0)local v_u = v(-1,0,0)local v_v = v(0,-1,0)if set == 1 thenselector1()if select1 < 201 thenset_material('squad', .5,0,0,.99,.2,.2,.2,10) elseif select1 < 401 thenset_material('squad', .45,.35,.01,.99,.2,.2,.2,10) else if select1 < 601 then set_material('squad', 0,.15,.7,.99,.2,.2,.2,10)else if select1 < 801 then set_material('squad', .06,.35,0,.99,.2,.2,.2,10)elseif select1 > 800 thenset_material('squad', .2,0,.35,.99,.2,.2,.2,10)endendendendendendtexture('sub_models/squadsign/squad_1.png', v_pos, v_u, v_v)use_material('squad')end
it's will be called like the decal function now and needs to get some information from you ;) that's again set,v_pos,v_u,v_vi.e.imp_sign(1,v(0,0,0),(0,0,-1),v(0,-1,0))if one would like to use it in a scripted model using a quad sized 1x1actually this is overridden by me because i need some time to update my existing models.but if one likes to use the new script allready, i can only recommend to use it in the above shown way.i guess i will have to update all models to use the function, then i will remove the old model from the script.fortunatly not many except myself used it until now.still i could explain how to place a pre-modeled decal, the system behind is useful for any transformation you like to do into a script.this upgraded function allows you to make small texture animations for the decals. 8-)
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

in future the script will look like this, because it makes no sense to have three functions doing the same.imperial, federal, alien or half machine half beast, will be selected by set argument
Code:
function decal(set,v_pos,v_u,v_v)if set == 1 thenselector1() if select1 < 26 then texture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 51 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 76 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 101 thentexture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 126 then texture('sub_models/decals/decal_e.png', v_pos, v_u, v_v)else if select1 < 151 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 176 then texture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 201 then texture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 226 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) else if select1 < 251 thentexture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) else if select1 < 276 thentexture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 301 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 326 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 351 then texture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 376 thentexture('sub_models/decals/decal_e.png', v_pos, v_u, v_v) else if select1 < 401 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 426 thentexture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 451 thentexture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 476 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) else if select1 < 501 thentexture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) else if select1 < 526 thentexture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 551 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 576 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 601 thentexture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 626 thentexture('sub_models/decals/decal_e.png', v_pos, v_u, v_v) else if select1 < 651 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 676 thentexture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 701 thentexture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 726 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) else if select1 < 751 then texture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) else if select1 < 776 thentexture('sub_models/decals/decal_a.png', v_pos, v_u, v_v) else if select1 < 801 thentexture('sub_models/decals/decal_b.png', v_pos, v_u, v_v) else if select1 < 826 thentexture('sub_models/decals/decal_c.png', v_pos, v_u, v_v) else if select1 < 851 then texture('sub_models/decals/decal_d.png', v_pos, v_u, v_v) else if select1 < 876 then texture('sub_models/decals/decal_e.png', v_pos, v_u, v_v) else if select1 < 901 thentexture('sub_models/decals/decal_f.png', v_pos, v_u, v_v) else if select1 < 926 thentexture('sub_models/decals/decal_g.png', v_pos, v_u, v_v) else if select1 < 951 thentexture('sub_models/decals/decal_h.png', v_pos, v_u, v_v) else if select1 < 976 thentexture('sub_models/decals/decal_i.png', v_pos, v_u, v_v) elseif select1 > 975 thentexture('sub_models/decals/decal_j.png', v_pos, v_u, v_v) end end end end end endendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendendif set == fed thenselector1()if select1 < 201 thenset_material('squad', .5,0,0,.99,.2,.2,.2,10) elseif select1 < 401 thenset_material('squad', .45,.35,.01,.99,.2,.2,.2,10) else if select1 < 601 then set_material('squad', 0,.15,.7,.99,.2,.2,.2,10)else if select1 < 801 then set_material('squad', .06,.35,0,.99,.2,.2,.2,10)elseif select1 > 800 thenset_material('squad', .2,0,.35,.99,.2,.2,.2,10)endendendendendtexture('sub_models/decal/squad_1.png', v_pos, v_u, v_v)use_material('squad')endif set == imp thenselector1()if select1 < 201 then texture('sub_models/decal/impsign_0.png', v_pos, v_u, v_v) elseif select1 < 401 then texture('sub_models/decal/impsign_1.png', v_pos, v_u, v_v)else if select1 < 601 then texture('sub_models/decaln/impsign_2.png', v_pos, v_u, v_v)else if select1 < 801 then texture('sub_models/decal/impsign_3.png', v_pos, v_u, v_v)elseif select1 > 800 then texture('sub_models/decal/impsign_4.png', v_pos, v_u, v_v)endendendendendend-- a new set starts from hereend
i will have to move all textures to decals, but thats worth the profit to have one function for all purpose.further this would allow to decide which symbol is shown by the players affiliation, of course that isn't yet possible but maybe in future.
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

Thanks. Btw, if you replace all of your:
Code:
else if
with this:
Code:
elseif
you won't need to have this:
Code:
end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end
;)
Taquito
Private
Posts: 49
Joined: Sun Dec 12, 2010 4:37 pm

RE: modeling for pioneer

Post by Taquito »


s2odan wrote:
I just checked and wings 3d can export .obj files so there should be no problems with exporting directly from wings3d.
Sounds great. I remember I did some space station models years ago for a freelancer mod that never got accepted (Cause I suck at 3D modeling!) :oops: I had more but I can't find them in the folder.[hsimg]http://i54.tinypic.com/2lo6mht.jpg[/hsimg][hsimg]http://i54.tinypic.com/o08iu9.jpg[/hsimg]Anyways maybe I can try to build a basic concept for a space craft.
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

:oops: yes, i know...---and wings3d is not bad, no "useless" features, .obj export incl .mat lib, perhaps you have to remove the "matlib" line at start of the object, if you don't use the .mat lib (using .mat is possible but prevents from using smaller textures for smaller LOD with the same object).using matlib materials settings causes sometimes problems (if that is still the same), i didn't use it since i discovered that, except if i like to join meshes using different textures but the same material, like i did for all XWA conversions.materials specified in a script will override .mat lib.this are screenshots from the cobra3 how she came with pioneer using materials from matlib, i only changed the view angle.that would be the proper lightingthen suddenly this happens
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »


Code:
function decal(set,v_pos,v_u,v_v)if set == 1 thenselector1() if select1 < 26 then texture('sub_models/decals/decal_a.png', v_pos,v_u,v_v) elseif select1 < 51 thentexture('sub_models/decals/decal_b.png', v_pos,v_u,v_v) elseif select1 < 76 thentexture('sub_models/decals/decal_c.png', v_pos,v_u,v_v) elseif select1 < 101 thentexture('sub_models/decals/decal_d.png', v_pos,v_u,v_v) elseif select1 < 126 thentexture('sub_models/decals/decal_e.png', v_pos,v_u,v_v) elseif select1 < 151 thentexture('sub_models/decals/decal_f.png', v_pos,v_u,v_v)elseif select1 < 176 then texture('sub_models/decals/decal_g.png', v_pos,v_u,v_v) elseif select1 < 201 thentexture('sub_models/decals/decal_h.png', v_pos,v_u,v_v)elseif select1 < 226 thentexture('sub_models/decals/decal_i.png', v_pos,v_u,v_v)elseif select1 < 251 thentexture('sub_models/decals/decal_j.png', v_pos,v_u,v_v) elseif select1 < 276 thentexture('sub_models/decals/decal_a.png', v_pos,v_u,v_v)elseif select1 < 301 thentexture('sub_models/decals/decal_b.png', v_pos,v_u,v_v)elseif select1 < 326 thentexture('sub_models/decals/decal_c.png', v_pos,v_u,v_v)elseif select1 < 351 thentexture('sub_models/decals/decal_d.png', v_pos,v_u,v_v) elseif select1 < 376 thentexture('sub_models/decals/decal_e.png', v_pos,v_u,v_v)elseif select1 < 401 thentexture('sub_models/decals/decal_f.png', v_pos,v_u,v_v)elseif select1 < 426 thentexture('sub_models/decals/decal_g.png', v_pos,v_u,v_v) elseif select1 < 451 thentexture('sub_models/decals/decal_h.png', v_pos,v_u,v_v) elseif select1 < 476 thentexture('sub_models/decals/decal_i.png', v_pos,v_u,v_v)elseif select1 < 501 thentexture('sub_models/decals/decal_j.png', v_pos,v_u,v_v) elseif select1 < 526 thentexture('sub_models/decals/decal_a.png', v_pos,v_u,v_v) elseif select1 < 551 thentexture('sub_models/decals/decal_b.png', v_pos,v_u,v_v) elseif select1 < 576 thentexture('sub_models/decals/decal_c.png', v_pos,v_u,v_v) elseif select1 < 601 thentexture('sub_models/decals/decal_d.png', v_pos,v_u,v_v) elseif select1 < 626 thentexture('sub_models/decals/decal_e.png', v_pos,v_u,v_v) elseif select1 < 651 thentexture('sub_models/decals/decal_f.png', v_pos,v_u,v_v) elseif select1 < 676 thentexture('sub_models/decals/decal_g.png', v_pos,v_u,v_v) elseif select1 < 701 thentexture('sub_models/decals/decal_h.png', v_pos,v_u,v_v)elseif select1 < 726 thentexture('sub_models/decals/decal_i.png', v_pos,v_u,v_v) elseif select1 < 751 thentexture('sub_models/decals/decal_j.png', v_pos,v_u,v_v) elseif select1 < 776 thentexture('sub_models/decals/decal_a.png', v_pos,v_u,v_v) elseif select1 < 801 thentexture('sub_models/decals/decal_b.png', v_pos,v_u,v_v) elseif select1 < 826 thentexture('sub_models/decals/decal_c.png', v_pos,v_u,v_v) elseif select1 < 851 thentexture('sub_models/decals/decal_d.png', v_pos,v_u,v_v)elseif select1 < 876 thentexture('sub_models/decals/decal_e.png', v_pos,v_u,v_v) elseif select1 < 901 thentexture('sub_models/decals/decal_f.png', v_pos,v_u,v_v) elseif select1 < 926 thentexture('sub_models/decals/decal_g.png', v_pos,v_u,v_v) elseif select1 < 951 thentexture('sub_models/decals/decal_h.png', v_pos,v_u,v_v) elseif select1 < 976 thentexture('sub_models/decals/decal_i.png', v_pos,v_u,v_v)elseif select1 > 975 thentexture('sub_models/decals/decal_j.png', v_pos,v_u,v_v) endendif set == fed thenselector1()if select1 < 201 thenset_material('squad', .5,0,0,.99,.2,.2,.2,10) elseif select1 < 401 thenset_material('squad', .45,.35,.01,.99,.2,.2,.2,10) elseif select1 < 601 then set_material('squad', 0,.15,.7,.99,.2,.2,.2,10)elseif select1 < 801 then set_material('squad', .06,.35,0,.99,.2,.2,.2,10)elseif select1 > 800 thenset_material('squad', .2,0,.35,.99,.2,.2,.2,10)endtexture('sub_models/decal/squad_1.png', v_pos, v_u, v_v)use_material('squad')endif set == imp thenselector1()if select1 < 201 then texture('sub_models/decal/impsign_0.png', v_pos, v_u, v_v) elseif select1 < 401 then texture('sub_models/decal/impsign_1.png', v_pos, v_u, v_v)elseif select1 < 601 then texture('sub_models/decaln/impsign_2.png', v_pos, v_u, v_v)elseif select1 < 801 then texture('sub_models/decal/impsign_3.png', v_pos, v_u, v_v)elseif select1 > 800 then texture('sub_models/decal/impsign_4.png', v_pos, v_u, v_v)endend -- a new set starts from hereend
satisfied? ;)
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »


Quote:
satisfied? ;)
hehe :mrgreen:
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

wow awesome work Gernot ;)
Coolhand
Private
Posts: 112
Joined: Mon Oct 18, 2010 3:43 am

RE: modeling for pioneer

Post by Coolhand »

It is very nice to see some organic animation. I think if you wanted to imply a 'live' alien ship this is great.
Coolhand
Private
Posts: 112
Joined: Mon Oct 18, 2010 3:43 am

RE: modeling for pioneer

Post by Coolhand »

additionally, you should check out the game biohazard battle for the sega genesis... a shooter featuring living organic ships, yours really reminds me of this.
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

getting closer
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

Its a Void-Hawk?
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

i named it Gul, but if you have any good idea for a name, i will appreciate. Void Hawk... not bad, where is that from?instead of a lot of screenshots a presentation, get that bird at the download area,Gul_2011-02-17.zipfor the very keen ones, that small gap between top and bottom, will be fixed.this happens because the movement for top and bottom is not in the same part-model and uses not the same vectors.
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

Void-hawk is a living ship from the 'Night's Dawn trilogy' of books by Peter F. Hamilton. Although I think they are more of a tear-drop/ovoid shape.Have you also created a seperate collision mesh? As the movement of the mesh will cause the collision mesh to get updated every frame if it doesnt have a seperate one.
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

not for the scripted part of the model. no need to, since that is easy to handle for pioneer and the bezier stuff will use much less divisions at LOD1. to use no textures for LOD1 is the more important thing to keep a good framerate, imo.
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

I showed the model to John and Tom, they reckon you will need a proper collision mesh because every time the model moves it re calculates the entire mesh, which is bad.
Potsmoke66
Private
Posts: 1815
Joined: Sun Nov 27, 2016 2:43 pm

RE: modeling for pioneer

Post by Potsmoke66 »

oh, i don't wanna fight...if i think that it was my idea (experience) to reserve LOD1 as collision mesh only... ;)of course you could use LOD1 as lowest visible, but like i said textures kill the framerate even on a small model.to find the proper material that equals to the color of the textured material is nearly impossible, the eagle and the ip shuttle was build that way in the beginning, but i never found a good setting so you won't see when the LOD changes.Later when i converted the lanner, i encountered some problems using the texture like it was for done for the cobra3.that's when i started to set LOD1 to .1 which is never visible. that is in fact a loss of one LOD for the model.the slow down is really extreme when you load a model using textures at LOD1, you can feel that in the moment you purchased the ship, because then the collision data starts to get calculated (you won't feel that in the modelviewer), you remember of course the troubles the panther gave you.i will have anyway to review the scripted part, because of the previous described gap, so i can add a stiff collision mesh as well in no time.problems i haven't encountered so far, it's not "slower" then any other model using 17k tri's.[attachment=555:2011-02-18_174454.jpg]
s2odan
Private
Posts: 1212
Joined: Sun Mar 22, 2009 9:50 pm

RE: modeling for pioneer

Post by s2odan »

I was just pointing something out to you that you might not have realised. I didnt realise it until it was pointed out to me :)So does it run well anyway? I don't really have time to check it out at the moment, so I haven't been able to see if hte moving mesh makes any difference at all.It would be interesting if you could somehow get it to only flap its wings in an atmosphere :)
Quote:
you remember of course the troubles the panther gave you.
Yes I remember the slideshow :) It was sooo slow for undocking from a station.
Post Reply

Return to “Pioneer”