Skip to content
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

java.lang.RuntimeException: Only triangles supported #4

Open
haris15 opened this issue May 18, 2017 · 6 comments
Open

java.lang.RuntimeException: Only triangles supported #4

haris15 opened this issue May 18, 2017 · 6 comments

Comments

@haris15
Copy link

haris15 commented May 18, 2017

i have an error while add my obj file instead of bus.obj

@haris15
Copy link
Author

haris15 commented May 18, 2017

please help me

@smart-fun
Copy link
Owner

Hello Haris and thanks for using smartGL.

SmartGL handles only objects made of triangles, so you have to convert your object first.
You can try a tool like http://www.meshlab.net/ to re-export your object in Wavefront OBJ format.

When it is converted you should be able to use it with smartGL.

Arnaud.

@ghost
Copy link

ghost commented May 18, 2017

try this:

cat my.obj | sed -E -e "s/f ([0-9\/]+) ([0-9\/]+) ([0-9\/]+) ([0-9\/]+)/f \1 \2 \3`echo -e "\r"`f \1 \3 \4/g" > my_tri.obj

@haris15
Copy link
Author

haris15 commented May 19, 2017 via email

@haris15
Copy link
Author

haris15 commented May 19, 2017 via email

@FonzTech
Copy link

FonzTech commented Aug 7, 2017

You can solve by importing your model in Blender, then exporting it ticking the "Triangulate Faces" option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants