News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Distorted explosion sprites in car1/car2 models containing spheres

Started by Foxpup, Today at 12:42:05 AM

Previous topic - Next topic

Foxpup

While working on a new car, I encountered the explosion sprite bug described but never solved in this thread and decided to investigate. After much testing, I am confident the sphere primitive is the culprit. A car model will exhibit the bug if and only if it has at least one sphere primitive; the number, size, location, and orientation of the sphere(s) seems to make no difference. Even a zero-size sphere at the model's origin will produce the bug. Early theories that the bug is related to the size of the car model are unfounded and were probably influenced by the fact that the most common use of sphere primitives is to represent a driver's helmet in small open-cockpit race cars, and also by the fact that, under normal circumstances, the model's bounding box determines the origin and scale of the explosion sprite.

My theory is that the function that determines a model's bounding box in screen space has a bug when it comes to sphere primitives, which was never caught during testing because none of the original car1/car2 models have spheres, nor do the car0 models ever explode. (Come to think of it, I'm pretty sure Indy's car0 is the only model in the entire game to use the sphere primitive, so it wouldn't surprise me if sphere rendering was added to the game at the last minute without any real testing at all.)

Cas

This is a very good, strong and testable explanation. Reading the original thread again now, I can't even remember myself writing those posts. What's left to see here is, if this is correct, what the reason is that leads the sphere primitive to trigger this. This could be analysed by changing a sphere's diameter and observing the changes in the explosion, I guess.
Earth is my country. Science is my religion.