-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add samples that use POINTS and LINES and other mesh modes #124
Comments
The asset generator project will generate unit models with an asset for each primitive mode. See our roadmap here: https://github.com/bghgary/glTF-Asset-Generator/issues/63. |
There is also an "Outlined Box" example donated to three.js: https://threejs.org/examples/?q=gltf#webgl_loader_gltf |
see also #106 |
These are basically dupes. Should we merge the threads? We are very close to releasing a version of generated assets that has all of these modes. |
I closed #106 now that the issues are cross-referenced. |
v0.4 of the generated assets now has all of these modes: https://github.com/bghgary/glTF-Asset-Generator/blob/v0.4.0/Output/Mesh_Indices/README.md |
We should probably think about how to align the models from this repo with the models from the asset generator. While the requirement for having models with different modes is covered with the asset generator output, I wonder whether this issue could be closed, or whether we should explicitly add one model here that shows the different rendering modes at once. (I think there should be such a model, as one of the |
Note that Blender can export these too, if you dissolve faces and export with the "Loose Edges" and "Loose Points" options. Could be helpful if creating more than primitive shapes. |
I considered #329 to eventually cover this issue to some extent (and that sample might have been created with blender...?). But the focus there is on the rendered appearance with PBR, which is different from what would be the goal of a |
Beyond the scope of a sample model here, but just for fun: The idea is to start with GL_LINES, and do post-processing for the intentionally pixelated effect. |
I've recently wondered if In my efforts to upgrade these old models to glTF, I've arrived at the conclusion that undoing all of the triangle strip/fan work and throwing all the triangles into a single primitive seems better. Is there any reason to favor strips/fans? Certainly this sample repo should have |
We (three.js) have already removed support for GL_TRIANGLE_STRIP and GL_TRIANGLE_FAN. glTF files containing those primitives are converted at load time, but in practice I've never seen this feature used. Related discussion: Totally defer to maintainers on what an appropriate GL_LINES sample would be, but here's a model I built in Blender a while back. Loosely inspired by ruined temples from the game, Gris. Tested in three.js and Babylon.js. |
I found this thread when looking for glTF test models using lines and points.
|
This thread had been open in a tab since my previous comment in January. I finally opened a PR that might close this: #387 |
A glTF mesh can have a number of different modes:
https://github.com/KhronosGroup/glTF/blob/c02fd64e1fc15985d84cbbfacb536709f7c22e28/specification/2.0/schema/mesh.primitive.schema.json#L32-L56
We should have samples that exercise all of these modes. In particular,
POINTS
andLINES
are very different from the other modes, and need their own samples.But all modes should be tested.(Edit: Perhaps not, see below.)See KhronosGroup/glTF#917 for upcoming spec clarification on lighting of points and lines.
The text was updated successfully, but these errors were encountered: