obj2gltf | Convert OBJ assets to glTF | iOS library
kandi X-RAY | obj2gltf Summary
kandi X-RAY | obj2gltf Summary
Convert OBJ assets to glTF 2.0.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Loads an object into a vertex .
- Loads a translation file .
- Creates a Uniform texture from the metallic parameters .
- Creates a new glossiness texture .
- Create a glTF from obj data .
- Convert obj to obj .
- Creates a new ambient image texture .
- parse a Line object
- Creates a magical material object
- Add a face to the world
obj2gltf Key Features
obj2gltf Examples and Code Snippets
Community Discussions
Trending Discussions on obj2gltf
QUESTION
I made a 3d model with a .png texture that has an alpha channel. The texture does not render correctly in A-Frame. I created the model in Autodesk Maya and exported the model as .OBJ. Then, I used obj2gltf to convert from .obj to .gltf format. The transparency does not appear correctly in A-Frame. There are some rendering problems with the model as shown in the images.
The model renders incorrectly in all the browsers I tested it in: Chrome, Firefox and Safari (iOS). When exporting from obj2gltf, the model does not show any transparency when used without --checkTransparency
. It does not work if it is called from or inline. I also imported the model into Blender and then exported as .gtlf using the blender gltf exporter, and A-Frame failed to recognize the transparency at all. The model does not appear correctly if loaded as an .OBJ with
tags either.
https://i.imgur.com/HbFoBBb.png This is how it shows up in A-Frame
https://i.imgur.com/1zk3uVl.png This is what the model looks like in Maya, and how it should appear.
...ANSWER
Answered 2019-Jan-10 at 01:11Transparency seems to be working here, your problem seems to be the classic opengl sorting order + transparency + depth Buffer. Some leaves on the front render first than others, so back leaves don't render because there's something in front of them already. The optimal way of rendering all leaves would be pre sorting by distance to camera all leaves before rendering, but this is usually unfeasible when loading external models.
I'd recommend you to try activating side:double
and depthTest: false
in A-Frame's material. Also, use an obj
model instead of a gltf
, so you can use the material
component with it (you cannot use material component with gltf models).
depthTest will do the trick, although it may render over other stuff in your scene. Try to find the best alternative..
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install obj2gltf
To run ESLint on the entire codebase, run:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page