Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RhoX

Pages: 1 [2]
16
Projects / Re: DevKit / Level Editor
« on: August 09, 2011, 05:07:54 am »
Hey, guys, what a very nice project!

I'm developing for Android, using the jPCT-AE port and I am wondering if it is possible to use this Level Editor somehow to help me with my apps. What do you think about that? Like viewing the models distribution or making some kind of parser/analyzer..?

Thanks in advance!!

RhoX

17
Support / Re: Code example to build your own GUI menu
« on: August 04, 2011, 11:02:53 pm »
Man! You're code seems to be what I was looking for to start a new application development!
I'm gonna try it and then I'll reply my experinces  :D!

Thanks!!

RhoX

18
Support / Re: 3D GUI development - objects positions
« on: August 04, 2011, 10:26:00 pm »
Thank you very much for the reply!

I'm going to look at it and see what ideas I can reuse for my application!

 :D

19
Support / Re: load a .obj file in JPCT-AE demo
« on: July 30, 2011, 10:19:11 pm »
Man, it worked!

Actually, from your post, I started to search where the objType was beeing assigned. Then I discovered: nowhere XD!

Thank you very much for your attention!

20
Support / Re: 3D GUI development - objects positions
« on: July 30, 2011, 10:11:34 pm »
I kinda understand your idea. It seems nice.
Do you have some piece of code, maybe a simple sample to clarify my ideas?

21
Support / Re: load a .obj file in JPCT-AE demo
« on: July 29, 2011, 11:53:32 pm »
No, It doesnt seem to be a problem related to sight, or size. Cause when I try to use tha "mainObj", it is an empty object. I doesnt have the characteristcs of the model created in arrangeWorld() method. And, when I tried to use cloneObject() like this:

mainObj = (arrangeWorld(objType)).cloneObject();

I get a NullPointerException =/.

22
Support / Re: load a .obj file in JPCT-AE demo
« on: July 29, 2011, 11:35:42 pm »
Alright. Now I've realized that.  "Wrong positions" I meant something related to the scene, but - like you said - those commands werent about loading a scene setup. I've misundertood. Sorry.

In fact, I'm with a problem loading up my models: I've separated the code for loading the model from the onDrawFrame method, and now  I doesnt show up anything at the scene. In terms of code, it is...

I have my method for loading models:

Code: [Select]
public Object3D arrangeWorld(int objType)
{
Object3D mainTemp = null;
switch (objType)
{
//.OBJ
case 0:
break;
//.MD2
case 1:
mainTemp = Loader.loadSerializedObject(res.openRawResource(R.raw.serbird_final));

Texture birdy = new Texture(res.openRawResource(R.raw.bird_final));
tm.addTexture("bird_final", birdy);

mainTemp.setCenter(SimpleVector.ORIGIN);
//mainTemp.rotateX((float)( -.5*Math.PI));
            mainTemp.rotateMesh();
mainTemp.setRotationMatrix( new Matrix() );
mainTemp.setTexture("bird_final");
break;
//.3DS
case 2:
Object3D temp = null;
Object3D chair[] = new Object3D[7];

chair[0] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair0));
chair[1] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair1));
chair[2] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair2));
chair[3] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair3));
chair[4] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair4));
chair[5] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair5));
chair[6] = Loader.loadSerializedObject(res.openRawResource(R.raw.serchair6));

Texture chairy = new Texture(res.openRawResource(R.raw.decoo));
tm.addTexture("chair", chairy);

int l = chair.length;
for(int i = 0; i < l; i++)
{
temp = chair[i];
temp.setCenter(SimpleVector.ORIGIN);
temp.rotateX((float)( -.5*Math.PI));
            temp.rotateMesh();
temp.setRotationMatrix( new Matrix() );
temp.setTexture("chair");
mainTemp = Object3D.mergeObjects(mainTemp, temp);
}
break;
default:

}

return mainTemp;
}


And, in  the onDrawFrame method I have the following sequence:

Code: [Select]
//... some other codes
mainObj = new Object3D(arrangeWorld(objType));

world.addObject(mainObj);
world.buildAllObjects();
//... some other codes

What do you think about that?

ps: Sorry if here isnt the right place to make this question =/

23
Support / Re: load a .obj file in JPCT-AE demo
« on: July 29, 2011, 08:29:09 pm »
Hey folks,

I was reading those posts about the .OBJ models loading  and I tried the following code in my app:

Code: [Select]
for (int i = 0; i < model.length; i++) {
            temp = model[i];
            temp.setCenter(SimpleVector.ORIGIN);
            temp.rotateX((float)( -.5*Math.PI));
            temp.rotateMesh();
            temp.setRotationMatrix(new Matrix());
            o3d = Object3D.mergeObjects(o3d, temp);
            o3d.build();

I suppose its purpose is position the models correctly at the scene [based on another topic]. But, with me, it didn't work (the objects are still at the wrong positions). Some suggestions?

Thanks!

24
Support / Re: 3D GUI development - objects positions
« on: July 29, 2011, 07:53:29 pm »
Hum,  I comprehend.
But how is this idea of using simple ASCII files to do your level layouts? And, about place holder models, is it like using a complete scene in 3ds and import it (all of its composing objects) to jPCT-AE?

Thanks again!  :D

25
Support / 3D GUI development - objects positions
« on: July 29, 2011, 10:09:05 am »
Hey, guys!

I have a problem here, if you could help me with some tips and/or tutorials, this kind of stuff, I would be glad: I am starting to develop some 3D interfaces for simulations on Android, using the jPCT-AE. I've seen some code examples, but I dont know how to "position" my models at the scene. It's kinda hard to explain: how am I supposed to know where the objects are (and how) if I'm not seeing the scene during the development?
I dont know if I could get it clear for you, but the idea is pretty much simple. Do you have some "technique" to develop interfaces, scenes in general? Or is it just like try and error?

Thank you in advance

RhoX

26
Support / Re: Tutorials or some help
« on: February 28, 2011, 08:07:52 pm »
Thanks for all the support!

But I've thought that jPCT-AE was a game engine, not a 3D engine...Now I see at the site: "3D engine" heheheh XD.

27
Support / Tutorials or some help
« on: February 23, 2011, 08:26:05 pm »
Hey guys!

I've started to use the jpct-ae engine recently and I'm a little lost with all those classes and methods. I'm using the HelloWorld code and the other example (more complex) as guides but I'd like to know if there is some kind of tutorial which might be useful.
And, what do you think about reading the tips of jpct [desktop version] (like: how to start, the explanation about HelloWorld and other things like that) to get used to the engine?

Thanks in advance!

28
Support / Re: Textures when serializing objects
« on: February 22, 2011, 06:52:46 pm »
Hey guys!

I've solved the problem: the correct extension was *.jpg, not *.jpeg (¬¬).
Sorry ^^'!

Thank you Thomas and EgonOlsen for the help!  ;D


29
Support / Textures when serializing objects
« on: February 21, 2011, 11:26:39 pm »
Hey folks!

I was trying to serialize some objects but I´ve always got the following error:
Loading Texture...C:/grassy.jpeg
[ Mon Feb 21 19:17:51 BRT 2011 ] - ERROR: File 'C:/grassy.jpeg' not found - replacement texture used instead!


I've already tried to make many changes to correct this problem, but I couldn't solve it (the grassy.jpeg file is there, I've checked!). Sorry if there already is another topic with the same subject, I didn't find it.

The code that I've used was:
Code: [Select]
TextureManager.getInstance().flush();
TextureManager tm = TextureManager.getInstance();

Object3D objMD2 = null;

        objMD2 = Loader.loadMD2("C:/bird.md2",1);

        Texture texMD2; 
        texMD2 = new Texture("C:/grassy.jpeg");

        tm.addTexture("bird", texMD2);
        objMD2.setTexture("bird");
        objMD2.build();
       
        DeSerializer de;
        de = new DeSerializer();
        FileOutputStream outputObjMD2 = new FileOutputStream( "C:/serbird.ser");
        de.serialize(objMD2, outputObjMD2, true);

Thanks you in advance!

Pages: 1 [2]