Obj files? Will I need to create Dat2ObjTexNorm.py?
Moderators: winston, another_commander
Obj files? Will I need to create Dat2ObjTexNorm.py?
Hi everyone!
I've made a little webpage page that spins some classic ships around, all in software:
https://codepen.io/SarahC/pen/QqobmO
And a super naive converter (it just scans for keywords, and stops at brackets) for VRML 2 to JavaScript ship declarations:
https://codepen.io/SarahC/pen/yzZKWN
https://codepen.io/SarahC/pen/pWYJKV
I've had a go at converting the Dat files in Oolite to Obj files, using Dat2ObjTex.py ((C) Giles Williams 2005)
The results so far are ok,
https://codepen.io/SarahC/pen/PJvzRm?editors=0010
But that Python code only handles simple ships, and one texture... it fails for the more complex Dat files. =(
Are there Obj/Texture files out there for the standard Oolite ships?
Or does someone have a reverse version of Obj2DatTexNormal.py?
I was aiming of a sandboxed Chrome fullscreen instance, with the WebGL page showing the ships zooming in and out, as a screensaver for Windows. Saves me tackling SlickDX in Visual Studio!
I've made a little webpage page that spins some classic ships around, all in software:
https://codepen.io/SarahC/pen/QqobmO
And a super naive converter (it just scans for keywords, and stops at brackets) for VRML 2 to JavaScript ship declarations:
https://codepen.io/SarahC/pen/yzZKWN
https://codepen.io/SarahC/pen/pWYJKV
I've had a go at converting the Dat files in Oolite to Obj files, using Dat2ObjTex.py ((C) Giles Williams 2005)
The results so far are ok,
https://codepen.io/SarahC/pen/PJvzRm?editors=0010
But that Python code only handles simple ships, and one texture... it fails for the more complex Dat files. =(
Are there Obj/Texture files out there for the standard Oolite ships?
Or does someone have a reverse version of Obj2DatTexNormal.py?
I was aiming of a sandboxed Chrome fullscreen instance, with the WebGL page showing the ships zooming in and out, as a screensaver for Windows. Saves me tackling SlickDX in Visual Studio!
-
- Quite Grand Sub-Admiral
- Posts: 6656
- Joined: Wed Feb 28, 2007 7:54 am
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
Hi and welcome!
The corresponding textures are the same ones that can be found in the Resources/Textures folder of your Oolite distribution.
As for a converter utility, I don't think that there is anything maintained today beyond Ob2DatTexNormal.py. But hopefully the object files will be sufficient to achieve what you want.
Yes there are. Object files for all the new models can be found in the oolite-assets repository on github. Follow this link: https://github.com/OoliteProject/oolite ... t-1.80-objAre there Obj/Texture files out there for the standard Oolite ships?
The corresponding textures are the same ones that can be found in the Resources/Textures folder of your Oolite distribution.
As for a converter utility, I don't think that there is anything maintained today beyond Ob2DatTexNormal.py. But hopefully the object files will be sufficient to achieve what you want.
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
Hiyah!
Thanks for the link - perfect, just what I needed.
The Cobra - Mark 3 diffuse.png file seems to be multi layered... I open it in photoshop and there's just a very subtle black and white shading texture, with none of the hull's green and blue to be seen!
I think it's a special PNG because several programs can't handle it: https://imgur.com/a/QVNuC
Do you know anything about it? I may have got the wrong end of the stick.
-
- Quite Grand Sub-Admiral
- Posts: 6656
- Joined: Wed Feb 28, 2007 7:54 am
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
All textures in the post-1.80 models look similar. The reason is that the emission map is embedded in the png's alpha channel. You will need an image processing program capable of separating a texture's individual channels in order to view it porperly.SarahC wrote: ↑Wed Oct 25, 2017 9:30 amThe Cobra - Mark 3 diffuse.png file seems to be multi layered... I open it in photoshop and there's just a very subtle black and white shading texture, with none of the hull's green and blue to be seen!
I think it's a special PNG because several programs can't handle it: https://imgur.com/a/QVNuC
Do you know anything about it? I may have got the wrong end of the stick.
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
I see, thanks!another_commander wrote: ↑Wed Oct 25, 2017 9:53 amAll textures in the post-1.80 models look similar. The reason is that the emission map is embedded in the png's alpha channel. You will need an image processing program capable of separating a texture's individual channels in order to view it porperly.
It's hidden away in Photoshop - selecting the "Channels" window shows the RGB channels AFTER the transparency has been applied, we want it BEFORE.
To do this:
Select the layer, then go to Layer menu -> Layer Mask -> From Transparency.
The alpha channel is extracted into a greyscale mask attached to the diffuse layer, which is now an opaque RGB layer.
To see the opaque layer on its own - disable the mask layer.
To see the mask as an "Emission" layer, holding left Alt key, and clicking the greyscale alpha mask layer that is linked to the diffuse layer will show only the alpha channel - the emissive parts in white.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6311
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
Looks good! Took me a moment to realise it was mouse-interactive, though.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
Next stop - online OOLite!
The source already has the ship AI in JavaScript too!
The source already has the ship AI in JavaScript too!
- maik
- Wiki Wizard
- Posts: 2028
- Joined: Wed Mar 10, 2010 12:30 pm
- Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
Hello and welcome! Grondilu started a WebGL effort as well, you might want to get in touch. Also, the “Porting to other platforms” forum is a better place for this.
Looking forward to seeing more of your work!
Looking forward to seeing more of your work!
-
- Quite Grand Sub-Admiral
- Posts: 6656
- Joined: Wed Feb 28, 2007 7:54 am
Re: Obj files? Will I need to create Dat2ObjTexNorm.py?
Topic moved to Porting to Other Platforms.
- Cholmondely
- Archivist
- Posts: 5308
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
3D models of Elite/Oolite Ships
Just came across this: https://www.thingiverse.com/thing:4098763 by SarahC_ January 12, 2020
For making 3D models of Elite/Oolite ships
For making 3D models of Elite/Oolite ships
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?
•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?
Re: 3D models of Elite/Oolite Ships
Fixed that url for you: Ultimate Classic Elite Ship Maker.Cholmondely wrote: ↑Sun Aug 07, 2022 9:00 pmJust came across this: https://www.thingiverse.com/thing:4098763 by SarahC_ January 12, 2020
For making 3D models of Elite/Oolite ships
Yes, cool idea. Is it becoming common to have a 3D printer with one's PCs too?
I was young, I was naïve. Jonny Cuba made me do it!
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: 3D models of Elite/Oolite Ships
Probably! Bet a 3D printer can't make one of these...
Other views here: http://www.ianlawrencemodels.com/cobramkIII.html
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!
And any survivors, their debts I will certainly pay. There's always a way!
Re: 3D models of Elite/Oolite Ships
No, not with that level of tender craftsmanship..
I was young, I was naïve. Jonny Cuba made me do it!
Re: 3D models of Elite/Oolite Ships
I think they probably can...
https://www.thingiverse.com/thing:2860481
But you need a good model(ler)