New work-in-progress build with toys for ship modellers
New work-in-progress build with toys for ship modellers
Hi people,I have made a new windows work-in-progress binary of pioneer:http://pioneerspacesim.net/sites/default/files/pioneer-wip20101011.rarThere is stuff of interest to people doing the AMAZING!!! work of making ship models. Now you can now find out what equipment the ship has, and render extra bits accordingly, like missiles on missile pilons and all that:get_arg() can take these arguments:ARG_SHIP_WHEEL_STATE = 0ARG_SHIP_EQUIP_SCOOP = 5ARG_SHIP_EQUIP_ENGINE = 6ARG_SHIP_EQUIP_ECM = 7ARG_SHIP_EQUIP_SCANNER = 8ARG_SHIP_EQUIP_ATMOSHIELD = 9ARG_SHIP_EQUIP_LASER0 = 10ARG_SHIP_EQUIP_LASER1 = 11ARG_SHIP_EQUIP_MISSILE0 = 12ARG_SHIP_EQUIP_MISSILE1 = 13ARG_SHIP_EQUIP_MISSILE2 = 14ARG_SHIP_EQUIP_MISSILE3 = 15ARG_SHIP_EQUIP_MISSILE4 = 16ARG_SHIP_EQUIP_MISSILE5 = 17ARG_SHIP_EQUIP_MISSILE6 = 18ARG_SHIP_EQUIP_MISSILE7 = 19ARG_SHIP_EQUIP_MISSILE8 = 20So you can do:if get_arg(ARG_SHIP_EQUIP_SCANNER) == Equip.SCANNER then.. call a ship scanner module or something ...endifif get_arg(ARG_SHIP_EQUIP_MISSILE0) == Equip.MISSILE_UNGUIDED then....endifif get_arg(ARG_SHIP_EQUIP_LASER0) ~= Equip.NONE then.. draw some phallic thing coming out the front of the ship ..endifAnd so on.If a ship can carry more than 8 missiles then they will have to be notionally 'inside' the ship, although I could extend this number of people think it would be useful.The ARG_SHIP_ constants are defined at the top of data/pimodels.luaThe Equip.XXX constants are defined at the top of data/pienums.luaIn addition to ship equipment stuff, there is also model local lightsource support, which is described in the wiki. It is intended for inside areas of space stations, and when local lights are enabled, star direction lights are disabled.Have fun
RE: New work-in-progress build with toys for ship modellers
You've been hard at work I see... Very nice indeed. I'll have some fun tonight making use of these new arguments Cheers :)Small Bug: Tomm it seems alpha channel is not working correctly in this wip build. It does sort of work, if you set alpha in the texture, but alpha settings in the lua are not working.And ARG_SHIP_EQUIP_ENGINE = 6 is to do with hyperdrives I take it? Or are you planning something very cool with the standard engines/thrust units? As in fully upgradable thrust?EDIT// Another random idea: This might be pointless but I'll put it out there anyway. Since potsmoker and myself have started adding cockpits inside the ships we could also add an argument for Autopilot, and any other internal components that might be visible in the cockpit.When they are added, we could add in a small object that you can see inside the cockpit.What do you think?Another one i was thinking of was for certain passenger ships. I was going to make a large passenger ship and thought it would be cool to have passengers at the windows, but there could be an argument for passenger cabins, or even better for if you have a passenger on board.So when you have passengers, the windows fill up one by one, depending on how many you have.
RE: New work-in-progress build with toys for ship modellers
This is a really cool addition.I've just added detachable weapons to the talon.
Code:
if get_arg(10) > 0 thenuse_material('darksteel')texture(nil)load_obj('models/ships/extras/fighter_LtwinGun.obj')endif get_arg(11) > 0 thenuse_material('darksteel')texture(nil)load_obj('models/ships/extras/fighter_RtwinGun.obj')end
Theres the code if anyone else wants to try this.As you can see the model had to be called in this way : "models/ships/extras/fighter_RtwinGun.obj" so I have now created a new folder called Extras which will contain all the doodads for the ships, like sensors and weapons ect.We can then easily share them between ships and the extra folder makes it easy for anyone to understand where extra bits are.Check it out:[url]http://www.spacesimcentral.com/downloads.php?view=detail&df_id=328[/url] add more detachable bits later when I have the time.
Code:
if get_arg(10) > 0 thenuse_material('darksteel')texture(nil)load_obj('models/ships/extras/fighter_LtwinGun.obj')endif get_arg(11) > 0 thenuse_material('darksteel')texture(nil)load_obj('models/ships/extras/fighter_RtwinGun.obj')end
Theres the code if anyone else wants to try this.As you can see the model had to be called in this way : "models/ships/extras/fighter_RtwinGun.obj" so I have now created a new folder called Extras which will contain all the doodads for the ships, like sensors and weapons ect.We can then easily share them between ships and the extra folder makes it easy for anyone to understand where extra bits are.Check it out:[url]http://www.spacesimcentral.com/downloads.php?view=detail&df_id=328[/url] add more detachable bits later when I have the time.
-
KingHaggis
- Private
- Posts: 141
- Joined: Thu Aug 26, 2010 11:26 am
RE: New work-in-progress build with toys for ship modellers
Good to see you're putting so much effort in Pioneer, Tomm! I'm glad you're so busy improving your game and keeping us posted on the progress. In the mean time, I've been working on a second Pioneer youtube video. I hope it'll be ready this week. I want Pioneer to be noticed. It deserves to be noticed!
RE: New work-in-progress build with toys for ship modellers
Quote:
There is stuff of interest to people doing the AMAZING!!! work of making ship models.
I'm reminded of the line, "Build it, and they will come."
RE: New work-in-progress build with toys for ship modellers
KingHaggis wrote:
Good to see you're putting so much effort in Pioneer, Tomm! I'm glad you're so busy improving your game and keeping us posted on the progress. In the mean time, I've been working on a second Pioneer youtube video. I hope it'll be ready this week. I want Pioneer to be noticed. It deserves to be noticed!
Yeah I feel like I've been slacking and pursuing some dubious lines of coding. I spent 3 or 4 days working on high dynamic range (HDR) lighting, before deciding that it was a bad thing to get sidetracked with. I had a nice bloom effect going on, when you fly near to a bright star. That code is disabled for the time being though.BTW, it is better to do get_arg(ARG_SHIP_EQUIP_MISSILE0) than get_arg(12), because the code is clearer to read and the numeric indices can change without breaking models.The alpha blending bug can be fixed by putting this shader into data/shaders:http://pioneerspacesim.net/sites/default/files/model.frag.glsl
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: New work-in-progress build with toys for ship modellers
good news after all, i guess i'm a little behind now
s20dan one Q, why you don't simply used he sub_models folder for your "R/LtwinGun", a path will be then not necessaryor doesn't that work from there?still i'm hunting that bug...
RE: New work-in-progress build with toys for ship modellers
potsmoke66 wrote:
good news after all, i guess i'm a little behind now
Ah so thats where the extra bits are kept. Ok I will use Sub models folder, but I think we will still have to use the path /submodels/*name* instead of just the name.
-
Potsmoke66
- Private
- Posts: 1815
- Joined: Sun Nov 27, 2016 2:43 pm
RE: New work-in-progress build with toys for ship modellers
depends on what it is and from where it's called, yesstaticdon't need a path in generaldynamicneeds path for meshes (.obj) and textures*but functions and (sub)models of course can be called without a path, because sub_model folder is allways loaded previous to models (in fact there is a alphanumerical order to, numbers previous to letters and of course common 0 to 9 and a to z). this i guess is caused by the way scripts loaded at all one after the other like in the script itself it works like a batch.so there would be the possibility to name a sub_model i.e. "1_somemodel" and it would be loaded allways previous to all others (until someone has the idea to call his model "0_mymodel", that's why i decided to make a spacial folder for the sub_models which i called then previously to models from pimodels.lua).* with one little exception to that, you could place the textures or meshes to "data" folder to call them dynamical, but i did that only once for the stationwall and won't do it again, else we have a big mess there after a while.if you open pimodels.lua you can see the order they are called up in this order-(model)functions-sub_models-models things have might changed a bit now but in general it should be the same
Q, you put the raw .obj meshes to the folder then?why don't make a little script, including the argument request and a possible animation? after you can call that as modeland don't have to worry about.it could be a function instead of a model (you can place it then even to sub_models, that doesn't matters), the advantage of a function to a model is that you can pass arguments to it when called.(the explanation behind -- is only for us humans
)check therefore maybe woods_1.lua
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))end
now if i like to have a certain gelati, erm sorry, treei can call the function in the script and pass the args pos, rot, & scale to it
Code:
gelati(v(10,0,15),0,v(20,40,20))
(the first argument is vector position, the second "direction" of course 0 is like the mesh is facing originally and 2 will rotate the mesh 360°, the third vector scaleing x,y,z so i can strech or squeeze the mesh like i want to) this simple example shows another advantage of a (pure)function to a modelyou can set a certain material for the function, like "pine" (see upper example)later when called in a models script you can specify how "pine" should appear, by set_material('pine',.....)in a more extended function you can set this way of course more then one materials that will be specified later (i have planned to upgrade the scanner i.e. to such a function to, that will give the modeler the freedom to specify different materials for the scanners base, it's dish and the inside of the dish)imo that's a very comfortable and flexible way to make sub_models.in this example a pine tree that comes in very different sizes and directions all from one basic mesh.any questions?function unique_name_of_the_function(argument1,argument2,and_so_on)(commands, including the use of passed arguments)endthere are other examples (check the biodome in city.lua) and it's use opens a wide range of possibilities(man, isn't it enough i have to checkout what i can do with the new commands, now this guy comes along and suggest to make functions!)
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))end
now if i like to have a certain gelati, erm sorry, treei can call the function in the script and pass the args pos, rot, & scale to it
Code:
gelati(v(10,0,15),0,v(20,40,20))
(the first argument is vector position, the second "direction" of course 0 is like the mesh is facing originally and 2 will rotate the mesh 360°, the third vector scaleing x,y,z so i can strech or squeeze the mesh like i want to) this simple example shows another advantage of a (pure)function to a modelyou can set a certain material for the function, like "pine" (see upper example)later when called in a models script you can specify how "pine" should appear, by set_material('pine',.....)in a more extended function you can set this way of course more then one materials that will be specified later (i have planned to upgrade the scanner i.e. to such a function to, that will give the modeler the freedom to specify different materials for the scanners base, it's dish and the inside of the dish)imo that's a very comfortable and flexible way to make sub_models.in this example a pine tree that comes in very different sizes and directions all from one basic mesh.any questions?function unique_name_of_the_function(argument1,argument2,and_so_on)(commands, including the use of passed arguments)endthere are other examples (check the biodome in city.lua) and it's use opens a wide range of possibilities(man, isn't it enough i have to checkout what i can do with the new commands, now this guy comes along and suggest to make functions!)
-
KingHaggis
- Private
- Posts: 141
- Joined: Thu Aug 26, 2010 11:26 am
RE: New work-in-progress build with toys for ship modellers
Quote:
I had a nice bloom effect going on, when you fly near to a bright star. That code is disabled for the time being though.
Ah, shame... I would love to see it. But first things first, of course
RE: New work-in-progress build with toys for ship modellers
KingHaggis wrote:
Quote:
I had a nice bloom effect going on, when you fly near to a bright star. That code is disabled for the time being though.
Ah, shame... I would love to see it. But first things first, of course
Then you shall!Here is a scene without HDR lighting:And the same scene with HDR lighting enabled:It needs a lot of work though...
RE: New work-in-progress build with toys for ship modellers
That looks pretty damn good Tom. The pink thrusters are a little wacky but they are still an improvement.The planet though looks very nice.
RE: New work-in-progress build with toys for ship modellers
Hmmm....pink thrusters.......ladybird.........Nah! 
-
KingHaggis
- Private
- Posts: 141
- Joined: Thu Aug 26, 2010 11:26 am
RE: New work-in-progress build with toys for ship modellers
I like it! Adds a nice little glow to planets and the spaceship. It's good to see new techniques. I must admit I'm a bit of a graphics ***** and we have never been treated with a spacesim that looks as good as Pioneer, i.m.o. At least, where planets, terrain and starfields are considered. It's my opinion that space has never felt more like space than in Pioneer and every improvement, graphics- and gameplaywise must therefore be embraced. I also greatly admire the work of modellers. Keep up the good work!
RE: New work-in-progress build with toys for ship modellers
KingHaggis wrote:
.... and we have never been treated with a spacesim that looks as good as Pioneer, i.m.o. At least, where planets, terrain and starfields are considered.....
The planets and terrain I agree 100%. The best hands down from any game, the terrain engine is just amazing I feel it is not said often enough :)But I haven't really noticed anything special about the starfields, maybe I havent really been looking properly but then all I do when I get a chance to play is fly around the planets, I dont trade or fight, I only explore planets
Marcel wrote:
Hmmm....pink thrusters.......ladybird.........Nah!
Just call it the Lady-Boy
-
Stardreamer
- Private
- Posts: 203
- Joined: Tue Aug 25, 2009 11:02 am
RE: New work-in-progress build with toys for ship modellers
KingHaggis wrote:
I like it! Adds a nice little glow to planets and the spaceship. It's good to see new techniques. I must admit I'm a bit of a graphics ***** and we have never been treated with a spacesim that looks as good as Pioneer, i.m.o. At least, where planets, terrain and starfields are considered. It's my opinion that space has never felt more like space than in Pioneer and every improvement, graphics- and gameplaywise must therefore be embraced. I also greatly admire the work of modellers. Keep up the good work!
I heartily concur, KingHaggis. The vision of space offered in Pioneer is just breathtaking in it's accuracy and ability to look like the very best films you've ever seen. It looks real, and that does most of the work of player immersion for you right there.
-
KingHaggis
- Private
- Posts: 141
- Joined: Thu Aug 26, 2010 11:26 am
RE: New work-in-progress build with toys for ship modellers
Quote:
But I haven't really noticed anything special about the starfields
Yeah, well... it's not that the starfield is 100% realistic as in real constellations and stuff, but it's black! It's black and the stars are white/silver. Other spacegames always have those weird oversaturated nebula backgrounds. Sometimes, it looks impressive but I'd rather have space the way I see it when I look outside on a clear winter evening. Cold, black, endless with bright twinkling stars. Not those weird nebulae
-
KingHaggis
- Private
- Posts: 141
- Joined: Thu Aug 26, 2010 11:26 am
RE: New work-in-progress build with toys for ship modellers
Quote:
It looks real, and that does most of the work of player immersion for you right there.
You got it!
RE: New work-in-progress build with toys for ship modellers
Quote:
It looks real, and that does most of the work of player immersion for you right there.
Exactly. It (and Orbiter) are the only ones I've seen that make me feel like I'm really out there.
Quote:
Just call it the Lady-Boy
That's what you sit on in the cockpit, a Lady-Boy recliner!
-
Stardreamer
- Private
- Posts: 203
- Joined: Tue Aug 25, 2009 11:02 am
RE: New work-in-progress build with toys for ship modellers
Quote:
t's black and the stars are white/silver. Other space games always have those weird oversaturated nebula backgrounds
Heh. Lots of my pioneer posts have celebrated the look of Pioneer and decried this very point; I was looking at a space game only yesterday that suffered this problem, Light of Altair ([url]http://www.saintxi.com/[/url] Just look at those screenshots - why are developers so afraid of black as a background?? Isn't that what most of us Earthbound humans can relate to?In the end this very point actually put me off buying the game...
Quote:
That's what you sit on in the cockpit, a Lady-Boy recliner!