Completed Pioneer Models
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
disclaimer:following models and sub-models are in alpha11 state,i guess they will need some fixes to run them on a current version.firstthe needed submodels with the renewed pilot modela really important update for the pilots, all following ships, stations & buildings will need some of the contained sub-models.i hope the final pilot model works, because i added today the robot-pilot but had no chance to test it.[url]http://pioneer-universum.web.officelive.com/Documents/sub_models.zip[/url] NEW ships, like noted before they need the new pilots (sorry, i hope they will last a little), but need also a fixup for alpha14/15 i guess.[url]http://pioneer-universum.web.officelive.com/Documents/bloodrunner.zip[/url] models that have changed completely or partwisely, mostly use of new sub-models (script only then) some texture and/or models updates (alpha11 state[url]http://pioneer-universum.web.officelive.com/Documents/ships%20-%20changed%20models.zip[/url] ships (alpha11 state)two ships here the "suprosa" from SW-XWA and the "Cobra MKIII" from FFED3D, which i would have to find the owner first for.[url]http://pioneer-universum.web.officelive.com/Documents/suprosa.zip[/url] new groundstation 1-4 docking ports, still a wip i was interrupted by the broken gfx card.it includes a very large tube as somekind of city monorail, it has no collision mesh (the monorail) so it didn't hinders the city from getting build, therefore it will sometimes cross other buildings, use it by choice.[url]http://pioneer-universum.web.officelive.com/Documents/stations.zip[/url] new buildings and the updated rest of buildings (removed collision mesh for basements = buildings stand closer)new buildings[url]http://pioneer-universum.web.officelive.com/Documents/bld_ind_p66.zip[/url] buildings[url]http://pioneer-universum.web.officelive.com/Documents/buildings_greyoxide.zip[/url] hostile planets groundstation wip[url]http://pioneer-universum.web.officelive.com/Documents/spaceport_hostile_wip.zip[/url] made also more of these little SEUCK games you can visit this at[url]http://www.glbasic.com/forum/index.php?topic=6523.msg57963#msg57963[/url] i can't move my right hand proper, that's crazy...
RE: Completed Pioneer Models
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
the orion is complete in the "changed models" download, some i left complete, because i remembered they are not in github.carefully install the pilot and the scanner from sub-models (or better all of them), then i would say coolhands viper, but it needs fixes perhaps to the ship-specs, or does run ships with alpha11 specs on alpha15? (i still can't run pioneer myself, needs a litle time).the cobra3 is from sparks, i added a note to the download.and removed a ugly note from bloodrunner 
-
ElectricSkies
- Private
- Posts: 15
- Joined: Wed Sep 07, 2011 2:25 am
RE: Completed Pioneer Models
potsmoke66 wrote:
Mind. Blown.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
if you like to test the models without messing around with the scripts i suggest to download a alpha11 pioneer and add the models & submodels (or vice versa copy alpha11 without models and submodels over btb10) from "bob the builders builds" after that copy all new files (all) over the existing, i guess that could work.while i'm staying busy getting my gfx card running proper.can someone tell me in short words what has changed to models since 11?yes, i can sort that out myself...
RE: Completed Pioneer Models
do not use os.clockonly single version of textures - no more small, medium, large or whateverdo not use load_obj in dynamicput missiles to >=lod3,thrusters >=lod2, nobody cares about pilotsno broken animationsno broken bounding radiusno dead wrong lod_pixels
RE: Completed Pioneer Models
Gernot, ignore this one:
Quote:
nobody cares about pilots
I care
Quote:
nobody cares about pilots
I care
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
yeah, sounds like durandal likes to explain modeling for pioneer to me
i don't mindthere will be a lot "wrong" to this conditions, but well...i guess i'm permitted to do so
apart from that based to my own experiences, texture use (if,how, projection is better then per-face) is much more important then a use of all LODs (with exception of a must for a untextured low poly collision mesh, the fact that the lowest lod has to be untextured worthes more then 100000 polys, additionally remove any uv, reset uv for a collision mesh so all faces use the same uv values, or use a projection from only one side for the whole mesh)of course any dynamic transformed .obj is a framerate killer. main reason for the updated pilots, even a dynamic selection of a texture can lower the framerate much.i guess that will be the first to fixup for alpha15, so you can see what difference it makes (quite some, ie. to the courier).the "don't transform .obj dynamic" can be broken if really needed for certain cases, it won't harm.but in general,- it's evil for a landing gear- bad choice for texture variations on your model- usually a later dynamic used but static sub-model is the far better choice. you can sometimes usetexture dynamic on a scripted geometry (or in limited range on .obj), that gives you some special fx.check the cobra3d and coolhands viper for this, they have a new sort of "engine glow" and broken engine anim (viper_heavy_wear).i like pilots to... and cockpits, and bridges, and little things you nearly can't see (like a scrolling disclaimer on a screen)
hey that has tradition...ever seen a"CAUTIONprotective cloth must be worn at all time, radioactivity persists even when engines cooled down."in frontier, without hacking the bounding radius of the ship, or watching your (ex) own cobra mk3 from the escape capsule?btw, you CAN read it in pioneer..."the difference between a good movie and a "classic" is in the things you don't see." but i didn't ment left up to imagination.[/hr]no, i ment the changed get_arg(Whatever), but like i said i can sort that out myself.i guess it will take quite some time until i'm able to run pioneer again, though either i have to update the models slowly (one by one and i would have to wait for results) or someone is patiently enough to help.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
- scrolling disclaimer/credits on three screens (one is like three they use all the same uv projection)- a mini planetarium- scanner beam on scanner display- i would have liked a analog displayed thrust... (still have a free gauge display) things more offense to see
- somekind of a "jacobs ladder"- clocks displaying game time and your local time (date, first i was displaying the local date instead of the credits/disclaimer).i know, i was getting a little far with the details for this bridge, one visitor asked (that's true) "can i walk around in this bridge?"[/hr]and oh, i still will use os.clock() or os.date() if i feel it fits good for some use (and if i'm not wrong, i can always use it from lua).i used it (note i was offline since alpha11) before mainly to evade a gametime issue (counting only seconds from april on).further i still like a "steady" rotating scanner better then one that looks (at accel. time) like it would like to lift off in the next moment (sorry)some "craaaazy" animations, like the running lights on the (revisited) big_crappy, using vlerp and a sine curve, need a 100% true clock, else that **** don't works.[/hr]it is to think about to leave the scanner and other animated sub-models un animated.would mean less comfort, but more flexibility for the modeler who likes to use them.even if a "guideline" would be good, though all use it the same way.i guess that needs a democratic voting.but that's not the only thing i'm not conform to the conventions, as far as such exist at all.i also still have a problem with that 50/50 hull/capacity settings, why don't we use it as they was ment?i'm aware that a empty ship will have a extreme accel. with the specs how i use them, but a ships never empty and due to the large weight jump from class 4 to 5 especially large ships havn't as much space left as expected (this using a relation in between 1/3 and 1/2), imo 1/3 (fighters) up to 1/2 (transporters) is ok.some crazy small fighters haven't left one tonne extra after fueling, why more hullmass?still they should have reasonably a better range (a far better), else there is no need to buy them, why more hullmass?.some "oldtimers" might have a relation 1/1 or even worse, that's ok.sometimes we like to derivate from frontier, other times the hyperdrive from a ip shuttle get's removed, why?no hyperdrive for the shuttle, but the smaller talon or my adc-40 (the ship is sized almost like the stow master fighter i found out) can have one?i've noticed you can trade inter-system now, still you could start with a ip_shuttle (and 100 creds) somewhere, will cost some time until you can afford a hyperdrive at all. not that it's a big problem for me, i'm only guessing.btw, did you ever blew off 100tons of hull with a 1 or a 2MW pulse laser, have patience... a lot of patience.(i know missiles work better).yes, you are much weaker with less hull, but the enemies to.and yes, i really like pilots and such things they personalize your ship in some wayi still use(d) the "body_shop" script, a cool thing is that, to get a ship with different reg. no (through that different pilots, flight-group, decals)actually i added a robot pilot (i know has far to much polys now the robot, must be reworked but it's a cool thing and has no textures so it can have some more polys),what about a alien? perhaps, but only perhaps i could remove one or two variations.further i could split the helmets from the pilot, like i actually splitted the chair from it, that would need less variations then, you would have to call then the helmet model if needed.i also thought about some different method to predefine the helmet model or if one is worn at all, but then you won't have no control over that and that's not as good. the local lightened pilot models i like to keep, because else it looks strange when a global lightened pilot sits in a (perhaps) local lightened bridge.
RE: Completed Pioneer Models
Don't worry your ugly models are not going to be in my branch.Not mentioning how ugly they look and how broken animations they have.Or stupid use of os.clock or bilboard stuff when pos lights sub models are available or rotating galactic map in viper x.Or stupid looking smiling pilot face in ship with thousands of small parts in unindented code.You already showed your skills and I will just move on.I will stop now, it is pointless anyway to have proper discussion with your ego trip.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
thanks, for compliments
do i harmed you in some sort... ugly, ok that's flavour, fortunatelystupid use of os.clock, hm well you would have liked no animations after january (game time), since one year? Or stupid looking smiling pilot face in ship with thousands of small parts in unindented code, which one would be that? unindented, yeah cool, i accidentially hit a few keys and "swoosh" there was a model born...yes, i really must have been on a ego trip sharing all my experiences even with guys like you (someone told me the complete egoist shares only because of egoism, could be).why haven't i heard of such a eagle like you are before?ugly is by choice but "how broken animations they have" can you help me which one, so i could possibly fix it if it's in the range of my limited capabilities.and really i will see what's behind yours, but don't expect negative critics, such is reserved for friends.i didn't moved here to argue or fight really not, and if something is bad for the community then this, this will split it and the result will be chaos.---hey what's about a skill contest in lua modeling, we will have both the same taska rigged animation with 3 bones in a scripted model (.obj or scripted geometry)do you dare?common, let's get friends instead of competitors, we all will have more profit then.i can be a chaotic guy, yes, sometimes i'm really bad, but i have two eyes and two ears and most of all a heart...and please don't get jealous, only because some of us had the chance to ski through maiden snow,or because i get welcomed back so nice, people here know me, they know my ups and downs very well i guess.some incorrigible ones really seem to like my models...smile !you just liked to attack me a bit, am i right?might better haven't answered, but i have.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
usually i'm kind but while looking what YOU might have done so far i've seen many comments of you like this
Quote:
The issue you mentioned have nothing to do with models.Lynx (ship on picture)have such problem because of using zbias() to put one texture on top of other texture and it also use zbias for models which is pointless.I did not made that model so I dunno why someone use zbias for something which is not designed for.If you remove all zbias calls in lynx lua the depth artifacts will be gone, but window texture will flicker..., obviously this is bug in model itself. Window should be another model called separately with own texture (obviously it can use same file) and own material.Also lynx is very dumb model with so small number of triangles.If you encounter any problem with your models in pioneer please provide obj and I will take look at it.
usually i wouldn't answer it's lost time, but it's getting on my nervesfirst i can't remember that i used zbias for a model (if you mean a modewl and not a .obj), i guess i was the one who pointed out very very early that such won't workyes, it's very low poly "dumb" model, done in hurry from a older model i made onceand stupid texture on top of texture allows to have a colorvariable material but you can spare certain parts out from it, or perhaps blend the colorvariable material with a slight alpha to get more depth to the colorvriable material. after all it seem's to me you are just a freeloaderto read it sounds like you invented lua modeling,but if one knows recons, it's only bla, bla, sorryso please, if you like vlastans models better then mine, then right on youre free to comment mine as ugly, even if i think that's not quite fair and i never would say "ugly" to someone elses work, whatever it might be.perhaps i don't like or i don't like the style ofoh, you forgot? such are the rules in a forum, never to attack personallygive constructive critics pleaseif one does and i'm shure i did such to, you're also free to rebuke him/heri don't mind, like i said i have some friends here who really like my models, some might dislike it.it's easy when one can't answer (off line).i would have liked to shut my mouth, reallybut who do you guess introduced the sub-models folder (as a prev. loaded one) and who do you guess wrote the first basic models for it (incl. my from me so unkind disregarded poslights i.e.).and yes, i'm in general stupidand i make stupid space ships on a stupid free softwareperhaps i'm even gay, who knows (which shouldn't influence your choice).one thing is a fact, i'm still a beginnerand have still a lot to learn.fortunately vlastan "don't likes my style" (i preassume, i don't know), else we would have the same models and that would be boring, but i guess we respect each others work (at least i do).to keep you better informed, so you won't tell wrong, thee (existing) cobra mk3 was put in early pioneer as example model, for interested (let's say beginners) who liked to know how to bind .obj to pioneer, i just added some slight changes to her.the mk1 is another one of my ugly ships and in fact it's a nothing based also on a older model, just to have a cobra mk1 that was all, i made some experiments with her, that is, how skin colors work with random material, how to fix up a programmable default landing gear.but of course, you wouldn't have needed any of such experiments, you know it all out of the box!please be humble and keep the rules, so i will do to.
Quote:
The issue you mentioned have nothing to do with models.Lynx (ship on picture)have such problem because of using zbias() to put one texture on top of other texture and it also use zbias for models which is pointless.I did not made that model so I dunno why someone use zbias for something which is not designed for.If you remove all zbias calls in lynx lua the depth artifacts will be gone, but window texture will flicker..., obviously this is bug in model itself. Window should be another model called separately with own texture (obviously it can use same file) and own material.Also lynx is very dumb model with so small number of triangles.If you encounter any problem with your models in pioneer please provide obj and I will take look at it.
usually i wouldn't answer it's lost time, but it's getting on my nervesfirst i can't remember that i used zbias for a model (if you mean a modewl and not a .obj), i guess i was the one who pointed out very very early that such won't workyes, it's very low poly "dumb" model, done in hurry from a older model i made onceand stupid texture on top of texture allows to have a colorvariable material but you can spare certain parts out from it, or perhaps blend the colorvariable material with a slight alpha to get more depth to the colorvriable material. after all it seem's to me you are just a freeloaderto read it sounds like you invented lua modeling,but if one knows recons, it's only bla, bla, sorryso please, if you like vlastans models better then mine, then right on youre free to comment mine as ugly, even if i think that's not quite fair and i never would say "ugly" to someone elses work, whatever it might be.perhaps i don't like or i don't like the style ofoh, you forgot? such are the rules in a forum, never to attack personallygive constructive critics pleaseif one does and i'm shure i did such to, you're also free to rebuke him/heri don't mind, like i said i have some friends here who really like my models, some might dislike it.it's easy when one can't answer (off line).i would have liked to shut my mouth, reallybut who do you guess introduced the sub-models folder (as a prev. loaded one) and who do you guess wrote the first basic models for it (incl. my from me so unkind disregarded poslights i.e.).and yes, i'm in general stupidand i make stupid space ships on a stupid free softwareperhaps i'm even gay, who knows (which shouldn't influence your choice).one thing is a fact, i'm still a beginnerand have still a lot to learn.fortunately vlastan "don't likes my style" (i preassume, i don't know), else we would have the same models and that would be boring, but i guess we respect each others work (at least i do).to keep you better informed, so you won't tell wrong, thee (existing) cobra mk3 was put in early pioneer as example model, for interested (let's say beginners) who liked to know how to bind .obj to pioneer, i just added some slight changes to her.the mk1 is another one of my ugly ships and in fact it's a nothing based also on a older model, just to have a cobra mk1 that was all, i made some experiments with her, that is, how skin colors work with random material, how to fix up a programmable default landing gear.but of course, you wouldn't have needed any of such experiments, you know it all out of the box!please be humble and keep the rules, so i will do to.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
let's get real,what exactly was the depth problem with the lynx?by looking at the script i can't see much wrong, especially, zbias used for a model???if you really think to use zbias for a wavefront object isn't needed, then your'e wrong this is possible and needed like it's needed for a scripted geometry to "lift" a surface proper over another.you can (this is experience, not theory) use zbias without any vectors for a .obj (only), it doesn't need v(position) and doesn't need v(normal), why is not to clear to me, but it works and has always worked proper for me (maybe because normals are determined by the mesh?).looking at the script from this pov i only could remove some entries and use a zbias(1,v(0,0,0),v(0,0,0)) for all overlayed meshes together, that works. at least on my nvidia i often asked if others have problems and some have, it seems it didn't appears on all gfx cards the same.this allows to use a mesh double and still it stays on top when zbias is set proper.i know i'm not perfect and there might be some leaks in my models, i will fix such if possible and if i know what exactly the problem is.sometimes the code looks "unintended" like you described it, but if you would take a closer look and would have more experience, you would recon that most things have a reason why i did it in a specific way or why i used/created a model/geometry at a specific place.scripting models needs a lot of experience, there are guidelines to it (some have marked by me), but they are as dynamic as a scripted geometry.btw, if you remove zbias from the lynx, i'm pretty sure no "chrome" parts are visible on top of the colorvariable set meshand the flickering of the window shows exactly the missing of a zbias.[/hr]something else,still i'm not convinced that a texture atlas is (always) better.and i don't quite understand "modern gfx cards and drivers", since i'm pretty sure that nothing has changed to the guidelines of cg since early 90's (referring to nvidias guidelines/introduction to it).what was important then is still important now, only that everything is much faster, you got more power to handle 3d and it has get more "comfortable" (while the "comfort" solution isn't always the best), in simple words.i guess it depends more on how you use the meshes, it's unlogical to me to texture e.g. a pair of wheels which i have to create the model in advance for, from a large map.but i guess it makes sense when the meshes got used together (i.e. lod).and i think i'm not wrong if i say this way can be used for all meshes of a model, means group things which you use together, makes sense. likewise, i group a scripted geometry mainly by texture and uv use, any else is secondary to that (except hierarchy, this is most important and so a texture doesn't have to be on one map imo, if the hierarchy splits the geometry already, e.g. it makes no sense to put the texture for the cockpit on the "main map", you will have to create/load the geometry at a different point in the hierarchy anyway and reasonably it's gettin used only for higher LODs).if i think further about that and take a look at how uv is stored in a .obj (or any else format), it's as soon as a mesh is unwrapped, a per face texturing. of course grouping still makes sense (use atlas). but on the other hand i'm not sure if it really makes a big difference.but one thing i know, projection uv values, like for scripted geometry, is useful also for a wavefront .obj to. it limits the possibilities but lowers processing time. perhaps simply because you have only one value for a whole mesh and no per face texturing.the bloodrunner was following that idea (before i created the bridge) and had without the bridge a quite good performance.while stupid me has disrespected all lod's except lod1 for the collision mesh and even this is rather high poly.but like i said, it's not as important as to keep away any texture from lod1.but once i will rework that ship and it's planned to use a scripted geometry for it wherever it's possible, the shape of the ship is predestinated for it.but i await explanations, a good argument can REALLY change my thinking.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
noticed some needed fixes 1st.i changed the squadsign sub-model to this
Code:
function squad_color(self)selector1()if select1 < 201 then set_material('squad', .5,0,0,.999,.6,.6,.6,30) elseif select1 < 401 then set_material('squad', .45,.35,.01,.999,.6,.6,.6,30)elseif select1 < 601 thenset_material('squad', 0,.15,.7,.999,.6,.6,.6,30)elseif select1 < 801 thenset_material('squad', .06,.35,0,.999,.6,.6,.6,30)elseif select1 > 800 thenset_material('squad', .2,0,.35,.999,.6,.6,.6,30)endenddefine_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(10,v(0,0,0),v(-1,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)squad_color()end })define_model('imp_sign_a', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_0.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) zbias(10,v(0,0,0),v(-1,0,0))quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_b', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_1.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_c', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_2.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_d', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_3.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_e', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_4.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_1', {info = { bounding_radius = 1,},static = function(lod)end,dynamic = function(lod)selector1()if select1 < 201 then call_model('imp_sign_a',v(0,0,0),v(1,0,0),v(0,1,0),1) elseif select1 < 401 then call_model('imp_sign_b',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif select1 < 601 then call_model('imp_sign_c',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif select1 < 801 then call_model('imp_sign_d',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif select1 > 800 then call_model('imp_sign_e',v(0,0,0),v(1,0,0),v(0,1,0),1)endend})
still there is at least one model using a call for a squad_color model to get the material only, since quite awhile such isn't no longer possible, therefore there is since also quite awhile the replacing function squad_color() (i guess it's not the only one missing this, i fixed a couple of them after it had changed).now one might ask what it's good for at all, a short explanation, it's used to get some sort of flight-group colors which you can use independent from the "squad-sign" (a simple symbol), this allows the modeler to create own specific symbols or using the material setting for things like helmet/dress color or simply some colored stripes on the ship in the flight-group color. that has been used by me always in the same manner and so a squad-sign will have the same color as the "stripes" and the helmet, the dress color will vary it's own.ok, the first i noticed now was sparks ASP explorer, if the above sub-model script is used (or one containing that function already), then the ASP can loook like thisand will have back it's squad color layer/parts.
Code:
define_model('asps_gun_f', {info = {bounding_radius = 2,materials = { 'metal' }},static = function(lod)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)use_material('metal')texture('asps_gun.png')load_obj('asps_gun_f.obj')end})define_model('asps_gun_r', {info = {bounding_radius = 2,materials = { 'metal' }},static = function(lod)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)use_material('metal')texture('asps_gun.png')load_obj('asps_gun_r.obj')end})define_model('asps_flap_r_0', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,},static = function(lod)if lod > 1 thentexture('asps_skin.png')endload_obj('asps_flap_r.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))end})define_model('asps_flap_l_0', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,},static = function(lod)if lod > 1 thentexture('asps_skin.png')endload_obj('asps_flap_l.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))end})define_model('asps_flap_r', {info = {bounding_radius = 1,},static = function(lod)end,dynamic = function(lod)local flap = math.pi*math.clamp(get_animation_position('WHEEL_STATE'),0,.5)call_model('asps_flap_r_0',v(0,0,0),v(0,0,1),v(math.sin(flap),math.cos(flap),0),1)end})define_model('asps_flap_l', {info = {bounding_radius = 1,},static = function(lod)end,dynamic = function(lod)local flap = math.pi*math.clamp(get_animation_position('WHEEL_STATE'),0,.5)call_model('asps_flap_l_0',v(0,0,0),v(0,0,1),v(-math.sin(flap),math.cos(flap),0),1)end})define_model('asps_wheel_f', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,},static = function(lod)if lod == 1 thenload_obj('asps_wf_coll.obj')elsetexture('asps_skin.png')load_obj('asps_wheel_f.obj')endend})define_model('asps_wheel_r_r', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,materials = {'non_cv', 'cv_0'},},static = function(lod)if lod == 1 thenload_obj('asps_wrr_coll.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))elsetexture('asps_skin.png')use_material('cv_0')load_obj('asps_wheel_r_r_1.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))set_material('non_cv', .63,.7,.83,1,.83,.9,1.03,30)use_material('non_cv')load_obj('asps_wheel_r_r_0.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))endend,dynamic = function(lod)if lod > 1 thenselector2()if select2 < 51 thenset_material('cv_0', .63,.7,.83,1,.83,.9,1.03,30)elseset_material('cv_0', get_arg_material(0))endendend})define_model('asps_wheel_r_l', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,materials = {'non_cv', 'cv_0'},},static = function(lod)if lod == 1 thenload_obj('asps_wrl_coll.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))elsetexture('asps_skin.png')use_material('cv_0')load_obj('asps_wheel_r_l_1.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))set_material('non_cv',.63,.7,.83,1,.83,.9,1.03,30)use_material('non_cv')load_obj('asps_wheel_r_l_0.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))endend,dynamic = function(lod)if lod > 1 thenselector2()if select2 < 51 thenset_material('cv_0', .63,.7,.83,1,.83,.9,1.03,30)elseset_material('cv_0', get_arg_material(0))endendend})define_model('asps_pyl_open', {info = {bounding_radius = 2,materials = {'cut', 'metal'},},static = function(lod)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)set_material('cut', .63,.7,.83,.99,.83,.9,1.03,30)texture('asps_pyl_open.png')use_material('metal')load_obj('asps_pylon.obj')use_material('cut')zbias(1,v(0,0,0),v(0,0,-1))load_obj('asps_pyl_open.obj')zbias(0)end})local LASER_SCALE = {PULSECANNON_1MW = 1/7.5,PULSECANNON_DUAL_1MW = 2/7.5,PULSECANNON_2MW = 3/7.5,PULSECANNON_RAPID_2MW = 4/7.5,PULSECANNON_4MW = 5/7.5,PULSECANNON_10MW = 6/7.5,PULSECANNON_20MW = 7/7.5,MININGCANNON_17MW = 8/7.5,SMALL_PLASMA_ACCEL = 9/7.5,LARGE_PLASMA_ACCEL = 10/7.5,}define_model('asps_sub0', {info = {lod_pixels = {.1,20,50,0},bounding_radius = 4,materials = {'cv_0', 'chrome', 'non_cv', 'metal', 'squad'},},static = function(lod)set_material('chrome', .63,.7,.83,1,1.26,1.4,1.66,30)set_material('non_cv', .63,.7,.83,1,.83,.9,1.03,30)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)texture('asps_skin.png')use_material('squad')load_obj('asps_squad_c.obj')use_material('cv_0')load_obj('asps_cv_0.obj')texture(nil)end,dynamic = function(lod)selector1()if select1 < 201 thenset_material('squad', .5,0,0,1,.6,.6,.6,30) -- this is ok, since squad_color is semi transparent, the better choiceelseif select1 < 401 thenset_material('squad', .45,.35,.01,1,.6,.6,.6,30)elseif select1 < 601 thenset_material('squad', 0,.15,.7,1,.6,.6,.6,30)elseif select1 < 801 thenset_material('squad', .06,.35,0,1,.6,.6,.6,30)elseif select1 > 800 thenset_material('squad', .2,0,.35,1,.6,.6,.6,30)endendendendendif lod > 2 thenif get_equipment('LASER',1) thenlocal scale = LASER_SCALE[get_equipment('LASER',1)] or 0.1local pos = v(.003,.246,-1.681)call_model('asps_gun_f', pos, v(1,0,0), v(0,1,0), 1+scale/4)endif get_equipment('LASER',2) thenlocal scale = LASER_SCALE[get_equipment('LASER',2)] or 0.1local pos = v(.001,-.431,1.964)call_model('asps_gun_r', pos, v(1,0,0), v(0,1,0), 1+scale/4)endendif lod > 3 thenlocal M_0 = v(.34,.08,-1.4)if get_equipment('MISSILE', 1) == 'MISSILE_UNGUIDED' thencall_model('d_unguided',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif get_equipment('MISSILE', 1) == 'MISSILE_GUIDED' thencall_model('d_guided',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif get_equipment('MISSILE', 1) == 'MISSILE_SMART' thencall_model('d_smart',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif get_equipment('MISSILE', 1) == 'MISSILE_NAVAL' thencall_model('d_naval',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)endendendendselector2()if select2 < 51 thenset_material('cv_0', .63,.7,.83,1,.83,.9,1.03,30)use_material('cv_0')if get_equipment('SCANNER') == 'SCANNER' thencall_model('scanner_-',v(1,.57,.38),v(1,0,0),v(0,1,0),.15)call_model('antenna_1',v(-.83,.272,-1.94),v(1,0,0),v(0,1,0),.15)endif get_equipment('ECM') == 'ECM_BASIC' thencall_model('ecm_1',v(-1,.57,.38),v(1,0,0),v(0,1,0),.1)elseif get_equipment('ECM') == 'ECM_ADVANCED' thencall_model('ecm_2',v(-1,.57,.38),v(1,0,0),v(0,1,0),.1)endendelseset_material('cv_0', get_arg_material(0))use_material('cv_0')if get_equipment('SCANNER') == 'SCANNER' thencall_model('scanner_+',v(-1,.57,.38),v(1,0,0),v(0,1,0),.15)call_model('antenna_1',v(.83,.272,-1.94),v(1,0,0),v(0,1,0),.15)endif get_equipment('ECM') == 'ECM_BASIC' thencall_model('ecm_1',v(1,.57,.38),v(1,0,0),v(0,1,0),.1)elseif get_equipment('ECM') == 'ECM_ADVANCED' thencall_model('ecm_2',v(1,.57,.38),v(1,0,0),v(0,1,0),.1)endendendendend})define_model('asp_sparks', {info = {scale = 8.5,lod_pixels = {.1,20,50,0},bounding_radius = 38,materials = {'chrome', 'non_cv', 'metal', 'layer', 'win', 'glow_0', 'e_glow', 'scoop', 'text','squad'},tags = {'ship'},ship_defs = {{name='Asp Explorer',forward_thrust = -220e5,reverse_thrust = 100e5,up_thrust = 60e5,down_thrust = -60e5,left_thrust = -60e5,right_thrust = 60e5,angular_thrust = 600e5,gun_mounts ={{ v(0,2.57,-21.35), v(0,0,-1) },{ v(0,-4.42,26.04), v(0,0,1) },},max_cargo = 120,max_missile = 1,max_laser = 2,capacity = 120,hull_mass = 100,price = 187000,hyperdrive_class = 3,}}},static = function(lod)if lod == 1 thenload_obj('asps_coll.obj')elseset_material('chrome', .63,.7,.83,1,1.26,1.4,1.66,30)set_material('non_cv', .63,.7,.83,1,.83,.9,1.03,30)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)set_material('layer', .63,.7,.83,.99,.83,.9,1.03,30)set_material('glow_0', .5,.5,.5,1,1,1,1,100,.5,1.4,1.5)set_material('win', 0,0,.01,1,1,1,2,100)--set_material('text', .6,.6,.6,1,.3,.3,.3,5)call_model('asps_sub0',v(0,0,0),v(1,0,0),v(0,1,0),1)texture('asps_skin.png')use_material('non_cv')load_obj('asps_ncv.obj')use_material('metal')load_obj('asps_matte.obj')use_material('chrome')load_obj('asps_chrome.obj')use_material('glow_0')load_obj('asps_glow_0.obj')if lod > 2 thenuse_material('layer')zbias(1,v(0,0,0),v(0,1,0))load_obj('asps_layer_1.obj')zbias(0)endtexture('asps_scoop.png')use_material('scoop')load_obj('asps_scoop.obj')texture('asps_glow.png')use_material('e_glow')load_obj('asps_e_glow.obj')texture(nil)use_material('win')load_obj('asps_win.obj')if lod > 3 thencall_model('decal',v(-1.9,.401,.45),v(0,1,.36),v(1,.25,1),.3)call_model('posl_green',v(2.688,.092,1.028),v(0,1,0),v(1,0,0),.2)call_model('posl_red',v(-2.686,.093,1.028),v(0,1,0),v(-1,0,0),.2)call_model('coll_warn',v(0,.39,2.5),v(1,0,0),v(0,1,0),.2)endlocal M_T = v(0,0,2.822)local R_T1 = v(.24,-.436,-.288)local R_T2 = v(.486,-.437,-.218)local TF_T = v(1.022,.441,-1.341)local TB_T = v(1.961,.245,1.883)local BF_T = v(1.03,-.041,-1.354)local BB_T = v(1.958,-.125,2.103)local RF_T = v(1.604,.282,-.852)local RB_T = v(2.408,.171,.861)local LF_T = v(-1.602,.283,-.852)local LB_T = v(-2.405,.172,.858)-- call_model('blank',v(0,0,0),v(1,0,0),v(0,1,0),0) --save to remove, since billboard function no longer influences thrusters.thruster(M_T,v(0,0,1),4, true)xref_thruster(R_T1,v(0,0,-1),1, true)xref_thruster(R_T2,v(0,0,-1),1, true)xref_thruster(TF_T,v(0,1,0),.7)xref_thruster(TB_T,v(0,1,0),.7)xref_thruster(BF_T,v(0,-1,0),.7)xref_thruster(BB_T,v(0,-1,0),.7)thruster(RF_T,v(1,0,0),.7)thruster(LF_T,v(-1,0,0),.7)thruster(RB_T,v(1,0,0),.7)thruster(LB_T,v(-1,0,0),.7)endend,dynamic = function(lod)local flap = math.pi*math.clamp(get_animation_position('WHEEL_STATE'),0,.5)local rot = .5*math.pi*math.clamp(get_animation_position('WHEEL_STATE'),.3,1)-.46if lod > 1 thenset_material('e_glow', lerp_materials(get_time('SECONDS')*.4,{0, 0, 0, 1, 0, 0, 0, 1, .5, 2, 2.5 },{0, 0, 0, 1, 0, 0, 0, 1, 1, 2.5, 2.5 }))if get_equipment('FUELSCOOP') == 'FUEL_SCOOP' thenset_material('scoop', lerp_materials(get_time('SECONDS')*.4,{0, 0, 0, 1, 0, 0, 0, 1, .5, 2, 2.5 },{0, 0, 0, 1, 0, 0, 0, 1, 1, 2.5, 2.5 }))elseset_material('scoop', .15,.16,.18,1,.22,.25,.25,10)endtexture(nil)--use_material('text')if lod > 3 thensquad_color() -- materials no longer get "cross transferred", but can be presel. with a function.use_material('squad') local reg = get_label()zbias(1,v(1.764,.448,.453),v(.2,1,0))text(reg,v(1.764,.448,.453),v(.2,1,0),v(-1,.37,-1),.2,{center = true})zbias(1,v(-1.89,-.282,.75),v(-.4,-1,0))text(reg,v(-1.89,-.282,.75),v(-.4,-1,0),v(0,.18,1),.2,{center = true})zbias(0)enduse_material('non_cv')call_model('asps_flap_r',v(.95,-.398,1.619),v(1,0,.27+math.sin(.1*flap)),v(0,1,-math.sin(.1*flap)),1)call_model('asps_flap_l',v(-.943,-.398,1.618),v(1,0,-.27-math.sin(.1*flap)),v(0,1,-math.sin(.1*flap)),1)endcall_model('asps_wheel_f',v(.002,-.252,-.659),v(1,0,0),v(0,math.cos(1.6*rot),math.sin(1.6*rot)),1)call_model('asps_wheel_r_r',v(1.615,-.168,1.754),v(0,math.sin(.25*rot),1),v(-math.sin(1.7*rot),math.cos(1.7*rot),0),1)call_model('asps_wheel_r_l',v(-1.607,-.164,1.752),v(0,math.sin(.25*rot),1),v(math.sin(1.7*rot),math.cos(1.7*rot),0),1)if lod > 2 thenif get_animation_position('WHEEL_STATE') ~= 0 thenbillboard('smoke.png', .05, v(1,1,1), { v(-.299,.067,-1.687),v(-.416,.067,-1.687) })billboard('smoke.png', .025, v(.6,1.2,1.2), { v(-.202,.045,-1.659) })endendend})
it was after all only the color for the label, which could be set to white by choice, but i like the coloured version.but like i said, there will be more of them still using the "squad_color" model instead of the function.
Code:
function squad_color(self)selector1()if select1 < 201 then set_material('squad', .5,0,0,.999,.6,.6,.6,30) elseif select1 < 401 then set_material('squad', .45,.35,.01,.999,.6,.6,.6,30)elseif select1 < 601 thenset_material('squad', 0,.15,.7,.999,.6,.6,.6,30)elseif select1 < 801 thenset_material('squad', .06,.35,0,.999,.6,.6,.6,30)elseif select1 > 800 thenset_material('squad', .2,0,.35,.999,.6,.6,.6,30)endenddefine_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(10,v(0,0,0),v(-1,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)squad_color()end })define_model('imp_sign_a', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_0.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) zbias(10,v(0,0,0),v(-1,0,0))quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_b', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_1.png', v(0,0,0), v(0,0,-1), v(0,-1,0)) zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_c', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_2.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_d', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_3.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_e', {info = { bounding_radius = 1, materials = {'mat'},},static = function(lod)set_material('mat',.7,.68,.65,.99,.2,.2,.2,10)use_material('mat')texture('impsign_4.png', v(0,0,0), v(0,0,-1), v(0,-1,0))zbias(10,v(0,0,0),v(-1,0,0)) quad(v(0,0,0), v(0,1,0), v(0,1,1), v(0,0,1))zbias(0)end})define_model('imp_sign_1', {info = { bounding_radius = 1,},static = function(lod)end,dynamic = function(lod)selector1()if select1 < 201 then call_model('imp_sign_a',v(0,0,0),v(1,0,0),v(0,1,0),1) elseif select1 < 401 then call_model('imp_sign_b',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif select1 < 601 then call_model('imp_sign_c',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif select1 < 801 then call_model('imp_sign_d',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif select1 > 800 then call_model('imp_sign_e',v(0,0,0),v(1,0,0),v(0,1,0),1)endend})
still there is at least one model using a call for a squad_color model to get the material only, since quite awhile such isn't no longer possible, therefore there is since also quite awhile the replacing function squad_color() (i guess it's not the only one missing this, i fixed a couple of them after it had changed).now one might ask what it's good for at all, a short explanation, it's used to get some sort of flight-group colors which you can use independent from the "squad-sign" (a simple symbol), this allows the modeler to create own specific symbols or using the material setting for things like helmet/dress color or simply some colored stripes on the ship in the flight-group color. that has been used by me always in the same manner and so a squad-sign will have the same color as the "stripes" and the helmet, the dress color will vary it's own.ok, the first i noticed now was sparks ASP explorer, if the above sub-model script is used (or one containing that function already), then the ASP can loook like thisand will have back it's squad color layer/parts.
Code:
define_model('asps_gun_f', {info = {bounding_radius = 2,materials = { 'metal' }},static = function(lod)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)use_material('metal')texture('asps_gun.png')load_obj('asps_gun_f.obj')end})define_model('asps_gun_r', {info = {bounding_radius = 2,materials = { 'metal' }},static = function(lod)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)use_material('metal')texture('asps_gun.png')load_obj('asps_gun_r.obj')end})define_model('asps_flap_r_0', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,},static = function(lod)if lod > 1 thentexture('asps_skin.png')endload_obj('asps_flap_r.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))end})define_model('asps_flap_l_0', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,},static = function(lod)if lod > 1 thentexture('asps_skin.png')endload_obj('asps_flap_l.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))end})define_model('asps_flap_r', {info = {bounding_radius = 1,},static = function(lod)end,dynamic = function(lod)local flap = math.pi*math.clamp(get_animation_position('WHEEL_STATE'),0,.5)call_model('asps_flap_r_0',v(0,0,0),v(0,0,1),v(math.sin(flap),math.cos(flap),0),1)end})define_model('asps_flap_l', {info = {bounding_radius = 1,},static = function(lod)end,dynamic = function(lod)local flap = math.pi*math.clamp(get_animation_position('WHEEL_STATE'),0,.5)call_model('asps_flap_l_0',v(0,0,0),v(0,0,1),v(-math.sin(flap),math.cos(flap),0),1)end})define_model('asps_wheel_f', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,},static = function(lod)if lod == 1 thenload_obj('asps_wf_coll.obj')elsetexture('asps_skin.png')load_obj('asps_wheel_f.obj')endend})define_model('asps_wheel_r_r', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,materials = {'non_cv', 'cv_0'},},static = function(lod)if lod == 1 thenload_obj('asps_wrr_coll.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))elsetexture('asps_skin.png')use_material('cv_0')load_obj('asps_wheel_r_r_1.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))set_material('non_cv', .63,.7,.83,1,.83,.9,1.03,30)use_material('non_cv')load_obj('asps_wheel_r_r_0.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))endend,dynamic = function(lod)if lod > 1 thenselector2()if select2 < 51 thenset_material('cv_0', .63,.7,.83,1,.83,.9,1.03,30)elseset_material('cv_0', get_arg_material(0))endendend})define_model('asps_wheel_r_l', {info = {lod_pixels = {.1,10,20,0},bounding_radius = 1,materials = {'non_cv', 'cv_0'},},static = function(lod)if lod == 1 thenload_obj('asps_wrl_coll.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))elsetexture('asps_skin.png')use_material('cv_0')load_obj('asps_wheel_r_l_1.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))set_material('non_cv',.63,.7,.83,1,.83,.9,1.03,30)use_material('non_cv')load_obj('asps_wheel_r_l_0.obj',Matrix.rotate(.5*math.pi,v(0,1,0)))endend,dynamic = function(lod)if lod > 1 thenselector2()if select2 < 51 thenset_material('cv_0', .63,.7,.83,1,.83,.9,1.03,30)elseset_material('cv_0', get_arg_material(0))endendend})define_model('asps_pyl_open', {info = {bounding_radius = 2,materials = {'cut', 'metal'},},static = function(lod)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)set_material('cut', .63,.7,.83,.99,.83,.9,1.03,30)texture('asps_pyl_open.png')use_material('metal')load_obj('asps_pylon.obj')use_material('cut')zbias(1,v(0,0,0),v(0,0,-1))load_obj('asps_pyl_open.obj')zbias(0)end})local LASER_SCALE = {PULSECANNON_1MW = 1/7.5,PULSECANNON_DUAL_1MW = 2/7.5,PULSECANNON_2MW = 3/7.5,PULSECANNON_RAPID_2MW = 4/7.5,PULSECANNON_4MW = 5/7.5,PULSECANNON_10MW = 6/7.5,PULSECANNON_20MW = 7/7.5,MININGCANNON_17MW = 8/7.5,SMALL_PLASMA_ACCEL = 9/7.5,LARGE_PLASMA_ACCEL = 10/7.5,}define_model('asps_sub0', {info = {lod_pixels = {.1,20,50,0},bounding_radius = 4,materials = {'cv_0', 'chrome', 'non_cv', 'metal', 'squad'},},static = function(lod)set_material('chrome', .63,.7,.83,1,1.26,1.4,1.66,30)set_material('non_cv', .63,.7,.83,1,.83,.9,1.03,30)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)texture('asps_skin.png')use_material('squad')load_obj('asps_squad_c.obj')use_material('cv_0')load_obj('asps_cv_0.obj')texture(nil)end,dynamic = function(lod)selector1()if select1 < 201 thenset_material('squad', .5,0,0,1,.6,.6,.6,30) -- this is ok, since squad_color is semi transparent, the better choiceelseif select1 < 401 thenset_material('squad', .45,.35,.01,1,.6,.6,.6,30)elseif select1 < 601 thenset_material('squad', 0,.15,.7,1,.6,.6,.6,30)elseif select1 < 801 thenset_material('squad', .06,.35,0,1,.6,.6,.6,30)elseif select1 > 800 thenset_material('squad', .2,0,.35,1,.6,.6,.6,30)endendendendendif lod > 2 thenif get_equipment('LASER',1) thenlocal scale = LASER_SCALE[get_equipment('LASER',1)] or 0.1local pos = v(.003,.246,-1.681)call_model('asps_gun_f', pos, v(1,0,0), v(0,1,0), 1+scale/4)endif get_equipment('LASER',2) thenlocal scale = LASER_SCALE[get_equipment('LASER',2)] or 0.1local pos = v(.001,-.431,1.964)call_model('asps_gun_r', pos, v(1,0,0), v(0,1,0), 1+scale/4)endendif lod > 3 thenlocal M_0 = v(.34,.08,-1.4)if get_equipment('MISSILE', 1) == 'MISSILE_UNGUIDED' thencall_model('d_unguided',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif get_equipment('MISSILE', 1) == 'MISSILE_GUIDED' thencall_model('d_guided',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif get_equipment('MISSILE', 1) == 'MISSILE_SMART' thencall_model('d_smart',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)elseif get_equipment('MISSILE', 1) == 'MISSILE_NAVAL' thencall_model('d_naval',M_0,v(1,0,0),v(0,1,0),.1)call_model('asps_pyl_open',v(0,0,0),v(1,0,0),v(0,1,0),1)endendendendselector2()if select2 < 51 thenset_material('cv_0', .63,.7,.83,1,.83,.9,1.03,30)use_material('cv_0')if get_equipment('SCANNER') == 'SCANNER' thencall_model('scanner_-',v(1,.57,.38),v(1,0,0),v(0,1,0),.15)call_model('antenna_1',v(-.83,.272,-1.94),v(1,0,0),v(0,1,0),.15)endif get_equipment('ECM') == 'ECM_BASIC' thencall_model('ecm_1',v(-1,.57,.38),v(1,0,0),v(0,1,0),.1)elseif get_equipment('ECM') == 'ECM_ADVANCED' thencall_model('ecm_2',v(-1,.57,.38),v(1,0,0),v(0,1,0),.1)endendelseset_material('cv_0', get_arg_material(0))use_material('cv_0')if get_equipment('SCANNER') == 'SCANNER' thencall_model('scanner_+',v(-1,.57,.38),v(1,0,0),v(0,1,0),.15)call_model('antenna_1',v(.83,.272,-1.94),v(1,0,0),v(0,1,0),.15)endif get_equipment('ECM') == 'ECM_BASIC' thencall_model('ecm_1',v(1,.57,.38),v(1,0,0),v(0,1,0),.1)elseif get_equipment('ECM') == 'ECM_ADVANCED' thencall_model('ecm_2',v(1,.57,.38),v(1,0,0),v(0,1,0),.1)endendendendend})define_model('asp_sparks', {info = {scale = 8.5,lod_pixels = {.1,20,50,0},bounding_radius = 38,materials = {'chrome', 'non_cv', 'metal', 'layer', 'win', 'glow_0', 'e_glow', 'scoop', 'text','squad'},tags = {'ship'},ship_defs = {{name='Asp Explorer',forward_thrust = -220e5,reverse_thrust = 100e5,up_thrust = 60e5,down_thrust = -60e5,left_thrust = -60e5,right_thrust = 60e5,angular_thrust = 600e5,gun_mounts ={{ v(0,2.57,-21.35), v(0,0,-1) },{ v(0,-4.42,26.04), v(0,0,1) },},max_cargo = 120,max_missile = 1,max_laser = 2,capacity = 120,hull_mass = 100,price = 187000,hyperdrive_class = 3,}}},static = function(lod)if lod == 1 thenload_obj('asps_coll.obj')elseset_material('chrome', .63,.7,.83,1,1.26,1.4,1.66,30)set_material('non_cv', .63,.7,.83,1,.83,.9,1.03,30)set_material('metal', .15,.16,.18,1,.22,.25,.25,10)set_material('layer', .63,.7,.83,.99,.83,.9,1.03,30)set_material('glow_0', .5,.5,.5,1,1,1,1,100,.5,1.4,1.5)set_material('win', 0,0,.01,1,1,1,2,100)--set_material('text', .6,.6,.6,1,.3,.3,.3,5)call_model('asps_sub0',v(0,0,0),v(1,0,0),v(0,1,0),1)texture('asps_skin.png')use_material('non_cv')load_obj('asps_ncv.obj')use_material('metal')load_obj('asps_matte.obj')use_material('chrome')load_obj('asps_chrome.obj')use_material('glow_0')load_obj('asps_glow_0.obj')if lod > 2 thenuse_material('layer')zbias(1,v(0,0,0),v(0,1,0))load_obj('asps_layer_1.obj')zbias(0)endtexture('asps_scoop.png')use_material('scoop')load_obj('asps_scoop.obj')texture('asps_glow.png')use_material('e_glow')load_obj('asps_e_glow.obj')texture(nil)use_material('win')load_obj('asps_win.obj')if lod > 3 thencall_model('decal',v(-1.9,.401,.45),v(0,1,.36),v(1,.25,1),.3)call_model('posl_green',v(2.688,.092,1.028),v(0,1,0),v(1,0,0),.2)call_model('posl_red',v(-2.686,.093,1.028),v(0,1,0),v(-1,0,0),.2)call_model('coll_warn',v(0,.39,2.5),v(1,0,0),v(0,1,0),.2)endlocal M_T = v(0,0,2.822)local R_T1 = v(.24,-.436,-.288)local R_T2 = v(.486,-.437,-.218)local TF_T = v(1.022,.441,-1.341)local TB_T = v(1.961,.245,1.883)local BF_T = v(1.03,-.041,-1.354)local BB_T = v(1.958,-.125,2.103)local RF_T = v(1.604,.282,-.852)local RB_T = v(2.408,.171,.861)local LF_T = v(-1.602,.283,-.852)local LB_T = v(-2.405,.172,.858)-- call_model('blank',v(0,0,0),v(1,0,0),v(0,1,0),0) --save to remove, since billboard function no longer influences thrusters.thruster(M_T,v(0,0,1),4, true)xref_thruster(R_T1,v(0,0,-1),1, true)xref_thruster(R_T2,v(0,0,-1),1, true)xref_thruster(TF_T,v(0,1,0),.7)xref_thruster(TB_T,v(0,1,0),.7)xref_thruster(BF_T,v(0,-1,0),.7)xref_thruster(BB_T,v(0,-1,0),.7)thruster(RF_T,v(1,0,0),.7)thruster(LF_T,v(-1,0,0),.7)thruster(RB_T,v(1,0,0),.7)thruster(LB_T,v(-1,0,0),.7)endend,dynamic = function(lod)local flap = math.pi*math.clamp(get_animation_position('WHEEL_STATE'),0,.5)local rot = .5*math.pi*math.clamp(get_animation_position('WHEEL_STATE'),.3,1)-.46if lod > 1 thenset_material('e_glow', lerp_materials(get_time('SECONDS')*.4,{0, 0, 0, 1, 0, 0, 0, 1, .5, 2, 2.5 },{0, 0, 0, 1, 0, 0, 0, 1, 1, 2.5, 2.5 }))if get_equipment('FUELSCOOP') == 'FUEL_SCOOP' thenset_material('scoop', lerp_materials(get_time('SECONDS')*.4,{0, 0, 0, 1, 0, 0, 0, 1, .5, 2, 2.5 },{0, 0, 0, 1, 0, 0, 0, 1, 1, 2.5, 2.5 }))elseset_material('scoop', .15,.16,.18,1,.22,.25,.25,10)endtexture(nil)--use_material('text')if lod > 3 thensquad_color() -- materials no longer get "cross transferred", but can be presel. with a function.use_material('squad') local reg = get_label()zbias(1,v(1.764,.448,.453),v(.2,1,0))text(reg,v(1.764,.448,.453),v(.2,1,0),v(-1,.37,-1),.2,{center = true})zbias(1,v(-1.89,-.282,.75),v(-.4,-1,0))text(reg,v(-1.89,-.282,.75),v(-.4,-1,0),v(0,.18,1),.2,{center = true})zbias(0)enduse_material('non_cv')call_model('asps_flap_r',v(.95,-.398,1.619),v(1,0,.27+math.sin(.1*flap)),v(0,1,-math.sin(.1*flap)),1)call_model('asps_flap_l',v(-.943,-.398,1.618),v(1,0,-.27-math.sin(.1*flap)),v(0,1,-math.sin(.1*flap)),1)endcall_model('asps_wheel_f',v(.002,-.252,-.659),v(1,0,0),v(0,math.cos(1.6*rot),math.sin(1.6*rot)),1)call_model('asps_wheel_r_r',v(1.615,-.168,1.754),v(0,math.sin(.25*rot),1),v(-math.sin(1.7*rot),math.cos(1.7*rot),0),1)call_model('asps_wheel_r_l',v(-1.607,-.164,1.752),v(0,math.sin(.25*rot),1),v(math.sin(1.7*rot),math.cos(1.7*rot),0),1)if lod > 2 thenif get_animation_position('WHEEL_STATE') ~= 0 thenbillboard('smoke.png', .05, v(1,1,1), { v(-.299,.067,-1.687),v(-.416,.067,-1.687) })billboard('smoke.png', .025, v(.6,1.2,1.2), { v(-.202,.045,-1.659) })endendend})
it was after all only the color for the label, which could be set to white by choice, but i like the coloured version.but like i said, there will be more of them still using the "squad_color" model instead of the function.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
question,get_time('SECONDS') is what get_arg(1) was before, right?do i have still a continous clock? as a replacement for my absolutely stupid use of os.clock()?[/hr]another question,i miss models_functions, has it been removed/replaced? if it's removed no wonder my **** no longer works.to the devs, i would like to have something else, perhaps a seed, maybe the same as used for the colorvariable material.or three or four random numbers for the purpose i used the selector function.really i can't go on if i don't know what's happened with it!just tell me if this still works or i have to find another solution.[/hr]ok, i found that, it has moved to models, why?what if a submodel calls the function? it won't work (there are several of them).it was put to a separate folder once by tomm to be loaded in front of any models that could use it possibly.still i would accept a better solution rather the derivation of a number from the label.(i put this one on the issue tracker)
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
many things seem to have changed and it's not always to clear to me why,next thing i stumbled over, was the changed zbias for the adverts
i guess i know what's the idea, but...how do you know that you will use this model only on top of zbias(0)further if the background geometry has zbias(0) which is actually the case, how should this stay on top of a wall i.e.?i know a preassuming of 5 or 10 is not the best solution, but the only one, to avoid a depth conflict (flicker, disappearing).but should work if you don't preassume a to extreme value like 100 .think about such before you change it,the adverts i'm sure even without the possibility to check it actually, will "zfighting" with the models on which they used.the same for decals and such I HAVE to preassume a relative high zbias BECAUSE i don't know on which "layer" it will be, except on top of all the rest (which could be easely more then one).if you like a clean solution, i would have to rewrite the adverts and decals to functions where you can pass the proper zbias to, only in this way you can control a submodels zbias.[/hr]that reminds me of the, if i'm right, still unsolved LOD issue, i can't control LOD for a sub-model (only the ones from folder sub_models) from the model, or i have to tell right actually it's controlled by bounding radius and LOD setting of the final model.but this leads to a big disadvantage, i have ALWAYS a very low LOD for a small submodel (only those from folder sub_models, sub-models used in the same script have their proper LOD) on a big ship.as example std. wheels on a big shipnow, imo we have three possibilities, either i write all sub-models (folder sub_models) new as a function like the above mentioned with the possibility to define a explicit LOD for the submodel or that could be reverted to what it was before, because i liked it, or as final solution, we forget simply the LOD for the submodels (folder sub_models).back to the adverts, well some might have also wondered why a bounding radius of 10?well it was a "hack" to avoid the above described LOD problem, the adverts appeared always with lowest lod in the big station if i used a bounding radius of 2. the only thing to get around this, set the bounding radius to "astronomical" values ;)it won't hinder anything the bounding radius is used in the case for adverts only for their lod.it's a bit a bad example since the adverts need no LOD you will call them if at all at a certain LOD from the building/station model. you can remove the LOD completly from the adverts, they won't change.but i guess one can understand,it's a problem to preassume a zbiasit's hell to preassume a bounding radius or LOD!further i guess, IF i would change for some reason the bounding radius of a sub-model (folder sub_models) because of above described limitations, i'm sure one bright will change this back, thinking it's "wrong".
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
btw,as long as i have no web and have to operate from a macbook, i could need some help getting things into github or public at all...could be my models are ugly, but also a few changes has been made, so they don't work proper now, i can't say that i like that much.i mean if all didn't works, lod, zbias, selection of material for sub-models, they will really look crappy, but it's not my fault i didn't wrote them in this way.the problem is one issue is chained to the other, and if i should fix my models from remote, it needs some basical changes to make them work again.
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Completed Pioneer Models
durandal wrote:
Don't worry your ugly models are not going to be in my branch.Not mentioning how ugly they look and how broken animations they have.Or stupid use of os.clock or bilboard stuff when pos lights sub models are available or rotating galactic map in viper x.Or stupid looking smiling pilot face in ship with thousands of small parts in unindented code.You already showed your skills and I will just move on.I will stop now, it is pointless anyway to have proper discussion with your ego trip.
There is no need to lash out like that.I even agree with some of your earlier points amount single meshes and textures but everyone here is learning and working to get better at doing these things. Simple insulting each other is of no help to anyone.
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Completed Pioneer Models
potsmoke66 wrote:
...so please, if you like vlastans models better then mine, then right on youre free to comment mine as ugly, even if i think that's not quite fair and i never would say "ugly" to someone elses work, whatever it might be....fortunately vlastan "don't likes my style" (i preassume, i don't know), else we would have the same models and that would be boring, but i guess we respect each others work (at least i do).
Just to clear it up potsmoke66 but it is Durandal and NOT vlastan that made the insulting post.Don't take it to heart.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: Completed Pioneer Models
before you can use it some that have changed to it- needs a additional sub-model (robot-pilot)
- has again changed names, sorry but it helps to avoid confusion. if you like to use them see the result or compare themyou would need to edit a model and replace the existing call.- the chair is now separated from the pilot, this allows to use them if you like to design your own chair/seat for the pilot.- a additional chair model, a bit more comfortable looking one- runs much faster now!- needs to have the selector function in the right place, else you will have always the same "jöggel" (pilot, select"n"() will return nil). if it's not loaded in front of sub-models you can forget that function (delete it if you like) it didn't works.things that hasn't changed- still the same size and stupid smile
- still the same position values for the seat and the pilot (also robot pilot, if positioned like the pilot it stands on the seat)the new names arepilot_seat (global lighting) and pilot_seat_lit (local lighting)pilot_cseat and pilot_cseat_lit (c for "comfort"
)pilot_(1-3)_lit, pilot with local lighting, no helmet, rarely used on some bridges that have a local lightingpilot_(1-3), pilot (global lighting), "modern" helmetpilot_(4-6),pilot (global lighting), "old" helmet (fishbowl)pilot_(7-9),pilot (global lighting), no helmetnow, why 3 of the same type?simply to have at least three different ones in a bridgethe robot pilot will appear only rarely (20% chance, if at all, depends on selector is working)you need to use the new names in the models to make it appear at all.it will possibly interfere with the existing pilot model (some submodels have the same name), in general the latter processed model will be used of two with equal names.[url]http://pioneer-universum.web.officelive.com/Documents/pilot1.zip[/url]