Open ghost opened 7 years ago
Thanks for the wonderfully elaborate bug report :heart:
I took a quick look and there's an apparent problem right here: https://github.com/only-a-ptr/ror-legacy-svn-trunk/blob/71d1ea1f31ad3eba3cdd68f454b7b2a41ec36b6a/source/main/physics/BeamForcesEuler.cpp#L753-L782 - there's no code to handle FX_PARTICLE
. Unfortunately, this link references the oldest sources we have (circa 2011 ~ v0.38.x), which clearly indicates the FX_PARTICLE code got lost in the sands of time.
We're going to have to re-implement it from scratch because a ground definition without custom particles simply isn't complete. This is also a chance to drop the hardcoded FX 'dusty, clumpy, hard' effects and introduce an unified mechanism for defining particle look and feel.
Suggestions? 😄
Actually, we do have the source for 0.36.3: https://github.com/only-a-ptr/ror-legacy-svn-trunk/tree/dcb83de66935cb6b82d153fea2838e166419a7ac https://sourceforge.net/projects/rigsofrods/files/rigsofrods/0.36/0.36.3/ I don't know how helpful it will be though as the code will have to be rewritten anyway. It would be nice to see the hardcoded effects replaced by custom particles - this will give us the chance to create much better looking particles.
This issue came up on Discord recently https://discord.com/channels/136544456244461568/189904947649708032/1235165850517114941 and as @ghost wrote, we actually do have old source code which still supports custom particles - DustPool.h/cpp and DustManager.h/cpp. https://github.com/ohlidalp/ror-legacy-svn-trunk/tree/dcb83de66935cb6b82d153fea2838e166419a7ac/build/main/source It appears to be portable to current version.
I've known about this issue for a while now but I never was able to find the reason for it until recently. Groundmodels that use the
fx_type
"PARTICLE" don't seem to work on any version past 0.36.3. In that version, you could have set up a custom particle for a ground type, which resulted in nice looking particles if set up correctly:However, this feature seems to have been broken since 0.36.3, as it doesn't seem to do anything now. There are 5 types of
fx_type
's that groundmodels can use: https://github.com/RigsOfRods/rigs-of-rods/blob/568cffcbba65a7e2b5eff73dce4a91db0bda01d2/source/main/physics/collision/Collisions.h#L57 which all butFX_PARTICLE
uses a predefined particle file that you can only change the color of by changing thefx_colour
value. I tested this by modifying themud2
andmud3
sections of the Traction Test terrain,mud2
has the custom particle andmud3
uses theCLUMPY
value:As expected,
mud2
doesn't give off any particles andmud3
works. Links to both 0.36 and 0.4 versions of the map used: 0.36: TractionTestMuddy.zip 0.4: TractionTestMuddy.zip