Scorch Marks

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Scorch Marks

Post by hiran »

While I am seeing so many paint jobs I'd be wondering if Oolite could render scorch marks indicating that a ship took hits in battle.

Ships get rendered with a bitmap file for all their surfaces. Would it be feasible to either
- edit such bitmaps on the fly and add some dark spots, or
- create another bitmap file as overlay that contains the dark spots?

Would be nice to see your own ship after a dogfight whilst returning to the station.
Would be nice to see other ships, close to derelict status to check where they have taken hits.
Sunshine - Moonlight - Good Times - Oolite
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: Scorch Marks

Post by montana05 »

hiran wrote: Thu Dec 16, 2021 10:30 pm
While I am seeing so many paint jobs I'd be wondering if Oolite could render scorch marks indicating that a ship took hits in battle.

Ships get rendered with a bitmap file for all their surfaces. Would it be feasible to either
- edit such bitmaps on the fly and add some dark spots, or
- create another bitmap file as overlay that contains the dark spots?

Would be nice to see your own ship after a dogfight whilst returning to the station.
Would be nice to see other ships, close to derelict status to check where they have taken hits.
Well, if you use http://wiki.alioth.net/index.php/Oolite ... Assessment to determine the damage and http://wiki.alioth.net/index.php/Oolite ... tMaterials to change the look to a damaged one it would be possible.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Scorch Marks

Post by hiran »

montana05 wrote: Fri Dec 17, 2021 4:46 am
Well, if you use http://wiki.alioth.net/index.php/Oolite ... Assessment to determine the damage and http://wiki.alioth.net/index.php/Oolite ... tMaterials to change the look to a damaged one it would be possible.
This is exciting! The documentation actually talks about replacing the material when the ship is getting damaged...

Code: Select all

my_ship_damaged_diffuse.png
So this use case must have been thought about.

Next is to see how we can apply this throughout all the ships. This sounds difficult for me as we do not know what kind of bitmaps each ship brings and how many surfaces the ship will have. Not to talk about rewriting the bitmaps and loading them on the fly.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Re: Scorch Marks

Post by another_commander »

You could apply the scorch marks with some shader magic and so you don't have to care about what original bitmaps are in use. Not sure about the intricate "how to" details, but I am certain it's doable. Note of course, that using your own shaders means bypassing the default game shaders altogether.
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: Scorch Marks

Post by montana05 »

hiran wrote: Fri Dec 17, 2021 6:30 am
This is exciting! The documentation actually talks about replacing the material when the ship is getting damaged...

Code: Select all

my_ship_damaged_diffuse.png
So this use case must have been thought about.

Next is to see how we can apply this throughout all the ships. This sounds difficult for me as we do not know what kind of bitmaps each ship brings and how many surfaces the ship will have. Not to talk about rewriting the bitmaps and loading them on the fly.
Shaders are certainly a more efficient way to solve this. However, my knowledge of them is very limited, so I have no idea how this could be done. My suggested method would require at least 1 more diffuse map per ship, possible another normal map as well. In SIRF there are some examples for battle damaged ships, hanging out next to the station.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Scorch Marks

Post by Cholmondely »

montana05 wrote: Fri Dec 17, 2021 6:56 am
hiran wrote: Fri Dec 17, 2021 6:30 am
This is exciting! The documentation actually talks about replacing the material when the ship is getting damaged...

Code: Select all

my_ship_damaged_diffuse.png
So this use case must have been thought about.

Next is to see how we can apply this throughout all the ships. This sounds difficult for me as we do not know what kind of bitmaps each ship brings and how many surfaces the ship will have. Not to talk about rewriting the bitmaps and loading them on the fly.
Shaders are certainly a more efficient way to solve this. However, my knowledge of them is very limited, so I have no idea how this could be done. My suggested method would require at least 1 more diffuse map per ship, possible another normal map as well. In SIRF there are some examples for battle damaged ships, hanging out next to the station.
I'm excited about the idea of somebody in a unique ship getting damaged and another player with Oolite Communicator having to go and get the spare parts from Ceesxe...
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
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: Scorch Marks

Post by montana05 »

Cholmondely wrote: Fri Dec 17, 2021 9:34 am
I'm excited about the idea of somebody in a unique ship getting damaged and another player with Oolite Communicator having to go and get the spare parts from Ceesxe...
Well, it would be pretty easy to include this feature for all core-ships. However, the package would take some space, let's say 3 more diffuse maps, light, medium and heavy damaged plus, maybe, 1 additional normal map for heavy. A decent map will take between 1 - 2 MB, multiplied by all core ships. It would add a new dimension to the game, just by viewing a vessel you already can see how tough he likely will be. :wink:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Scorch Marks

Post by hiran »

montana05 wrote: Sun Dec 19, 2021 1:13 pm
Cholmondely wrote: Fri Dec 17, 2021 9:34 am
I'm excited about the idea of somebody in a unique ship getting damaged and another player with Oolite Communicator having to go and get the spare parts from Ceesxe...
Well, it would be pretty easy to include this feature for all core-ships. However, the package would take some space, let's say 3 more diffuse maps, light, medium and heavy damaged plus, maybe, 1 additional normal map for heavy. A decent map will take between 1 - 2 MB, multiplied by all core ships. It would add a new dimension to the game, just by viewing a vessel you already can see how tough he likely will be. :wink:
I think in this case the idea was less about rendering the damage than the idea of one player in need and another one helping out.

So it would require players to be able of buying equipment not to be installed on their ship but go into the cargo hold instead. How else would you transport a navigational array on top of the one that is installed in your ship?
We would have to be able to sell or donate cargo/equipment to other players. For cargo this already works out with the OoliteCommunicator.
Finally you'd need to be able to have equipment installed that comes from your own cargo hold, or you would need to sell it to the station so this piece of equipment gets installable.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Scorch Marks

Post by Cholmondely »

Smivs did create a damaged ship set which worked with the older versions of his Battle Damage OXP.

Image
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
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Scorch Marks

Post by Griff »

RE: Doing this with shaders:
this oxp sidewinder uses a custom shader that's heavily based on the default oolite shader to add 'wear'' to the ship based on it's current TradeFactor resale value:

https://bb.oolite.space/viewtopic.ph ... 40#p286840

I'm not sure what affects the ships 'TradeFactor' value and how Oolite arrives at the ship's current value - possibly the number of hyper space jumps taken since last maintenance maybe? if it could be adjusted when the ship takes hull damage then this shader might work ok, or maybe another sahder uniform could be created that tallies up ship damage to drive the effect
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Scorch Marks

Post by Cholmondely »

Griff wrote: Thu Dec 14, 2023 4:40 pm
RE: Doing this with shaders:
this oxp sidewinder uses a custom shader that's heavily based on the default oolite shader to add 'wear'' to the ship based on it's current TradeFactor resale value:

https://bb.oolite.space/viewtopic.ph ... 40#p286840

I'm not sure what affects the ships 'TradeFactor' value and how Oolite arrives at the ship's current value - possibly the number of hyper space jumps taken since last maintenance maybe? if it could be adjusted when the ship takes hull damage then this shader might work ok, or maybe another sahder uniform could be created that tallies up ship damage to drive the effect
I think that the value has a chance of deteriorating with each jump - and the worse the value, the greater the chance of deterioration (until you are down to 75% or whatever, where I think it cuts out).

I missed what you achieved with your Sidewinder - despite reading your post and gazing at your picture. :oops:

I've now added your gif to our wiki and added mentions of what you achieved to the Sidewinder (Oolite) page, the Maintenance page and as an idea on the OXP Texture Howto page.
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
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Scorch Marks

Post by Griff »

I'm sure there was a version where the edges around the worn away paint had a fire effect applied and it looked like the the hull was burning away, it didn't get further than a demo shader though, would have needed scripting to replace an exploded game object with a copy that had the burning shader applied to it, i know there's "this ship died" trigger events and stuff avaiable but matching the removed objects rotation and velocity so the new copy keeps traveling along the same path as it burns away seemed a bit hard to do
Post Reply