Is it possible to create a simple 3D model (for example in 3DS MAX) and then import it to Android?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Is GLFW designed to use without LWJGL (in java)?
- Listening to outgoing sms not working android
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
That's where I got to:
int vertices[] = context.getResources().getIntArray(R.array.vertices);
gl.glDrawElements(GL10.GL_TRIANGLES, 212*6, GL10.GL_UNSIGNED_SHORT, mIndexBuffer);
- you can find that number (212 in this case) on top of the OFF fileHere you can find my project page, which uses this solution: Github project > vsiogap3d
Have you tried min3d for android? It supports 3ds max,obj and md2 models.
you may export it to ASE format. from ASE, you can convert it to your code manually or programatically. You will need vertex for vertices array and faces for indices in Android. don't forget you have to set
because 3ds max default is counter clockwise.
It should be possible. You can have the file as a data file with your program (and as such it will be pushed onto the emulator and packaged for installation onto an actual device). Then you can write a model loader and viewer in java using the Android and GLES libraries to display the model.
Specific resources on this are probably limited though. 3ds is a proprietry format so 3rd party loaders are in shortish supply and mostly reverse engineered. Other formats (such as blender or milkshape) are more open and you should be able to find details on writing a loader for them in java fairly easily.
You can do this also with 3D Object Converter
http://web.t-online.hu/karpo/
This tool can convert 3ds object to text\xml format or c code.
Example of open gl 'c' output:
or 'c' output
Then you can just replace parts of this code by java code.
P.s. This tool is not free and you can use it only for 30-day trial period. But 'c' code and xml converters is avaliable for this period.
Not sure about Android specifically, but generally speaking you need a script in 3DS Max that manually writes out the formatting you need from the model.
As to whether one exists for Android or not, I do not know.