How can I serialize a mesh?

Started by Xyvab, April 23, 2010, 08:34:24 PM

Previous topic - Next topic

EgonOlsen

I've no idea what you mean with shape effect... ???

nico_r_a

#46
shadow effect, (sorry i have done a mistake of traduction)
do you have an idea about the texture when you see my code??
because my code correspond at your explications

EgonOlsen


nico_r_a

#48
ok, but do you have an idea for my code because i always have nothing with my texture??
and if i load the texture in my 3ds, do i keep the texture after when i load in my application android without used (the texture manager)?

EgonOlsen

Sorry, but i don't have the slightest idea of what you are trying to say... ???

nico_r_a

actually, i am going to give you an example to explain my problem
i have three textures :
1.jpg
2.jpg
3.jpg

And i have 3 objects in my scene 3ds when i load on the emulator
on the first object i see 1.jpg
on the second object i see 1.jpg
on the third object i see 1.jpg

whereas i should have when i load
on the first object i should see 1.jpg
on the second object i should see 2.jpg
on the third object i should see 3.jpg

EgonOlsen

I'm not going to repeat myself about how texture assignment works. If your model has the correct textures assigned, you are doing it wrong. It's most likely, that you do an explicit setTexture() either in the serialization code or in the Android code.

nico_r_a

but if i write this in my application

TextureManager.getInstance().flush();
TextureManager tm = TextureManager.getInstance();

Texture textureai1 = new Texture(getResources().getDrawable(R.drawable.ai1));
Texture textureai2 = new Texture(getResources().getDrawable(R.drawable.ai2));

tm.addTexture("ai1", textureai1);
tm.addTexture("ai2", textureai2);

i have loaded nothing texture in my scene, nothing

EgonOlsen

Yes, and that's all fine...but it doesn't say anything about your problem. Without code, logs (at least from the serialization process) or the model, i can't help here. CHECK THE NAMES! ARE THEY REALLY ai1 AND ai2 IN THAT 3DS??

nico_r_a

but when i looks the console while the compilation of jpct (to create a file ser)
i see that
ai1_jPCT0
ai2_jPCT1
do you use this name may be?

EgonOlsen

These are the names of the objects, not of the textures.

nico_r_a

#56
and is there a topic who is good to explain how we change between the camera when we click on a part (precise) of the screen?

EgonOlsen


nico_r_a

i have found your code in the topic "How to rotate and move 3D object in world space by 2D mouse coordinaes?"
but how do i add this library in android?
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;

EgonOlsen

You don't! It's for desktop Java. You have to use the corresponding Android events instead like touch events.