-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
The spec currently does not define some of the cases present in this test, so it's expected that engines behave differently. The goal of this PR is to agree on the preferred result and to update the spec. PositionsWhen vertex normals are not defined, an implementation should generate flat normals. This is quite straightforward for triangles (although Cesium and Filament haven't implemented that yet) but unfeasible for points and lines. There are three potential options:
Positions & NormalsWhen vertex normals are defined, implementations have all the information to apply lighting as usual. The Sample-Viewer follows this; three.js, Babylon, and Filament ignore everything except the base and emissive components. |
BTW, it may be a matter of taste, but I prefer the model to be in the center of the Scene, as in the TransmissionTest model. |
@cx20 |
I added this model to gltf-test as an experiment. The results at the moment are as follows. Edit 2021.09.02 |
What version of the Sample-Viewer is used there? The one hosted at https://github.khronos.org/glTF-Sample-Viewer-Release/ shows a different result. |
I tried the same version of viewer as above. Environment : Windows 10 + GeForce RTX 2060 + Chrome 92 |
Can confirm that some engines on Windows do not render points or lines at all (or show some geometry mess). |
@cx20 here is what I see in the Babylon sandbox with our latest version |
@sebavan One nit: why are the reflections in the points-based spheres (column 4) noticeably more sharp than in others? |
@sebavan I tested it again with the latest version of Babylon.js. As you say, the latest version seems to be improved.
|
@lexaknyazev you have eagle eyes :-) This comes from the specular antialiasing as the derivatives might not be computed in the same way with the rasterizer (flat point vs soft normals) I would suspect. Thanks a lot @cx20 for the double check :-) |
I like this model, but is it obsolete now? We have this one merged already: https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/MeshPrimitiveModes |
The |
The README could probably be filled with some information from this thread. I'm not sooo deeply involved in some parts here, but...
Looking at the images in an earlier comment (and the emissive values of [0,0.1,0.1]) this is a very subtle difference visually. If this is one dimension that determines whether a rendered result is "right" or "wrong" (according to the to-be-updated spec), then it might make sense to set something as clear as [0,1,0] and [1,0,0] as the base- and emissive colors, to immediately see whether it was taken into account or not. |
This test shows how different primitive modes are rendered depending on the normals and vertex colors presence.