I've been trying to work out how to go about doing this for some time and I'm just getting stuck switching back and forth between the UI (Lua) and the C++ side of things so this is a bit of a brain dump.
What I would like to do is edit the players ship colours, decals, patterns and other things.
This means being able to get and edit the models "ModelSkin" objects and the things that it contains.
I've added ways of reading the current colours and exposed them to Lua for the LuaModelSkin object.
This is where things start to go awry though because I need to update the ModelSpinner objects ModelSkin (fine I can add an accessor to that) but how do I access it once it's run the UI defining function?
Can I keep a global reference too it?
Will that get cleaned up?
I need to hold a skin object and keep updating that too, can I make that global?
How do I make sure they're nil'd out once the screen closes?
What I've gotten so far is a separate screen with a ModelSpinner and some horizontal slider bars that are actually modifying the number of background stars whilst I work out how everything works.
Ship style editor
-
- Posts: 1343
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: Ship style editor
FluffyFreak wrote:I've been trying to work out how to go about doing this for some time and I'm just getting stuck switching back and forth between the UI (Lua) and the C++ side of things so this is a bit of a brain dump.
What I would like to do is edit the players ship colours, decals, patterns and other things.
This means being able to get and edit the models "ModelSkin" objects and the things that it contains.
I've added ways of reading the current colours and exposed them to Lua for the LuaModelSkin object.
This is where things start to go awry though because I need to update the ModelSpinner objects ModelSkin (fine I can add an accessor to that) but how do I access it once it's run the UI defining function?
Can I keep a global reference too it?
Will that get cleaned up?
I need to hold a skin object and keep updating that too, can I make that global?
How do I make sure they're nil'd out once the screen closes?
What I've gotten so far is a separate screen with a ModelSpinner and some horizontal slider bars that are actually modifying the number of background stars whilst I work out how everything works.
I have no clue what code you have running underneath but would you consider a simple way to " edit the models "ModelSkin" objects and the things that it contains"?
The ( easiest way is to do what Star Trek, Star Wars, and other have done is make collations, or civilizations), and the user chooses the collations, or civilization they wish to belong to and the ships and equipment is hard coded into the game. Think of sports teams, or the Olympic's. All teams have the same color scheme. No editing would be required!
Second way is to go to the other end of the spectrum and provide a complete system of editing ships and related equipment, gear and anything else you or the user can dream up and that is models. Think of Microsoft Flight Sim X or X plane. The user could use GMAX and ModelConverterX_130, both free programs to edit and or make their own.
What caught my attention is your statement
That will kill the refresh rate quickly.I need to update the ModelSpinner objects ModelSkin".
Re: Ship style editor
Heh, GMAX is still around? I thought Autodesk ditched it quite a while ago. Anyhow, you can actually access everything about ships already with graphics packages (including GMAX, if it can export to .obj or .dae). Models, textures, ship definitions, etc. And putting in a ship in Pioneer is quite straightforward mostly.meows wrote: Second way is to go to the other end of the spectrum and provide a complete system of editing ships and related equipment, gear and anything else you or the user can dream up and that is models. Think of Microsoft Flight Sim X or X plane. The user could use GMAX and ModelConverterX_130, both free programs to edit and or make their own.
Even then most players wouldn't want to use any of those to recolor their ship, I'm sure.
What fluffyfreak talks about is a way to customize the player ship coloring that comes from patterns and decal logos. Main color, accent color, etc.
-
- Posts: 1343
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: Ship style editor
nozmajner is correct I'm talking about in-game colour editing of the ships using our existing ship colouring system :)
We support dynamically colouring different parts of the ships and this is done in the shaders at runtime. It allows us to have different coloured ships, building, stations, etc, and this is all done procedurally ingame.
I'm talking about it changing the values held within the ModelSkin for the player only, the part that's proving tricky is integrating a preview of it with the UI so that the user can see what they're doing before applying it to their own ship.
For more information there is a wiki article on our custom modelling system.
You can create ships, indeed nozmajner has written a guide to this for our wiki too, using most modelling packages and there is a Visual Style Guide that we recommend following if you want them to appear inthe main games distribution.
We support dynamically colouring different parts of the ships and this is done in the shaders at runtime. It allows us to have different coloured ships, building, stations, etc, and this is all done procedurally ingame.
I'm talking about it changing the values held within the ModelSkin for the player only, the part that's proving tricky is integrating a preview of it with the UI so that the user can see what they're doing before applying it to their own ship.
For more information there is a wiki article on our custom modelling system.
You can create ships, indeed nozmajner has written a guide to this for our wiki too, using most modelling packages and there is a Visual Style Guide that we recommend following if you want them to appear inthe main games distribution.
-
- Posts: 1343
- Joined: Tue Jul 02, 2013 1:49 pm
- Location: Beeston, Nottinghamshire, GB
- Contact:
Re: Ship style editor
I'm trying to avoid a system like Microsoft Flight Sim X's as I did a large part of the work to bring it to Steam last year ;)meows wrote:Think of Microsoft Flight Sim X or X plane.
Pioneer's is already very flexible and easy to customise but is just inaccessible once you are ingame. Unfortuntely the bits that I really understand don't include the UI so I'm finding this part tricky.
Re: Ship style editor
I didn't write that "first ship" guide. There's one more detailed I've started to work on, but it's still at the very beginnings.
Re: Ship style editor
While you are poking around this part of the code - would it be possible to expose the seed (if it is done like that) that is determining ship "looks" to lua? I am facing the problem that re-created ships (when you re-enter a system) look different every time.
I currently need this for the S&R missions. Stranded ships change color every time you re-enter the system.
And I'm debating on adding permanent ships (notorious pirates, etc.) to systems. That requires a possibility to have them look the same though.
Just checking if this is possible or a lot of work to do.
I currently need this for the S&R missions. Stranded ships change color every time you re-enter the system.
And I'm debating on adding permanent ships (notorious pirates, etc.) to systems. That requires a possibility to have them look the same though.
Just checking if this is possible or a lot of work to do.