MyRobot Development Part 16
Added 2024-04-07 05:49:33 +0000 UTCVideo shows summary, text shows the technical!
NEXT BUILD WILL BE RELEASED NEAR THE END OF THIS MONTH.
This week:
Physically accurate environment stains
Taking care of your robot!
Save/Load System
Physically Accurate Environment Stains
The stain system needed to be very fast because MANY physics contacts are resolved every second and the look up from world position to mesh UV position can be very slow since there are tens of thousands of uvs/vertices. So I took an LOD approach and first baked a lower resolution net of points that approximates the surface of the mesh in question (the hand in this case like in the image above). So now when I want to find the exact UV to paint, I just look up with this lower resolution version to save CPU time.
For skinned meshes I do the same thing except I bake to the highest weighted bone.
Taking care of your robot!
If your robot's face lands on a puddle of oil, then its face will be painted black. And so cleaning became a necessity! Cleaning is at the moment completely for aesthetic purposes. I expect to balance the staining so that cleaning does not become a common occurrence and annoyance.
Save/Load System
The Save/Load System is a custom serialization system that makes it easy for me to mark certain class fields with the [Save] attribute. This makes it super easy to add a variable to the save file in case a property needs to be added. Files are saved to text files and loaded as JSON files.
I expect to use this system for bugfixing. If you ever have an issue with the game, you'll be able to just pass me your save file.
Stay tuned!
Comments
Awesome Sauce! Cannot wait to dress up my robo!
Calin M
2024-04-09 03:07:09 +0000 UTC