Model converter utilities

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Model converter utilities

Post by Killer Wolf »

sigh, i'd forgotten how frustrating this can be :-/
is Wings playing silly buggers w/ me or am i missing something obvious;
i converted the Cobra 3 model from the game to an obj, loaded it into wings and it's pointing up the Z axis [which is horizontal, unlike Blender]. i resized my own test model against it, aligned it the same, added the ship desrcripty stuff from one of my Vampires and had a bit play. i've seen my model in game, but it's exhausts are coming out the belly, and the ship's the equivalent of rotated 90 degrees on two axes - so how is it not the same as the Cobra, since i used a game model in Wings? :-/
i tried the "switch Z and Y axis" option but i can't see any difference, oddly.

TIA
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Model converter utilities

Post by Killer Wolf »

well, i'm about to give up on this, just flat-out can't get my test model to work right.
- loaded in the cobra3 model from the game, sized mine accordingly. applied rotation and scale etc in blender
exported it in blender as OBJ, had a few trails until i got the axes matching Wings when imported.
- in wings, it's the right size and facing the right direction as the cobra3
- exported as OBJ, 1:1 scale, didn't use the "swap y and z" option"
- converted to dat.

in game, the ship is MASSIVE, about 4x the size of a Python it seems, and is rotated 90 degrees on two axes, so the exhaust flares are coming out the belly.
the npc entry is addressing the .DAT file [yeah, i'd naffed that up a couple times!]

so i'm currently out of ideas. Does anyone know why it's coming out so wrong despite being matched w/ a pukka game model?

TIA
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Model converter utilities

Post by Old Murgh »

Killer Wolf wrote: Tue May 24, 2022 12:37 pm
well, i'm about to give up on this, just flat-out can't get my test model to work right.
- loaded in the cobra3 model from the game, sized mine accordingly. applied rotation and scale etc in blender
exported it in blender as OBJ, had a few trails until i got the axes matching Wings when imported.
- in wings, it's the right size and facing the right direction as the cobra3
- exported as OBJ, 1:1 scale, didn't use the "swap y and z" option"
- converted to dat.

in game, the ship is MASSIVE, about 4x the size of a Python it seems, and is rotated 90 degrees on two axes, so the exhaust flares are coming out the belly.
the npc entry is addressing the .DAT file [yeah, i'd naffed that up a couple times!]

so i'm currently out of ideas. Does anyone know why it's coming out so wrong despite being matched w/ a pukka game model?

TIA
Sorry, it doesn't seem similar to any of the issues I've had to battle with.
Have you tried to export back the plain game Cobra the same route to see if there are some settings causing this?
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Model converter utilities

Post by Cholmondely »

Killer Wolf wrote: Tue May 24, 2022 12:37 pm
well, i'm about to give up on this
I'd love to help but don't know how to. Is there anything useful that I can do?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2687
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Model converter utilities

Post by Redspear »

Killer Wolf wrote: Tue May 24, 2022 12:37 pm
well, i'm about to give up on this, just flat-out can't get my test model to work right.
That would be a real shame as I'm a fan of much of your stuff.

Killer Wolf wrote: Tue May 24, 2022 12:37 pm
- exported as OBJ, 1:1 scale, didn't use the "swap y and z" option"
Maybe you should?

...I mean we both know it's 'wrong' but the settings aren't matching the results so try a different scale and do swap y and z.
Even just doing the latter would mean you could rescue in game with a model_scale_factor shipdata entry.

You don't strictly need to solve the why, right? You just want it to work I suspect.
User avatar
cbr
---- E L I T E ----
---- E L I T E ----
Posts: 1422
Joined: Thu Aug 27, 2015 4:24 pm

Re: Model converter utilities

Post by cbr »

You don't strictly need to solve the why, right? You just want it to work I suspect.
If your workflow turn it two axes 90 than in wings/blender turn it minus 90 degrees on those axes and export ;)
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Model converter utilities

Post by Killer Wolf »

i'll take a couple more runs at it, there must be something really obvious but i'm not seeing it so far.
- in the Oolite world, am i right thinking X and Z are the horizontal axes and Y the vertical? this seems right w/ the plists and models i've imported, but i just want to be sure.

has anyone managed to DAT to OBj the more complex game models? i converted "cobra3_redux" no prob, which seems to be the original BB Micro ship, that i based my resizing/orientation one as mentioned above. There is, however, an "oolite_cobra3" model, which i'm assuming is Griff's beauty. i say "assume" cos i can't export it; Dat2ObjTEx said "this had too many textures, use Dat2Obj", so i used that, it seems to work fine, but when i import to blender or wings there's nowt there :-/
i just wanted to try using something that had more geometry; the cobra has about 12 faces, my model has about 4000 :-D

it's a shame the Blender export routine doesn't work, would be helpful to cut out the messing about of trying to export-import-export between Blender and Wings, but so far that's the only way to get rid of these odd normalization errors i mentioned.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2687
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Model converter utilities

Post by Redspear »

TBH, every time I work with even just Wings (which isn't that often) I feel like I have to learn the obj/dat/texturing process all over again.
Once it's in my head then no problem but unfortunately it's only ever made the briefest of stays.
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Model converter utilities

Post by Old Murgh »

Killer Wolf wrote: Tue May 24, 2022 8:13 pm
i'll take a couple more runs at it, there must be something really obvious but i'm not seeing it so far.
- in the Oolite world, am i right thinking X and Z are the horizontal axes and Y the vertical? this seems right w/ the plists and models i've imported, but i just want to be sure.
This is certain. Forward lasers and exhaust plumes operate on the Z axis.
Killer Wolf wrote: Tue May 24, 2022 8:13 pm
has anyone managed to DAT to OBj the more complex game models? i converted "cobra3_redux" no prob, which seems to be the original BB Micro ship, that i based my resizing/orientation one as mentioned above. There is, however, an "oolite_cobra3" model, which i'm assuming is Griff's beauty. i say "assume" cos i can't export it; Dat2ObjTEx said "this had too many textures, use Dat2Obj", so i used that, it seems to work fine, but when i import to blender or wings there's nowt there :-/
i just wanted to try using something that had more geometry; the cobra has about 12 faces, my model has about 4000 :-D
I have had the same issues. The single texture file low polys are usually unproblematic to convert from dat to obj properly skinned, but the medium and high polys are most often fails. In a few cases the one that has worked is the texture-free script Dat2Obj.py

If you open the dat as a txt file the Aegidian Cobra3 will reveal it uses 1 texture and draws 20 faces, while referring to the texture name in the file. Griff Cobra3 uses 2 textures over 1076 faces, but makes no name reference to the image files, which I think is a dealbreaker for the (tex) conversion scripts.

But Griff generously shares his obj and wings resources on his box so importing them that way is easy.

I've never tried Blender, but coming back after 15 years away from Wings, I eventually nearly returned to my former level. There is usually a way of doing things, but my ambitions are much more low-poly than yours.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Model converter utilities

Post by another_commander »

Old Murgh wrote: Tue May 24, 2022 8:51 pm
But Griff generously shares his obj and wings resources on his box so importing them that way is easy.
This reminded me that we have the obj format models also on our github repository for anyone interested: https://github.com/OoliteProject/oolite ... t-1.80-obj
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Re: Model converter utilities

Post by Killer Wolf »

well, i dunno. has someone developed troll.oxp, by any chance?
started from scratch, loaded up griff's Cobra to compare, reexported etc etc, my ship is now in game and looking fine. maybe i just previously inadvertently effed something up and carried it from test to test.
i have noticed an oddity though. in the number of verts when using the coverter utils:-
Griff's mainhull - has 1755 verts in the "normalized error" Blender export, and 1943 verts in the Wings export, same number of faces.
my model - has 4661 verts in the blender export, and 3204 verts in the Wings

what's that about? i went through my model to clean her up, searching on loose geometry and non manifold and did the usual remove-doubles stuff to kill errant verts. i'm guessing it might be a quirk of how the script cycles through stuff and adds totals?

anyhoo, paws crossed, looks like the Isis Interstellar production lines are back up and running.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Model converter utilities

Post by Cody »

Killer Wolf wrote: Wed May 25, 2022 8:58 am
anyhoo, paws crossed, looks like the Isis Interstellar production lines are back up and running.
Cool!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Model converter utilities

Post by Cholmondely »

Killer Wolf wrote: Wed May 25, 2022 8:58 am
anyhoo, paws crossed, looks like the Isis Interstellar production lines are back up and running.
Murgh will have to tell us which bottle of bubbly we need to break across the bows of your first down the slips!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Model converter utilities

Post by Old Murgh »

Cholmondely wrote: Wed May 25, 2022 9:39 am
Killer Wolf wrote: Wed May 25, 2022 8:58 am
anyhoo, paws crossed, looks like the Isis Interstellar production lines are back up and running.
Murgh will have to tell us which bottle of bubbly we need to break across the bows of your first down the slips!
Finally, bubblytime!
Primarily it comes down to deciding between Sparkling Alaza — «Alazagne», or Ontimaxecorta. Only riffraff settle for Xexetisecco.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Model converter utilities

Post by montana05 »

Killer Wolf wrote: Wed May 25, 2022 8:58 am
anyhoo, paws crossed, looks like the Isis Interstellar production lines are back up and running.
Welcome back, waiting to see your new ship(s) in action. :wink:
Scars remind us where we've been. They don't have to dictate where we're going.
Post Reply