blender exporting 3d model that works with min3d - android

I am new to 3d model on android. after reading many topics i decided to use blender as graphical application and min3d as android 3d library.
So i have a few questions :
what is the options that i have selected when exporting the object to be compatible working on mini3d.
how i can motion the object from code (not pre defined motion in graphical application) (3d human model i want to write using min3d like this to move hands up : or something like this).
I will appreciate if there is any other suggestions

I just share some experience and sorry for the bad english.
For the first question, I recommend you to export as .3ds or .obj file when using min3d as your library. Also, just an experience on using this lib, try not to import an object that contains more than 20000 triangle in min3d. In other words, you may import many objects with each obects having less than 20000 triangle. As the object will have a higher chance to be crashed or even some memory overflow situation.
For the second question, the min3d is based on openglES. This is a very simple 3d object display library. If you want to make some animation like moving arm, you need to move every point of arm to a new postion inorder to make it like moving. That means you need to know and calculate every potints of the arm.
In this case, I will suggest you to try other 3d implementation like unity3d which is easier to implement complicated animation of 3d objects. However, if the animation/movement you want is not really complicated, may be you can try export the 3dhuman body in several parts and "combine" them on the scene by min3d. After that, you may move a several part easier.

Related

3D Model with use of textures [Android]

I am trying to find approaches on stamping multiple textures on an object (3D .obj) Android. But, I am unable to do so, I have tried min3d but not sure if it is the right way to do it?
Is there anything available around which is similar to this? Or How Should I approach this UI? Below is the UI of model and how I want to stamp an "image"/texture on it, in addition I want to change the color of the model / add text on it.
In addition, I am planning to give touches on it, by stamping username/label/textview at the back of the model by using rotation through touches.
Please guide, which SDK should I use on Android, what is the best approach to do it.
What you want is basically just rendering textures on a given 3D mesh, as far as I can see. You could take multiple approaches for this: The simplest being just texturing the actual object, but a more complicated approach could involve rendering the object and "stamp"&text textures separately, giving the illusion of being overlayed (Not preferable though, as this will be difficult to manage correctly).
For texturing, you can either attempt rendering different textures after each other (First the background, then the stamp, then the text), or combining the different elements into one texture (pre-processing) before rendering.
I recommend having a look at the following posts and articles:
OpenGL ES (which can do everything you want to do, but has a decently steep learning curve)
Switch to a different 3D rendering engine if you find it too difficult to use your current one (Many options, although most are fullblown game engines)
Loading 3D objects and textures for OpenGL ES rendering
Check out the following git snippets and articles on texturing in min3d: this, this article, this article on object loading
You did not provide any code displaying your current attempts, so it is difficult to say what exactly your problem is, and how to solve it. If you edit your question you might receive more concrete solutions besides just links to potentially helpful resources.
Perhaps working with the OpenGL ES 2.0 api might be an option. Take a look this repo here called the Android 3D Model Viewer which makes use of it, it might help you out.

3d structure in android application

So, for a personal project, I'm trying to make an app that helps newcomers get used to the school quickly. And for one section of it, I'm trying to build a 3D Structure, in a shape of my school campus, with lables incidating where the rooms are, so when the using searches for specific rooms, they can easily find it. So, It would be like from one activity, when I click a button, it opens a new activity with a search bar on the top, and the rest of the screen a 3d image people can navigate through. What's a way I can accomplish this?
I know that the structure part can be accomplished with Unity, which I haven't learned but have an idea of what it is, but I don't know how to build the rest of the app with Unity.. So..
You probably want to start with designing the model (structure) in some-kind of modeling program, Maya, 3DS Max, Cinema 4D, Blender, etc... (Personally I recommend using Blender since it's free and open source). Then you would want to export it to some 3D model format, I recommend using .obj since it is very human-readable and easy to parse on your own, but you can use some other format and parse it using a library.
Now comes the more difficult part and it's to render the loaded model onto the screen. This can be accomplished with OpenGL ES or a more highlevel library which can abstract it for you. If you're not familiar with OpenGL ES or OpenGL in general, I wouldn't recommend using it since it may take some time to learn. There are few libraries out there which can render 3D models pretty easily. Now you should probably create some-kind of a controllable camera as well so you can use it to navigate through the model.
This maybe looks like a lot of work but if you already familiar with computer 3D graphics it can ease it up for you.
Well, you can make a 3d model of your school using Blender (which is a free tool, but will almost certainly be a lot of work). Export the model as a mesh which you can insert into your app as an asset or resource. Read the resource and present it using (probably) opengl. This is a SUPER high level view, in actual fact there's quite a lot of work in each stage. Some third party libraries can make it a little easier, but it will still be a big job. I personally like libgdx for abstracting the pain of opengl, but that's just my personal opinion.
It's a big job, but would be super cool .. good luck!
I recommend starting off with building the structure in a program like Blender, Maja or 3ds Max. You can export your projects from those programs to pretty much any game engine and it makes more sense to build things in one of those programs.
Once you're done with that you can choose which engine you want to use to add the search function, if unity or Unreal or whatever but either way you're going to need to make yourself familiar with java or c to add the search function.
I recommend to use blueprints of building if available, it will save you a loads of nerves. Use it as a material texture and place it on a plane polygon to get a good lining helper.
If you do use Unity for development then try Maya for polygonal modeling. At least they are looking similar to each other whereas 3DSMax is always a mind f*cking experience.

Interactive animations on Android

This may be a duplicate question, but none of the questions I found were exactly what I had in mind.
A friend and I want to create an App that lets the user play around with 3D objects on the screen. My friend is creating the objects and the animations in Blender or Maya. Therefore, the possible animations will be preset (not being programmatically animated). I have no experience in 3D programming and I naively suggested that he render the animations in Blender and send me all the frames. I would then play the appropriate animation by quickly running through all the frames. Each animation would leave the object in its original position so that it would be ready for the next animation.
Now that I've been thinking about it, that's a lot of images that I have to store in order to make this work. For every object, I would need to have all its frames for all of its animations, which maybe overkill.
Is there another way to play animations in an Android app? I considered just saving the animations as videos and playing them, but that would look horrible for our purpose.
I'd suggest min3D
Take a look at the animated troll example they have.
There are a lot of 3D libraries for Android. I would recommend AndEngine. Alternatively, you can just use the native OpenGL compatibility. Instead, ask him to send you the actual 3D files. Then you can use a library to render them.
EDIT: I just found this link. It'll probably help you. In my opinion, you should go through it and learn the whole package instead of just glancing a bit for this one little project; it'll help in the future.
Yes, there is a way you can manupulate the models you created in Blender. here is an example which uses Open GL in android to animate a 3D model created in Blender Check This Video Out. However it animates the object programatically, frame animation is indeed not worth if you wanna create animations that are long as you will run out of memory quick.

Are there simple AR SDK that does not use image recognition?

I'm looking for a 'basic' AR SDK that allows me to draw images and 3D shapes around the user (no matter where he is). It would be even better if the SDK includes a simple way to detect interaction with the shapes (something like onClick).
I made a project from scratch on Android but there's still a lot of work to do and I'll need to do the same on iOS after... So that's why I'm looking for an SDK or a similar project (no matter what platform).
I tested Metaio but it's quite expensive and maybe overkill for my purpose because it uses LLA coordinates.
I tested DroidAR on Android but it's only for Android and it looks heavy too (don't need the GPS).
How about Qualcomm's Vuforia? I was able to quickly get a sample project running on it.
EDIT Looks like I was wrong about what it could do. According to this (which is slightly dated, so who knows) Metaio might be your only choice.
i really don't sure what you really want to do ..but if you simply show images or 3d models on camera without any detection you can achieve this very easily i am explaining for Android and you can extend it to ios on same logic.
first approach:
you have to use custom camera of Android in your app,then use any game engine as per your need..i will suggest Jpct-ae or Rajawali
they are very simple to integrate and can be used for 2d images and 3d models.
this tutorial will explains a lot
keep the gl-surafce transparent and you can have model floating in space ...
second approach :
to add some more effect to your AR app you can use sensor values to move model in 3d space as per movement of device..it gives a cool effect.
use first approach and additionally collect sensor values and apply that matrix to gl camera of your game engine..for sensor values follow here
good tutorial here..
i hope this may help you..i done these a long time ago but try to help if you want..

Recommended way to load (non-interactive) animations (made using Maya) into OpenGL ES on iOS and Android

So far we have been able to successfully load static OBJ files (converted to .h) into our OpenGL application.
We can then apply transforms to these objects in order to animate them.
The next step on our project is to have a professional 3D animator do the animations in Maya, and create a "Loader" to display them in 3D using OpenGL.
We have found lots of examples online that deal with video games and loading static models, but our animations will be absolutely pre-defined by the animator, we just need to load them.
It is important to mention we cannot render it int oa video because we are building this on top of an AR library which will let users literally walk around the animation, that part is solved, we just need to get the animations to render using OpenGL.
I have looked into this question regarding the appropriate format the animator should use to export from Maya.
.dae (COLLADA) file format seems to be a good way to encapsulate model and animation information, and the loading it using Assimp but we have not found this loader compiled for iOS or Android (which are the platforms we are developing for).
Another approach we have seen recommended online is to export a series of OBJ files and load the corresponding OBJ for each frame.
Another approach we see around is to use an "Engine", but there are so many it is hard to know which one we should focus on.
We do not mind paying for an Engine but how do we know which one will work best?
We found these examples, but we do not see a clear "Winner".
Has anyone gotten something like this working on iOS or Android devices?
What would be your recommendations?
Well, OpenGL(-ES) itself is just a drawing API, it doesn't do anything related to animation. Animation playback is managed by a own animation system. The output of such a system are transformation parameters, that you can later use to place and deform geometry when drawing with OpenGL. The usual approach to this these days is a skeletal animation system, i.e. you add some skeleton to the model, where each vertex is bound to a set of bones, with per vertex-per bone weighting. Bones can be represented as a combination of a translation and a quaternion. The translation usually is a constant, so what the usual animation system gives you is the vector of quaternions describing the skeleton pose. This you load into a uniform (a vec4) or a GL_RGBA32F 1D texture with the width being the number of bones, which is used in the vertex shader to apply per-vertex transformation based on the pose. The vertex-bone weights usually are submitted as additional vertex attributes.
I've done a 3D framework for Android and this is how I thought animation:
Skeletal animation ca be done simply with you code: load an OBJ for every limb and let the CPU do the skeletal computations, then transform each OBJ to the coordinates and angles given by the CPU.
Keyframe animation can be done by using OBJs that have the same number of vertices. You can then use linear function that takes a variable t(time) and gives you the combined mesh. You can also use Bezier curves for smoother animations.
Another aspect I'd like to point is that you can import MD5 files. MD5 files can contain animation data and they're binary, so loading them is fast and does not require a parser.
More on MD5s here.
P.S. If you want, I can recommend you a great book that covers a lot of 3D issues when developing on mobile; just leave a comment. And.. if you don't mind spending money, just buy Unity. It's very good and it's very versatile.

Categories

Resources