By sureshb
on Mon, 04/01/2013 - 10:45
Hi All,
In VirtualButtons i have to change teapot to car object.
I had a car animation file. I converted that .FBX file format to .OBJ through FBX converter and then I convert that .OBJ to .h file through obj2openGL.perlscript.
But that .h file was taking 405 mb memory how can I change teapot object to car object.
Was there any way to do for large files.
Can Any one Help me.
Thanks in Advance.
Java Heap Space Error in virtualButtons
Hi,
such a large file cannot be handled on a mobile device.
You might split it into several smaller models, but performance-wise they might be difficult to render anyway at a decent frame rate.
Java Heap Space Error in virtualButtons
Hi AlessandroB,
Was there any other way to convert .obj file to .h file.
other than obj2openGLE.pl converter.
How can we add animations to banana or teapot images in virtual buttons.
like moving left/right/rotate.
Thanks in advance.
Java Heap Space Error in virtualButtons
Hi,
there might be other tools to get a header file from an OBJ file;
for instance, we have heard of a plugin for Blender (if you are using Blender as 3D modeling tool) that can export the Blender scene to a .h file:
Java Heap Space Error in virtualButtons
Hi AlessandroB,
can you give brief on moving 3d object in virtual button.
I am new to android and also vuforia.
Please help me.
Thanks in Advance.
Java Heap Space Error in virtualButtons
Hi,
all the samples (VirtualButton, Image targets, etc.) contain some C++ code that manipulates matrices (typically in a function called "renderFrame", see for instance ImageTargets.cpp or VirtualButtons.cpp files), like the following:
Java Heap Space Error in virtualButtons
Hi,
I go through your links but nothing happening. when i putting that code what he gave in https://developer.vuforia.com/resources/dev-guide/textured-plane-target this link. when i building ndk it asking to declare "trackable" how to declare that one.
Java Heap Space Error in virtualButtons
Hi AlessandroB,
Can we move 3d object one place to another place by coding.
Thanks in Advance.
Java Heap Space Error in virtualButtons
For inspiration, you can look at this tutorial which explains (with code) how to move an object from left to right, parallel to the screen plane.
Java Heap Space Error in virtualButtons
Hi,
That one i tried when i putting that code its showing SamplMath, fabs are not declared when i building ndk.
I found SampleMath.cpp and SampleMath.h file from videoplaback app but i don't found fabs one .
Is this correct way are wrong one.
Thanks in advance.
Java Heap Space Error in virtualButtons
Hi,
the fabs() function is just s standard C function, perhaps you need to include this:
#include <math.h>
Java Heap Space Error in virtualButtons
Hi AlessandroB,
when i putting #include <math.h> in to cpp file that fabs error solved but when i build through ndk it showing following error:
Java Heap Space Error in virtualButtons
Hi,
have you added SampleMath.cpp to your Android.mk file ?
you should see a line similar to this one:
LOCAL_SRC_FILES := ImageTargets.cpp SampleUtils.cpp Texture.cpp SampleMath.cpp
make sure that SampleMath.cpp is in the list.
Java Heap Space Error in virtualButtons
Hi AlessandroB,
Thanks,
Now It's working it moving from left to right but when we build and run then it will working.
if we run same apk it's not appearing 3d object on the screen.
what have to change for that.
Please help me.
Thanks in Advance.
Java Heap Space Error in virtualButtons
Hi, if I understand correctly what you say, the second time you launch the app, the model is no longer there...
so, you need to reset the global translation values to zero;
one way you can do that is by defining a native function like the following (in ImageTargets.cpp):
Java Heap Space Error in virtualButtons
Hi AlessandroB,
ok its Working.
Java Heap Space Error in virtualButtons
Hi, yes, the tutorial shows how to move an object in a plane parallel to the screen;
of course you can stop the movement at the distance you like;
Java Heap Space Error in virtualButtons
Hi,
For Stop motion where have to change in below code.
QCAR::Matrix44F modelViewProjection;
SampleUtils::translatePoseMatrix(0.f, 0.f, kBananaScale,&modelViewMatrix.data[0]);
Java Heap Space Error in virtualButtons
Hi AlessandroB,
How can i stop moving 3d object after some distance?
Thanks in Andvance.
Java Heap Space Error in virtualButtons
Hi,
one way you could do it is by computing the length of targetCumulatedDisplacement.data[0], for instance:
Java Heap Space Error in virtualButtons
Hi AlessandroB,
can i change code like below
QCAR::Vec3F targetCumulatedDisplacement(0.0f, 0.0f, 0.0f);
---
Java Heap Space Error in virtualButtons
The code should look more like this: