-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLTFLoader: Support map in LineBasicMaterial #17511
Comments
Do you mind sharing screenshots? |
Here you go. Note, not my codepen. All I did was to paste in my file in the loader and change the version numbers. The original codepen is https://codepen.io/siouxcitizen/pen/QroPwJ I have seen exported colors from Paraview in the latest GLTFLoaders, but only when I export with the Paraview UI. My example file is from a programmatic python Pararaview export....which seems to create a different result than the UI export. Works sometimes though, e.g in earlier versions (< 90) of the GLTFLoader and in the babylonjs online viewer. And in Windows built in 3D viewers. |
A colleague saw the images and said "that looks like a color space issue". It seems that the default color space in Paraview is "diverging". My best guess right now is that the Paraview UI export code converts to rgb before exporting and that we must do that as well in python. Don't know though why v90 and above is more unforgiving regarding color space (if this is correct). Will update when our Paraview script guy has implemented explicit conversion to rgb. |
@lappy4711 have you seen the Textures section under the THREE.GLTFLoader documentation? If you aren't using those renderer settings, you will see color space issues, but I don't think that's the cause here. @mrdoob @takahirox the change was caused by b965ef1. With that commit we began using LineBasicMaterial for lines, which doesn't support a base color |
GLTF support a texture for lines? Does it also have uvs? |
@donmccurdy I have tested I don't think |
@lappy4711 this model does contain a texture, attached below. Those settings are good to use, generally, but they aren't the problem in this case. @mrdoob because glTF uses PBR materials, the section on materials for lines and points is pretty sparse. But yes, this model contains both a texture and UVs on a Lines primitive. |
Adding some more info....the colors are visible with three.min.js versions 90 and above...but if change GLTFLoader.js to 90 and above it is all white. |
How's that possible? We never supported textures in |
In r90 GLTFLoader switched from using MeshStandardMaterial to LineBasicMaterial for lines. |
Oh... Can Lines have normals too in GLTF? |
Hopefully no one will be shocked if their normals don't work there, but yes. glTF does not prohibit lines and points from having normals, tangents, skinning weights/indices, morph targets, or custom vertex attributes. |
I guess we may need a |
Just getting LineBasicMaterial closer to feature parity with MeshBasicMaterial would be enough, I think. A PBR shading model for lines is more than anyone has asked for. Pretty much just supporting Although if MeshStandardMaterial already 'just works' with lines, and LineStandardMaterial can reuse that implementation without duplicating much code, that's great. I'd be curious how things work in NodeMaterial now; I still want to add a |
Just for reference: #14572 |
So what is the advice? Wait for a fix or use the r89 loader? |
@lappy4711 I don't know what the fix is yet, or when it will be ready. If you need to apply textures to lines, in the meantime, you'll need to either use r89 or load the texture separately from the rest of the model. |
@donmccurdy we just realised that we should add a "Tube" filter to the streamlines in Paraview. We now have colors, so I can keep using the latest loader. |
Was there a significant change in the GLTFLoader in version 90? We're having problems with gltf/glb files that we export from Paraview, the colors are not visible in our viewer. If changing the version to version 89, the colors are visible. Here is an example file:
005.zip
The text was updated successfully, but these errors were encountered: