RE: modeling for pioneer
Posted: Fri Sep 17, 2010 1:08 am
by Potsmoke66
it starts to get well shaped...the fins on the back could be "softer", imho.uc anim, i guess most time i spend with them when working out a model.check the eagles or the sidewinder how you can make a opening into a surface without breaking it up.you can simply add a transparent shape to "cheat" a hole into a surface.a transparent layer will "cut" through all shapes that are loadet or created afterwards, but leaves the previous loadet (created) shapes visible.easiest, use no material for such a shape to cutout, if you have to, because you've allready applied a material previously,then use a 0 alpha channel (0,0,0,0,0,0,0,0), if you see a black shape in modelviewer then use a temporary mask texture to make it invisible (a blank texture, uses only alpha channel, if that can't be made right with your paint prog. add one visible pixel in lower left corner i.e., you can remove the call for the texture and the texture when the model is finished, the game will show the transparency right.at least this helps to make the opening for the uc somewhat easier, you can use flaps then to open/close the cage.another idea is like the eagles uc, simply animate the "cutout" shape to open slowly, any shape is to imagine for it even a circle would look nice, if slided open it looks then like a iris blend. you can make functions instead of sub_models, that allows to port some data from the model to them.example (under construction):
Code:
function gelati(pos,rot,scale) -- pos=position, rot=rotation value, scale=scale x,y,z, use_material('pine') texture('pine_01.png') load_obj('pine_01.obj', Matrix.translate(pos) * Matrix.rotate(rot*math.pi,v(0,1,0)) * Matrix.scale(scale))endfunction broccoli(pos,rot,scale) -- pos=position, rot=rotation value, scale=scale x,y,z, use_material('oak') texture('oak_01.png') load_obj('oak_01.obj', Matrix.translate(pos) * Matrix.rotate(rot*math.pi,v(0,1,0)) * Matrix.scale(scale))enddefine_model('woods_0', { info = { bounding_radius = 30, materials = {'pine', 'oak'}, }, static = function(lod) set_material('oak', .6,.6,.6, .99, .4,.4,.3, 1) set_material('pine', .5,.5,1, .99, .5,.4,.3, 1) --[[ sizes: normal = 1:1 large = 3:2 wide = 2:3 --]] gelati(v(10,0,15),0,v(20,40,20)) gelati(v(-15,0,20),.3,v(17,25,17)) -- large broccoli(v(20,0,5),0,v(15,10,15)) -- wide gelati(v(15,0,-15),1.5,v(9,6,9)) broccoli(v(-20,0,-5),1.2,v(10,30,10)) gelati(v(10,0,-10),1,v(12,12,12)) -- normal broccoli(v(-5,0,-20),1.2,v(9,9,9)) broccoli(v(5,0,-30),.7,v(9,9,9)) broccoli(v(0,0,0),.4,v(15,15,15)) gelati(v(20,0,-30),1,v(15,10,15)) broccoli(v(35,0,20),.3,v(10,30,10)) broccoli(v(-15,0,-35),1.5,v(20,13,20)) gelati(v(-30,0,-20),1.7,v(20,30,20)) broccoli(v(-45,0,-10),.2,v(15,10,15)) gelati(v(-15,0,5),.6,v(20,15,20)) broccoli(v(-35,0,10),.7,v(15,30,15)) gelati(v(-5,0,25),.5,v(20,10,20)) end})define_model('woods_1', { info = { bounding_radius = 30, materials = {'pine', 'oak'}, }, static = function(lod) set_material('oak', .6,.6,.6, .99, .4,.4,.3, 1) set_material('pine', .5,.5,1, .99, .5,.4,.3, 1) gelati(v(10,0,15),0,v(20,30,20)) -- large gelati(v(-15,0,20),.3,v(17,25,17)) broccoli(v(20,0,5),0,v(15,10,15)) -- wide gelati(v(15,0,-15),1.5,v(9,6,9)) broccoli(v(-20,0,-5),.6,v(10,30,10)) gelati(v(10,0,-10),1,v(12,12,12)) -- normal broccoli(v(-5,0,-20),1.2,v(6,6,6)) broccoli(v(5,0,-20),.7,v(6,6,6)) end})
or
Code:
function bld_base_1(lod) local v0 = v(3,0,10) local v1 = v(-3,0,10) local v2 = v(7,0,3) local v4 = v(7,0,-3) local v6 = v(3,0,-7) local v7 = v(-3,0,-7) local v10 = v(3,-50,10) local v11 = v(-3,-50,10) local v12 = v(7,-50,3) local v14 = v(7,-50,-3) local v16 = v(3,-50,-7) local v17 = v(-3,-50,-7) local v20 = v(3,1,10) local v21 = v(-3,1,10) local v22 = v(7,1,3) local v24 = v(7,1,-3) local v26 = v(3,1,-7) local v27 = v(-3,1,-7) if lod > 1 then use_material('concrete') texture('conc.png', v(.5,.5,0),v(.05,0,0),v(0,0,1)) end xref_quad(v0,v2,v4,v6) quad(v0,v6,v7,v1) if lod > 1 then texture('conc.png', v(.5,.5,0),v(.05,0,0),v(0,.05,0)) end quad(v0,v1,v11,v10) quad(v6,v16,v17,v7) if lod > 1 then texture('conc.png', v(.5,.5,0),v(0,0,1),v(0,.05,0)) end xref_quad(v0,v10,v12,v2) xref_quad(v2,v12,v14,v4) xref_quad(v4,v14,v16,v6) if lod > 1 then use_material('fce_glow') texture('fence_glow.png', v(.5,.28,0),v(.1,0,0),v(0,1,0)) quad(v20,v0,v1,v21) quad(v26,v27,v7,v6) texture('fence_glow.png', v(.5,.28,0),v(0,0,.25),v(0,1,0)) xref_quad(v0,v20,v22,v2) xref_quad(v2,v22,v24,v4) xref_quad(v4,v24,v26,v6) texture('fence_glow.png', v(.5,.28,0),v(.1,0,0),v(0,1,0)) quad(v20,v21,v1,v0) quad(v26,v6,v7,v27) texture('fence_glow.png', v(.5,.28,0),v(0,0,.25),v(0,1,0)) xref_quad(v0,v2,v22,v20) xref_quad(v2,v4,v24,v22) xref_quad(v4,v6,v26,v24) endendfunction bld_base_2(lod) local v0 = v(3,0,7) local v1 = v(-3,0,7) local v2 = v(7,0,3) local v4 = v(7,0,-3) local v6 = v(3,0,-7) local v7 = v(-3,0,-7) local v10 = v(3,-40,7) local v11 = v(-3,-40,7) local v12 = v(7,-40,3) local v14 = v(7,-40,-3) local v16 = v(3,-40,-7) local v17 = v(-3,-40,-7) local v20 = v(3,1,7) local v21 = v(-3,1,7) local v22 = v(7,1,3) local v24 = v(7,1,-3) local v26 = v(3,1,-7) local v27 = v(-3,1,-7) if lod > 1 then use_material('concrete') texture('conc.png', v(.5,.5,0),v(.05,0,0),v(0,0,1)) end xref_quad(v0,v2,v4,v6) quad(v0,v6,v7,v1) if lod > 1 then texture('conc.png', v(.5,.5,0),v(.05,0,0),v(0,.05,0)) end quad(v0,v1,v11,v10) quad(v6,v16,v17,v7) if lod > 1 then texture('conc.png', v(.5,.5,0),v(0,0,1),v(0,.05,0)) end xref_quad(v0,v10,v12,v2) xref_quad(v2,v12,v14,v4) xref_quad(v4,v14,v16,v6) if lod > 1 then use_material('fce_glow') texture('fence_glow.png', v(.5,.28,0),v(.1,0,0),v(0,1,0)) quad(v20,v0,v1,v21) quad(v26,v27,v7,v6) texture('fence_glow.png', v(.5,.28,0),v(0,0,.25),v(0,1,0)) xref_quad(v0,v20,v22,v2) xref_quad(v2,v22,v24,v4) xref_quad(v4,v24,v26,v6) texture('fence_glow.png', v(.5,.28,0),v(.1,0,0),v(0,1,0)) quad(v20,v21,v1,v0) quad(v26,v6,v7,v27) texture('fence_glow.png', v(.5,.28,0),v(0,0,.25),v(0,1,0)) xref_quad(v0,v2,v22,v20) xref_quad(v2,v4,v24,v22) xref_quad(v4,v6,v26,v24) endendfunction combo_sub(lod,type,r,g,b,a,sr,sg,sb,sl) set_material('default',r,g,b,a,sr,sg,sb,sl) set_material('fce_glow', 0,0,0,.9,0,0,0,0,1.5,2,.7) set_material('concrete',.6,.6,.5,1,.3,.3,.3,5) set_material('win_on', .2,.33,.35,1,1.5,1.8,2,100,1.6,1.8,1.8) set_material('win_off', .2,.33,.35,1,1.5,1.8,2,100) set_material('win', .2,.33,.35,.4,1.5,1.8,2,100) set_material('cutout', .45,.55,.6,.9,.5,.5,.6,30) set_material('trees', .7,.8,.6,.9,.5,.3,.3,1) set_material('grass', .3,.6,.4,1,.5,.3,.3,1) if lod > 1 then use_material('default') texture('alu.png') end load_obj('combo_0.obj') if lod > 1 then use_material('cutout') texture('door.png',v(.5,.9,0),v(.5,0,0),v(0,-.5,0)) -- front zbias(1,v(0,1.2,7),v(0,0,1)) circle(4,v(0,1.2,7),v(0,0,1),v(1,0,0),1) zbias(0) texture('door.png',v(.5,.88,0),v(.625,0,0),v(0,-.625,0)) -- front zbias(1,v(0,5.8,3),v(0,0,1)) circle(4,v(0,5.8,3),v(0,0,1),v(1,0,0),.8) zbias(0) texture('alu.png') use_material('win_on') load_obj('combo_wins_on.obj') use_material('win_off') load_obj('combo_wins_off.obj') texture('rgh.png',v(.5,.5,0),v(.2,0,0),v(0,0,1.2)) use_material('grass') quad(v(3,5,7),v(3,5,3),v(-3,5,3),v(-3,5,7)) end if type == 0 then if lod > 1 then texture('tree.png') use_material('trees') load_obj('bush_0.obj') end elseif type == 1 then if lod > 1 then texture('tree.png') use_material('trees') load_obj('bush_1.obj') use_material('win') texture('win.png',v(0,0,0),v(.2,0,0),v(0,0,1)) end quad(v(3,5,7),v(3,7,3),v(-3,7,3),v(-3,5,7)) bld_base_1(lod) endenddefine_model('combo_y', { info = { lod_pixels = {.1,10,50,0}, bounding_radius = 10, materials = {'default', 'concrete', 'cutout', 'trees', 'grass', 'win', 'win_on', 'win_off', 'fce_glow'}, tags = {'city_building'}, }, static = function(lod) combo_sub(lod,1,.6,.55,.4,1,1.26,1.4,1.66,30) end})define_model('combo_g', { info = { lod_pixels = {.1,10,50,0}, bounding_radius = 10, materials = {'default', 'concrete', 'cutout', 'trees', 'grass', 'win', 'win_on', 'win_off', 'fce_glow'}, tags = {'city_building'}, }, static = function(lod) combo_sub(lod,1,.5,.6,.4,1,1.26,1.4,1.66,30) end})
that could be for shure a vector to, so you can "parent" animated vectors to your functions and link the parts proper.it's a new idea* i had and my ships will have to be reworked all to this.further this can help to write or load a model multiple times just for a variable like colors, position or rotation etc.with a if request you could use it also to determine which texture the called function (part) should have (like i used for "type" in combo script).i guess the ideal thing for the uc flaps, write just once, determine pos. and rotation (rotation of the part to fit to model not animation, but this will be possible to for shure, even better use uc animation only on the function(s) and just call he function in your model) and texture of the part by choice later.*not really new, only new to me, i still have to find out a lot and the (better)use of functions is a "new" topic.once i will rewrite the standard uc as function, let's say a bit a nicer one, with correct transparency for the cage and arguments to control the size, color and texture of them. i guess that coud be handy for simple model releases like my cobra mk1.but first i have to fix the mess i produced in my install, actually it won't run because of i don't know, the models all work fine in modelviewer but somewhere i did a mistake and the game didn't start's proper, and outputs no error.but i know by now it's somwhere in the station script i guess, at least that's the one which causes the error when ported to a new install.