1

Currently I am working on the Augmented Reality and it works perfectly for me but I wanted to know how to animate the object in ARToolkit my issue is animation is not working for me

What i did i have created a fbx file from blender then i have converted into the .osgt format then i have converted to .osg format

Can any one help me out how we can animation the object in ARToolkit for iOS ?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Mayank Patel
  • 3,868
  • 10
  • 36
  • 59
  • Hi, are you sure about the file format ORG? Never heard of that. ARToolKit5 used OSG (OpenSceneGraph) to work with 3D models and manipulate them. – Thor_Bux Jun 25 '17 at 22:11
  • @Thor_Bux Yes i am sorry yes it's OSG Filer it's my mistake how to generate OSg file ? – Mayank Patel Jun 26 '17 at 03:49
  • Hi, it is not about generating OSG files. OSG is a framework that is capable of loading different 3D model types. .obj file for example are loadable and can be rendered using OSG. OSG also supports animated 3D-Models. However, I fear I still don't get your question. – Thor_Bux Jun 26 '17 at 03:53
  • @Thor_Bux what i need to do is i need to animate the object to 360 degree automatically – Mayank Patel Jun 26 '17 at 03:55
  • how we can animate the object in ARToolkit file i used OBJ file that is working correctly but how we can animate the object? like in the example of like Plan in ARToolkit – Mayank Patel Jun 26 '17 at 03:58
  • Well, ARToolKit isn't a 3D modeling or animating tool. It gives you the location of a Trackable which is visible in your video stream. You can then use this location and render a 3D model to that location. If you would like to animate a 3D object use Blender or 3DS Max or something else and export the animated model. Then you can load it into ARToolKit. Or use Unity3D with ARToolKit plugin – Thor_Bux Jun 26 '17 at 03:58
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/147585/discussion-between-mayank-patel-and-thor-bux). – Mayank Patel Jun 26 '17 at 03:59
  • @Thor_Bux i have created a OSG File from the FBX from blender but in the app animation is not working can you help me ? – Mayank Patel Jun 29 '17 at 11:57
  • @Thor_Bux how we can do animation ? – Mayank Patel Jun 30 '17 at 03:53

1 Answers1

0

You need to generate an .OSG file from whatever 3D Modelling/Animation tool you are using. You can use that .OSG file together with ARToolKit5.

For export from Blender have a look here: https://github.com/cedricpinson/osgexport

Then you need to read through this C-Interface that ARToolKit5 uses to interact with OpenSceneGraph(OSG) http://artoolkit.github.io/artoolkit5/doc/apiref/arosg_h/index.html

There are several arOSGSetModelAnimation* functions that you can use to manipulate the animation.

Have a look at the Android example: https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/ARNativeOSGProj The C-Classes show you how you can load and use .OSG files with ARToolKit.

However, you need to use C on iOS and you cannot use Swift.

==Edit==

This question here gives some background regarding .FBX usage. Import FBX to ARToolKit

In short .FBX is not supported and one should use the OSG commandline tool to convert .FBX to .OSG

--- Personal note ---

From my experience is easier to use the Unity3D plugin of ARToolKit5 or ARToolKit6 do you animations with Unity3D and export an iOS app.

Thor_Bux
  • 1,137
  • 12
  • 26
  • Check this is my 3D animation file (osg file) https://ufile.io/lfp20 can you check it is not working at my side – Mayank Patel Jun 30 '17 at 04:11
  • but .obj file does not support the animation it is simple showing 3D object i want to show object with animation – Mayank Patel Jun 30 '17 at 04:14
  • can you send me a sample who has an obj file with animation ? so i can try to configure my side – Mayank Patel Jun 30 '17 at 04:16
  • Sorry my bad, there is some such as an .OSG format and Blender can export it. Also, you are right .OBJ does not support animation. Corrected answer. – Thor_Bux Jun 30 '17 at 04:20
  • I tried my self i have converted FBX file into OSG format but animation is not working thats why i am asking you how we can achieve the animation ? – Mayank Patel Jun 30 '17 at 04:23
  • Please see my comments i already have a tool and i installed openscence graph i know i am converting fbx to org conversation thats why i am telling you animation is not working that is my point ufile.io/lfp20 see this is OSG file that i converted from command line – Mayank Patel Jun 30 '17 at 04:28
  • what is the issue if i am not able to show the animation on project Here is osg file check this ufile.io/lfp20 – Mayank Patel Jun 30 '17 at 04:31
  • The only think I can say to that is that in the Android Project the .OSG has animation as well and there is works. (OSG: https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/ARNativeOSGProj/aRNativeOSG/src/main/assets/OSG) Android Project: https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/ARNativeOSGProj – Thor_Bux Jun 30 '17 at 04:37
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/148010/discussion-between-mayank-patel-and-thor-bux). – Mayank Patel Jun 30 '17 at 04:39