smart-fun / smartGL

SmartGL is a Graphic Engine for creating Android Games and Apps. It is based on OpenGL and handles 2D Sprites and 3D Textured Objects.
Apache License 2.0
109 stars 24 forks source link

java.lang.RuntimeException: Model must have texture UVs or vertex Colors #12

Closed schwarzen13 closed 6 years ago

schwarzen13 commented 6 years ago

I'm currently using smartGL to show a 3D model of something. The file format I'm currently using is .obj (Wavefront) but some of my files cant be read by the application, and sometimes java.lang.RuntimeException came out. What should I do? I also uploaded one file. There's no error with this file but this file can't be shown in the screen. Thanks awp_obj.txt

smart-fun commented 6 years ago

Hello and thank you for using smartGL.

SmartGL is able to display objects if they have textures (picture mapped to the models) or colored faces. You could probably load the model with MeshLab, apply colors or a texture to the model, and then save it in wavefront obj format. Then you should be able to display it using smartGL.

See also issue https://github.com/smart-fun/smartGL/issues/4

Arnaud.

schwarzen13 commented 6 years ago

What about .tga files? How can I apply .tga files to my 3d models?

smart-fun commented 6 years ago

Hello. You can't. You have to convert them to PNG or JPG which are the standard picture formats on Android.

schwarzen13 commented 6 years ago

Ok thanks for the help, I think I can convert those tga files using photoshop. Much appreciated