Forums: Forum d’aide (Thread #29727)

adding more 3D Objects ? (2011-07-04 01:09 by bashosha #58374)

Hello,

I managed to run your software for Android, on a beagle xm board
but till now: I couldn't
1 - increase the number of 3D models using the MD2 (the same used).
3 - increase the number of Patterns (but I could change the pattern itself)
-- both are adding to an Arraylist I really can't find an explanation why duplicating the code is not working
also
2 - I couldn't use other formats .OBJ or .3DS as provided by min3d


If you have answer for any of them I really appreciate it
Thanks in advance

RE: adding more 3D Objects ? (2011-07-04 21:45 by bashosha #58397)

OK I could solve issues 1 and 2 :)

still the third one (its written 3 up there!!) :)
Répondre à #58374

RE: adding more 3D Objects ? (2011-07-05 10:47 by atsuoigarashi #58399)

Hi,

How about following?
e.g. add ogro md2 model from min3d.

Regards,
Atsuo

diff --git a/src/jp/androidgroup/nyartoolkit/NyARToolkitAndroidActivity.java b/src/jp/androidgroup/nyartoolkit/NyARToolkitAndroidActivity.java
index 1affdfb..97b0b9a 100644
--- a/src/jp/androidgroup/nyartoolkit/NyARToolkitAndroidActivity.java
+++ b/src/jp/androidgroup/nyartoolkit/NyARToolkitAndroidActivity.java
@@ -367,6 +367,7 @@
patt.add(getResources().openRawResource(R.raw.patthiro));
patt.add(getResources().openRawResource(R.raw.pattkanji));
patt.add(getResources().openRawResource(R.raw.pattjag));
+ patt.add(getResources().openRawResource(R.raw.pattogro));
int[] width = new int[patt.size()];
for (int i = 0; i < patt.size(); i++) {
width[i] = 80;
@@ -775,6 +776,17 @@
object3d.scale().x = object3d.scale().y = object3d.scale().z = 0.25f;
}
scene.addChild(object3dContainer);
+
+ // ogro
+ parser = Parser.createParser(Parser.Type.MD2,
+ getResources(), "jp.androidgroup.nyartoolkit:raw/ogro", false);
+ parser.parse();
+
+ animationObject3d = parser.getParsedAnimationObject();
+ animationObject3d.rotation().z = -90.0f;
+ animationObject3d.scale().x = animationObject3d.scale().y = animationObject3d.scale().z = 0.25f;
+ scene.addChild(animationObject3d);
+ animationObject3d.setFps(30);
}

/**
Répondre à #58397

RE: adding more 3D Objects ? (2011-09-23 20:44 by ngocnv371 #59729)

I got ran into the same issues as yours, would you like to guide me how to make it display 3ds model? I'd put my model in res\raw and textures in res\drawable, then call for parser = Parser.createParser(Parser.Type.MAX_3DS, getResources(), ..); but it didn't draw it as it should do.
Répondre à #58397

RE: adding more 3D Objects ? (2011-07-08 23:24 by bashosha #58476)

Many Thanks sir,

That's very fine I have already managed to add many objects,
my problem now is about the models .. Do u know how can I generate MD2 models from 3Ds Max, or other software

or If I can use something else than MD2 and mqo ??

Thanks a lot :)
Répondre à #58374

RE: adding more 3D Objects ? (2011-07-10 19:50 by atsuoigarashi #58498)

Hi,

I'm not sure about 3DS Max, but probably you may translate with QTip exporter.
http://qtipplugin.com/

If you use blender for to translate, 2.49b version can exporting to MD2.

and if you want importing from mqo, you can use the following plug-in.
http://tofusan.cocolog-nifty.com/blog/2009/06/mqov104-2b45.html

Regards,
Atsuo
Répondre à #58476

RE: adding more 3D Objects ? (2011-07-11 23:18 by bashosha #58511)

Thanks for help :)
Répondre à #58498

RE: adding more 3D Objects ? (2013-04-15 00:04 by endradeka #68339)

can give me a tutorial how to add objects?? please help me ...
Répondre à #58476

Re: adding more 3D Objects ? (2014-05-05 02:22 by johanna2 #72909)

[メッセージ #58374 への返信]
> Hello,
>
> I managed to run your software for Android, on a beagle xm board
> but till now: I couldn't
> 1 - increase the number of 3D models using the MD2 (the same used).
> 3 - increase the number of Patterns (but I could change the pattern itself)
> -- both are adding to an Arraylist I really can't find an explanation why duplicating the code is not working
> also
> 2 - I couldn't use other formats .OBJ or .3DS as provided by min3d
>
>
> If you have answer for any of them I really appreciate it
> Thanks in advance


Hello,

I'm working with a Beagleboard too, can you send me the .apk version of NyARToolkit for the BB, or can you help me to start, I have some trouble with USB camera, now is working but with one specific app. How did you enable the USB camera to work with AR apps.

Thanks for your help.

Répondre à #58374