Comments (9)
I found at least one problem here - CesiumGS/gltf-pipeline#197. Once that's merged I'll update obj2gltf.
from obj2gltf.
@webprofusion-chrisc obj2gltf is now published with the fix
from obj2gltf.
I upgraded to a newer version of the gltf-pipeline and this issue seems to be fixed. Once #38 is in can you verify?
from obj2gltf.
Thanks! I'll check this out and get back to you.
from obj2gltf.
@webprofusion-chrisc I merged #38. Let us know if this is still an issue.
from obj2gltf.
Tried this out but unfortunately with the models I've tried I now get a shader error (loading using the threejs gltf loader). I can share the .obj privately if that helps. This fails in both firefox and chrome but only chrome reports the error. Obviously this could be a an issue with the threejs glTF loader but I wondered if you'd seen a similar error with anything else?:
Failed to load resource: net::ERR_INVALID_URL
data:text/plain;base64,precision highp float;uniform vec4 u_ambient;uniform vec4 u_diffuse;uniform vec4 u_emission;uniform vec4 u_specular;uniform float u_shininess;uniform float u_transparency;varying vec3 v_positionEC;varying vec3 v_normal;void main(void) { vec3 normal = normalize(v_normal); vec4 diffuse = u_diffuse; vec3 diffuseLight = vec3(0.0, 0.0, 0.0); vec3 specular = u_specular.rgb; vec3 specularLight = vec3(0.0, 0.0, 0.0); vec3 emission = u_emission.rgb; vec3 ambient = u_ambient.rgb; vec3 viewDir = -normalize(v_positionEC); vec3 ambientLight = vec3(0.0, 0.0, 0.0); ambientLight += vec3(0.2, 0.2, 0.2); vec3 l = vec3(0.0, 0.0, 1.0); diffuseLight += vec3(1.0, 1.0, 1.0) * max(dot(normal,l), 0.); vec3 h = normalize(l + viewDir); float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)); specularLight += vec3(1.0, 1.0, 1.0) * specularIntensity; vec3 color = vec3(0.0, 0.0, 0.0); color += diffuse.rgb * diffuseLight; color += specular * specularLight; color += emission; color += ambient * ambientLight; gl_FragColor = vec4(color * diffuse.a, diffuse.a * u_transparency);}
from obj2gltf.
It looks like the shader isn't being base64-encoded properly. I thought this was fixed but maybe not - you can send the model to [email protected].
from obj2gltf.
Thanks! Have tried this out and it's working well. I noticed I had trouble getting UVs to work for files exported from Rhino as .obj with long lines wrapped - wondered if that was a known issue? Unchecking the option to wrap long lines in the rhino export seemed to fix it.
from obj2gltf.
I'm not too surprised that it would fail for wrapped lines since the obj parser reads line by line. Do you have a sample obj that I can look at though?
from obj2gltf.
Related Issues (20)
- UV index 278144 is out of bounds HOT 2
- Blob is not defined at configureWebWorker HOT 5
- Loss of precision due to 32 bit floating point numbers
- Unlock cesium npm package from 1.84.0 HOT 2
- textures not loaded via mtl file HOT 2
- How can i use in Core PHP or LARAVEL?
- How to use obj2gltf at vite2?
- SyntaxError: Unexpected token '.' HOT 1
- losing colors when converting Obj->Glb/glTF HOT 1
- Install Error HOT 1
- include .mtl and textures in node js? HOT 1
- Add network path support
- JavaScript heap out of memory HOT 3
- Normal index 303 is out of bounds -causing socket hung and memory issue HOT 1
- Override texture flags not having any effect
- [suggestion] In obj2gltf, create a flag --doubleSidedMaterial to allow materials to be doubleSided regardless of transparency
- SyntaxError: Unexpected token '.' HOT 1
- glib? HOT 1
- Unpin mime and update to v4 or latest
- Emissive and base colors are incorrectly converted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obj2gltf.