Author Topic: How can I serialize a mesh?  (Read 14767 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #45 on: August 10, 2011, 01:33:52 pm »
I've no idea what you mean with shape effect... ???

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #46 on: August 10, 2011, 01:42:10 pm »
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
« Last Edit: August 10, 2011, 02:24:47 pm by nico_r_a »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #47 on: August 10, 2011, 02:25:15 pm »
Shading yes, real shadows...no.

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #48 on: August 10, 2011, 02:53:01 pm »
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)?
« Last Edit: August 10, 2011, 04:18:07 pm by nico_r_a »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #49 on: August 10, 2011, 04:30:10 pm »
Sorry, but i don't have the slightest idea of what you are trying to say... ???

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #50 on: August 10, 2011, 04:53:51 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #51 on: August 10, 2011, 08:34:07 pm »
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.

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #52 on: August 11, 2011, 02:29:57 am »
but if i write this in my application
Code: [Select]
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #53 on: August 11, 2011, 07:36:45 am »
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??

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #54 on: August 11, 2011, 09:22:20 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #55 on: August 11, 2011, 10:47:14 am »
These are the names of the objects, not of the textures.

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #56 on: August 11, 2011, 11:05:44 am »
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?
« Last Edit: August 11, 2011, 12:06:51 pm by nico_r_a »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #57 on: August 11, 2011, 12:26:02 pm »
 ???

Offline nico_r_a

  • byte
  • *
  • Posts: 48
    • View Profile
Re: How can I serialize a mesh?
« Reply #58 on: August 11, 2011, 03:18:45 pm »
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;

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How can I serialize a mesh?
« Reply #59 on: August 11, 2011, 03:40:34 pm »
You don't! It's for desktop Java. You have to use the corresponding Android events instead like touch events.