Git Product home page Git Product logo

Comments (7)

andresoviedo avatar andresoviedo commented on May 23, 2024

I had never seen this error before.
As a workaround I can suggest you to comment the following line Object3DBuilder.java:430 so you can load your obj while I investigate what's your issue.

What android version do you have?

from android-3d-model-viewer.

olegVovkZazmic avatar olegVovkZazmic commented on May 23, 2024

Android version on my device 6.0. I download 3d model in my Google disk, just try open it with your app and your definitely catch this bug.
https://drive.google.com/file/d/1MUcjTwOnxGJUrlPYHE7kegrQPUfINpB3/view?usp=sharing

from android-3d-model-viewer.

andresoviedo avatar andresoviedo commented on May 23, 2024

The problem is not with your model, as it is exploding compiling the shader for rendering DAE files.
Can you confirm that the app is exploding also with the included models?

from android-3d-model-viewer.

olegVovkZazmic avatar olegVovkZazmic commented on May 23, 2024

With existing models which in resources all ok. Problem only with models like that which I uploaded on google disk.

from android-3d-model-viewer.

olegVovkZazmic avatar olegVovkZazmic commented on May 23, 2024

I tried to download a similar model and catch this

01-22 18:54:38.799 29133-29750/com.example.alytar.bobbled E/GLUtil: Could not compile program: | const int MAX_JOINTS = 200;
const int MAX_WEIGHTS = 3;
uniform mat4 u_MVPMatrix;
attribute vec4 a_Position;
attribute vec3 in_jointIndices;
attribute vec3 in_weights;
uniform mat4 jointTransforms[MAX_JOINTS];
uniform mat4 u_MVMatrix;
uniform vec3 u_LightPos;
attribute vec3 a_Normal;
uniform vec4 vColor;
varying vec4 v_Color;
attribute vec2 a_TexCoordinate;varying vec2 v_TexCoordinate;void main()
{
vec4 totalLocalPos = vec4(0.0);
vec4 totalNormal = vec4(0.0);
mat4 jointTransform = jointTransforms[int(in_jointIndices[0])];
vec4 posePosition = jointTransform * a_Position;
totalLocalPos += posePosition * in_weights[0];
jointTransform = jointTransforms[int(in_jointIndices[1])];
posePosition = jointTransform * a_Position;
totalLocalPos += posePosition * in_weights[1];
jointTransform = jointTransforms[int(in_jointIndices[2])];
posePosition = jointTransform * a_Position;
totalLocalPos += posePosition * in_weights[2];
gl_Position = u_MVPMatrix * totalLocalPos;
gl_PointSize = 2.5;
vec3 modelViewVertex = vec3(u_MVMatrix * a_Position);
vec3 lightVector = normalize(u_LightPos - modelViewVertex);
vec3 modelViewNormal = vec3(u_MVMatrix * vec4(a_Normal, 0.0));
float diffuse = max(dot(modelViewNormal, lightVector), 0.1);
float distance = length(u_LightPos - modelViewVertex);
diffuse = diffuse * (1.0 / (1.0 + (0.05 * distance * distance)));
diffuse = diffuse + 0.5; v_Color = vColor * diffuse;
v_Color[3] = vColor[3]; v_TexCoordinate = a_TexCoordinate;}
01-22 18:54:38.802 29133-29750/com.example.alytar.bobbled E/GLUtil: Error compiling program: L0100 GLSL allows exactly two attached shaders (one of each type) per program
01-22 18:54:38.810 29133-29750/com.example.alytar.bobbled E/ModelRenderer: There was a problem rendering the object 'figurine_ABCDEFG.obj':Error creating program.
java.lang.RuntimeException: Error creating program.
at com.example.alytar.bobbled.ui.activity.show3dModel.show3dModelUtil.util.GLUtil.createAndLinkProgram(GLUtil.java:65)
at com.example.alytar.bobbled.ui.activity.show3dModel.show3dModelUtil.Object3DImpl.(Object3DImpl.java:45)
at com.example.alytar.bobbled.ui.activity.show3dModel.show3dModelUtil.Object3DV9.(Object3DImpl.java:963)
at com.example.alytar.bobbled.ui.activity.show3dModel.show3dModelUtil.Object3DBuilder.getDrawer(Object3DBuilder.java:427)
at com.example.alytar.bobbled.ui.activity.show3dModel.show3dModelUtil.model.ModelRenderer.onDrawFrame(ModelRenderer.java:174)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1590)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1286)

Honestly, I don't understand how to fix this, and how make it that the file .mtl was read. I find that Object3DData.class / byte[] textureData = null all time.

from android-3d-model-viewer.

yanayhollander avatar yanayhollander commented on May 23, 2024

I Use my obj and dae and also byte[] textureData is null all time,
When the examples works great.

from android-3d-model-viewer.

andresoviedo avatar andresoviedo commented on May 23, 2024

Fixed in lastest version. Tested on my phone. If it's not ok for you, reopen issue.

from android-3d-model-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.