Krnt_13
(Krnt 13)
#1
Hi,
When modding Homeworld one of the things I love the most is to make new effects, and I have done quite some effects in the past like this Ion Hit effect:
It was a complex and a littlebit taxing effect I made in HW2 along with a few others, but they were nothing that my netbook or any other PC could handle, so I wanted to transfer this effect and all the necessary files to the new engine, after a few fixes here and there I managed to made them working.
As expected the new engine has a more complex rendering so the effects were far more taxing than before, so cutting the more taxing parts of the combo effect really helped to keep an acceptable performance (trying to keep it over 60 fps in a mid range pc).
For the moment everything was nice, until I started to experience some random crashes in large battles, after some troubleshooting I found that the main cause were the new effects, the Kushan and taiidan Ion hit effect and the Large Kinetic hit effect to be more precise, if I enable any of them the game crashes but only on large battles, in smaller ones with no more than 5 ships everything runs perfectly. After checking them thoroughly file by file, they were all perfect, so what was the real cause?
Right now Iām still not sure, and Iām still running tests trying to figure out the issue.
BitVenom
(BitVenom)
#2
If you can bundle them up in a form that I can play with, do so and send me a PM.
Generally a key thing to note is that the āoldā methods for FX were quite overdraw heavy - now with more modern techniques (like our very unique version of Depth-Bias) - you can do way more visually with much less. Per-sprite Depth-Bias is 3-5x more expensive than without - but as it cleans up intersections, does tons of math for volumetrics, etc - it is completely worth it.
Also of note, the old FX system often had tons of āsurface alignedā things (blast marks, etc) - but now because many ships (HW1 in particular) have so many raised panels and edges - these actually often strike in odd ways and look dumb more often than useful. We avoid them. Better is to allow Scars to do that work (and nobody that Iāve seen has pushed the new Scar engine much) - and instead use meshes (like the bullet splash) - the meshes will do a small depth bias to not draw hard intersections, and they can do more work as a single object than dozens of carefully crafted sprites - for less GPU/CPU.
If you have questions, ask - I am not done with FX yet either⦠I plan to add a ābudgetā management system, and some new controls for driving long-lifetime meshes (like the Kadeshi Tendrils, which are indeed just FX) with custom shader commands, etc.
2 Likes
Krnt_13
(Krnt 13)
#3
Thanks Dave, Iām going to send it, you will find that the effects I made are quite redundant, so maybe that is one of the reasons why it gives me problems.
Also my hit effects are mostly particles, I havenāt played with scars too much yet, and I have tried to avoid adding more lights because it mostly cause heavy fps drops.
EDIT:
I tested the file I sent you, it works perfectly, it will not crash, maybe its the mix of all the other things I have already working in the mod like the unguided missiles used as bullets that are stressing the game too much, but the fps were almost always over 60 when the crash normally happened.
The entire mod is around 200mb, so maybe its is going to be a littlebit more complicated than I thought.
Here is a video of the game crashing:
As you can see the effects work without issue at the beginning, once the battle heats up the game crashes.
BitVenom
(BitVenom)
#4
Could just be fragmenting the hell out of RAM and going down due to that. This game is not really smart with RAM, nor all that robust when it starts to fail. There are some improvements to be made there, but theyāre a long way off, if we ever get to them.
Krnt_13
(Krnt 13)
#5
For the moment Iām going to work with the original effects, with them it works well enough, maybe Iām going to find a way around it in the future.
Is sad that all these modifications worked nicely on HW2, maybe Iām going back and finish the mod there.
Thanks Dave!
EDIT: @BitVenom I tested the entire mod and the same scene, from the same save game in my netbook, and it didnāt crash.
Since my netbook is and AMD E-350, it should be really underpowered to play the game but it runs fine, the main difference is that it is running at minimum settings and 1366x768.
Iām suspecting that some of the graphics settings like the āDepth-Biasā that you mentioned is responsible of the crash, iām going to make some more tests so I can point out the culprit.
EDIT2: Seems that I found the issue, I think it has to do with the battlescars, when I disable them, everything works, and there is no crash at all, since I made a few modifications to the battlescars Iām going to revert them to see if them and enable the battlescar graphic option to see if the problem shows up again.
EDIT3: Confirmed, seems that the battlescars that I modified had something on them making the game to crash, but I have yet to find wich was my error, but for some odd reasons when using the modified battlescars with the default hit effects the game didnāt crash, so there are still some mysteries out there.