Page 1 of 1
Scorch Marks
Posted: Thu Dec 16, 2021 10:30 pm
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.
Re: Scorch Marks
Posted: Fri Dec 17, 2021 4:46 am
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.
Re: Scorch Marks
Posted: Fri Dec 17, 2021 6:30 am
by hiran
This 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.
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.
Re: Scorch Marks
Posted: Fri Dec 17, 2021 6:36 am
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.
Re: Scorch Marks
Posted: Fri Dec 17, 2021 6:56 am
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...
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.
Re: Scorch Marks
Posted: Fri Dec 17, 2021 9:34 am
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...
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...
Re: Scorch Marks
Posted: Sun Dec 19, 2021 1:13 pm
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.
Re: Scorch Marks
Posted: Sun Dec 19, 2021 6:53 pm
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.
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.
Re: Scorch Marks
Posted: Wed Dec 13, 2023 9:29 pm
by Cholmondely
Smivs
did create a
damaged ship set which worked with the older versions of his
Battle Damage OXP.
Re: Scorch Marks
Posted: Thu Dec 14, 2023 4:40 pm
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
Re: Scorch Marks
Posted: Thu Dec 14, 2023 6:49 pm
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.
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.
Re: Scorch Marks
Posted: Fri Dec 15, 2023 9:33 am
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