Oolite Bulletins

For information and discussion about Oolite.
It is currently Tue Dec 12, 2017 2:02 pm

All times are UTC




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Wed Oct 25, 2017 2:29 am 
Offline
Poor
Poor

Joined: Wed Oct 25, 2017 2:16 am
Posts: 5
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!


Top
   
PostPosted: Wed Oct 25, 2017 9:00 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5023
Hi and welcome!
Quote:
Are there Obj/Texture files out there for the standard Oolite ships?
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-obj
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.


Top
   
PostPosted: Wed Oct 25, 2017 9:30 am 
Offline
Poor
Poor

Joined: Wed Oct 25, 2017 2:16 am
Posts: 5
Quote:
Hi and welcome!
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.


Top
   
PostPosted: Wed Oct 25, 2017 9:53 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5023
Quote:
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.
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.


Top
   
PostPosted: Wed Oct 25, 2017 11:40 am 
Offline
Poor
Poor

Joined: Wed Oct 25, 2017 2:16 am
Posts: 5
Quote:
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.
I see, thanks!

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.


Top
   
PostPosted: Fri Oct 27, 2017 1:36 am 
Offline
Poor
Poor

Joined: Wed Oct 25, 2017 2:16 am
Posts: 5
Sorted!

Thanks for your help.

https://codepen.io/SarahC/pen/PJvzRm


Top
   
PostPosted: Fri Oct 27, 2017 2:04 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6244
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:

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


Top
   
PostPosted: Fri Oct 27, 2017 3:08 am 
Offline
Poor
Poor

Joined: Wed Oct 25, 2017 2:16 am
Posts: 5
Next stop - online OOLite!

The source already has the ship AI in JavaScript too!


Top
   
PostPosted: Sat Oct 28, 2017 9:31 pm 
Offline
Wiki Wizard
Wiki Wizard
User avatar

Joined: Wed Mar 10, 2010 12:30 pm
Posts: 1857
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
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!


Top
   
PostPosted: Sun Oct 29, 2017 9:05 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5023
Topic moved to Porting to Other Platforms.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited