Open blitzcoder opened 1 year ago
Indeed, planes are implemented in a very basic way, just a very large quad. Some versions of OpenGL handle it with no issues (including textures), others have troubles rendering the textures (on the same video card, on Linux, I saw different behavior while using proprietary Nvidia drivers or generic open source drivers)
Your solution looks interesting, but instead of using PositionTexture, you could use VertexTexCoords: in that way, you wouldn't have the issue of texture moving when applied to other entities.
I see. So are you planning to fix this to be more consistent across all versions and platforms?
or you can just this other solution by SLotman.
In addition, texture rendering on this plane entity seems buggy on different angles:
That issue depends on the fact that the range of vertex coordinates is too wide, likely. It depends on the driver used: on the same pc, for example, texture works smoothly by using NVIDIA drivers, and it's not rendered correctly by the Intel driver, instead.
Limiting a feature or solution to work on specific cards or drivers seems to be a bit odd and outdated. I'm using Radeon btw.
It's not "limiting". It's just a different behavior of different drivers. In OpenB3D, a plane is just a very large mesh (while in Blitz3D it's a different kind of entity). Some drivers have issues rendering a mesh so large.
In origin there was no support for CreatePlane at all, so I added it as a mesh, as temporary solution. Later, when I added the isosurfaces (that can be used, among other things, to create planes as well) I never worried about replacing the planes with something more precise. I consider it an obsolete feature, left for compatibility.
So, if you need a more precise solution, the one provided by SLotman could be a good solution (just a suggestion: instead of using PositionTexture, change VertexTexCoords, so if other entities are using the same texture it won't move on them, too)
There seems to be a jitter on movement and turning when use plane entity. I first noticed this on earlier demos that I've tested, but ignored it as it maybe just the demo's particular pivot and setup.
With this version that I posted and updated from SLotman, which Mark later integrated to OpenB3DMax with more fixes, it's working fine w/o the jitter.