Glass texture erasing other objects

Das Forum befindet sich im reduzierten Betrieb. Die Addon- und Supportforen bleiben weiterhin verfügbar.
Bitte beachte, dass OMSI nicht mehr weiterentwickelt wird. Ein Teil der Entwickler widmet sich inzwischen der Entwicklung eines neuen Simulators. Weitere Informationen zum LOTUS-Simulator findest Du hier.
Ein communitybetriebenes Nachfolge-Forum wird hier verlinkt, sobald es gegründet und bereit ist.
  • Hey! I've been trying to add glass to my Volvo bus. Although, it's given me a few problems which I have no idea how to fix.


    Here are a couple of screenshots to let you understand:




    The glass is covering existing objects. The best example is probably the mirror being erased by the glass. I just don't understand why it is doing that. If any of you have ever experienced this and fixed it.. please let me know!

  • That's a typical z-buffer problem: All the transparent parts must be the last meshes to be rendered in order to display the other parts behind them.


    The reason: If the graphics engine renders an object, the distance to the camera is written into the so-called z-buffer. Now if later another object needs to be rendered, the engine first checks if the distance of the new object is closer to the camera than the current z-buffer value. If not (i. e. the new object is located BEHIND an earlier rendered object), this object won't be rendered at all, because you couldn't see it anyway. That's where it becomes tricky: DirectX does not take into account that objects can be transparent and objects later rendered behind them can thus be visible, too.


    So the only solution to this general problem is to make the glass parts the last objects in the rendering process. If so, everything behind the glass is already rendered when the glass is being drawn over the rest.