Scorch Marks
Moderators: winston, another_commander
- 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
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.
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
- montana05
- ---- 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
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.hiran wrote: ↑Thu Dec 16, 2021 10:30 pmWhile 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.
Scars remind us where we've been. They don't have to dictate where we're going.
- 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
This is exciting! The documentation actually talks about replacing the material when the ship is getting damaged...montana05 wrote: ↑Fri Dec 17, 2021 4:46 amWell, 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.
Code: Select all
my_ship_damaged_diffuse.png
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
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Scorch Marks
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.
- montana05
- ---- 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
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.hiran wrote: ↑Fri Dec 17, 2021 6:30 amThis is exciting! The documentation actually talks about replacing the material when the ship is getting damaged...So this use case must have been thought about.Code: Select all
my_ship_damaged_diffuse.png
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.
Scars remind us where we've been. They don't have to dictate where we're going.
- Cholmondely
- 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: Scorch Marks
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...montana05 wrote: ↑Fri Dec 17, 2021 6:56 amShaders 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.hiran wrote: ↑Fri Dec 17, 2021 6:30 amThis is exciting! The documentation actually talks about replacing the material when the ship is getting damaged...So this use case must have been thought about.Code: Select all
my_ship_damaged_diffuse.png
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.
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?
- montana05
- ---- 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
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.Cholmondely wrote: ↑Fri Dec 17, 2021 9:34 amI'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...
Scars remind us where we've been. They don't have to dictate where we're going.
- 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
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.montana05 wrote: ↑Sun Dec 19, 2021 1:13 pmWell, 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.Cholmondely wrote: ↑Fri Dec 17, 2021 9:34 amI'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...
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
- Cholmondely
- 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: Scorch Marks
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?
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Scorch Marks
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
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
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
- Cholmondely
- 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: Scorch Marks
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).Griff wrote: ↑Thu Dec 14, 2023 4:40 pmRE: 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 missed what you achieved with your Sidewinder - despite reading your post and gazing at your picture.
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?
•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?
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Scorch Marks
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
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries