Author Topic: Created the ser file from 3ds  (Read 5012 times)

Prafful

  • Guest
Created the ser file from 3ds
« on: March 19, 2011, 08:32:06 am »
I have created the .ser file from .3ds for this Jeep.3ds. The size of Jeep.3ds is 850Kb and the size of Jeep.ser is only 8KB.
I have been using following code without errors.

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;

import com.threed.jpct.DeSerializer;
import com.threed.jpct.Loader;
import com.threed.jpct.Object3D;


public class serialize {

   /**
    * @param args
    */
   static InputStream fis;
   static OutputStream fos;
   static Object3D myobj;
   static DeSerializer de = new DeSerializer();
   
   public static void main(String[] args) {
      // TODO Auto-generated method stub
      
      try {
         fis = new FileInputStream("Jeep.3ds");
      } catch (FileNotFoundException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      
      try {
         fos = new FileOutputStream("Jeep.ser");
      } catch (FileNotFoundException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      
      myobj = Loader.load3DS(fis, 1)[0];
      myobj.build();
      de.serialize(myobj, fos, true);
      
      System.out.println("Done");

   }

}

Iam wondering, if this ser file is correct?

Online EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11972
    • View Profile
    • http://www.jpct.net
Re: Created the ser file from 3ds
« Reply #1 on: March 19, 2011, 08:36:55 am »
Most likely not. Keep in mind that the loader returns an array of objects. Just using the first the index is a hack for models that are pretty simple and consist of only one part. For your jeep, this is most likely not the case.

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #2 on: March 19, 2011, 08:50:42 am »
Hi:
Thanks for the reply.

This is the output of the above code:
Loading file from InputStream
Expanding buffers...1000000 bytes
File from InputStream loaded...869453 bytes
Processing new material Markering!
Processing new material Material #43!
Processing new material Jeep Groen!
Processing new material Jeep ster zijkan!
Processing new material Jeep Groen1!
Processing new material Knipperlicht!
Processing new material Achterlicht!
Processing new material Koplamp!
Processing new material Jeep motorkap!
Processing new material Jeep bekleding!
Processing new material Zwart Metaal!
Processing new material Dashbord!
Texture named DASHBORD.JPG added to TextureManager!
Processing new material Glas!
Processing new material Jeep Groen2!
Processing object from 3DS-file: Wiel
Object 'Wiel_jPCT-2' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Reservewie
Object 'Reservewie_jPCT-1' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: achterbump
Object 'achterbump_jPCT0' created using 20 polygons and 12 vertices.
Processing object from 3DS-file: Achterbump
Object 'Achterbump_jPCT1' created using 249 polygons and 124 vertices.
Processing object from 3DS-file: Cylinder13
Object 'Cylinder13_jPCT2' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder15
Object 'Cylinder15_jPCT3' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box80
Object 'Box80_jPCT4' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box79
Object 'Box79_jPCT5' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box78
Object 'Box78_jPCT6' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box77
Object 'Box77_jPCT7' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box76
Object 'Box76_jPCT8' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box74
Object 'Box74_jPCT9' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box75
Object 'Box75_jPCT10' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box73
Object 'Box73_jPCT11' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box72
Object 'Box72_jPCT12' created using 20 polygons and 12 vertices.
Processing object from 3DS-file: Box71
Object 'Box71_jPCT13' created using 20 polygons and 12 vertices.
Processing object from 3DS-file: Box54
Object 'Box54_jPCT14' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box55
Object 'Box55_jPCT15' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box56
Object 'Box56_jPCT16' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box57
Object 'Box57_jPCT17' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box58
Object 'Box58_jPCT18' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box59
Object 'Box59_jPCT19' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box60
Object 'Box60_jPCT20' created using 44 polygons and 24 vertices.
Processing object from 3DS-file: Box61
Object 'Box61_jPCT21' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box62
Object 'Box62_jPCT22' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box63
Object 'Box63_jPCT23' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box64
Object 'Box64_jPCT24' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box65
Object 'Box65_jPCT25' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box66
Object 'Box66_jPCT26' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Cylinder10
Object 'Cylinder10_jPCT27' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box67
Object 'Box67_jPCT28' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Cylinder11
Object 'Cylinder11_jPCT29' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder12
Object 'Cylinder12_jPCT30' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box68
Object 'Box68_jPCT31' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box69
Object 'Box69_jPCT32' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box70
Object 'Box70_jPCT33' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box37
Object 'Box37_jPCT34' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box38
Object 'Box38_jPCT35' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box39
Object 'Box39_jPCT36' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box40
Object 'Box40_jPCT37' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box41
Object 'Box41_jPCT38' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box42
Object 'Box42_jPCT39' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box43
Object 'Box43_jPCT40' created using 44 polygons and 24 vertices.
Processing object from 3DS-file: Box44
Object 'Box44_jPCT41' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box45
Object 'Box45_jPCT42' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box46
Object 'Box46_jPCT43' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box47
Object 'Box47_jPCT44' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box48
Object 'Box48_jPCT45' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box49
Object 'Box49_jPCT46' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Cylinder07
Object 'Cylinder07_jPCT47' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box50
Object 'Box50_jPCT48' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Cylinder08
Object 'Cylinder08_jPCT49' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder09
Object 'Cylinder09_jPCT50' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box51
Object 'Box51_jPCT51' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box52
Object 'Box52_jPCT52' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box53
Object 'Box53_jPCT53' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: trekhaakst
Object 'trekhaakst_jPCT54' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box20
Object 'Box20_jPCT55' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box21
Object 'Box21_jPCT56' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box22
Object 'Box22_jPCT57' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box23
Object 'Box23_jPCT58' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box24
Object 'Box24_jPCT59' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box25
Object 'Box25_jPCT60' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box26
Object 'Box26_jPCT61' created using 44 polygons and 24 vertices.
Processing object from 3DS-file: Box27
Object 'Box27_jPCT62' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box28
Object 'Box28_jPCT63' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box29
Object 'Box29_jPCT64' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box30
Object 'Box30_jPCT65' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box31
Object 'Box31_jPCT66' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box32
Object 'Box32_jPCT67' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Cylinder04
Object 'Cylinder04_jPCT68' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box33
Object 'Box33_jPCT69' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Cylinder05
Object 'Cylinder05_jPCT70' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder06
Object 'Cylinder06_jPCT71' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box34
Object 'Box34_jPCT72' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box35
Object 'Box35_jPCT73' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box36
Object 'Box36_jPCT74' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box15
Object 'Box15_jPCT75' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box04
Object 'Box04_jPCT76' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box05
Object 'Box05_jPCT77' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box06
Object 'Box06_jPCT78' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box07
Object 'Box07_jPCT79' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box08
Object 'Box08_jPCT80' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box09
Object 'Box09_jPCT81' created using 44 polygons and 24 vertices.
Processing object from 3DS-file: Box10
Object 'Box10_jPCT82' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box11
Object 'Box11_jPCT83' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box13
Object 'Box13_jPCT84' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box12
Object 'Box12_jPCT85' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box14
Object 'Box14_jPCT86' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Box01
Object 'Box01_jPCT87' created using 84 polygons and 44 vertices.
Processing object from 3DS-file: Cylinder02
Object 'Cylinder02_jPCT88' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box17
Object 'Box17_jPCT89' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Cylinder03
Object 'Cylinder03_jPCT90' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder01
Object 'Cylinder01_jPCT91' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Box18
Object 'Box18_jPCT92' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box19
Object 'Box19_jPCT93' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box16
Object 'Box16_jPCT94' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box02
Object 'Box02_jPCT95' created using 808 polygons and 408 vertices.
Processing object from 3DS-file: Trekhaak
Object 'Trekhaak_jPCT96' created using 228 polygons and 116 vertices.
Processing object from 3DS-file: Circle03
Object 'Circle03_jPCT97' created using 124 polygons and 64 vertices.
Processing object from 3DS-file: Cylinder26
Object 'Cylinder26_jPCT98' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Circle07
Object 'Circle07_jPCT99' created using 124 polygons and 64 vertices.
Processing object from 3DS-file: Achterspat
Object 'Achterspat_jPCT100' created using 36 polygons and 20 vertices.
Processing object from 3DS-file: Bodem01
Object 'Bodem01_jPCT101' created using 6 polygons and 8 vertices.
Processing object from 3DS-file: Bodem02
Object 'Bodem02_jPCT102' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: bodem03
Object 'bodem03_jPCT103' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: bodemplaat
Object 'bodemplaat_jPCT104' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Carrosser1
Object 'Carrosser1_jPCT105' created using 524 polygons and 262 vertices.
Processing object from 3DS-file: spatbord01
Object 'spatbord01_jPCT106' created using 56 polygons and 30 vertices.
Processing object from 3DS-file: Versnellin
Object 'Versnellin_jPCT107' created using 44 polygons and 24 vertices.
Processing object from 3DS-file: Zijspatbor
Object 'Zijspatbor_jPCT108' created using 44 polygons and 24 vertices.
Processing object from 3DS-file: Cylinder24
Object 'Cylinder24_jPCT109' created using 214 polygons and 107 vertices.
Processing object from 3DS-file: Cylinder25
Object 'Cylinder25_jPCT110' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder34
Object 'Cylinder34_jPCT111' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder35
Object 'Cylinder35_jPCT112' created using 194 polygons and 97 vertices.
Processing object from 3DS-file: Cylinder36
Object 'Cylinder36_jPCT113' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder29
Object 'Cylinder29_jPCT114' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder31
Object 'Cylinder31_jPCT115' created using 194 polygons and 97 vertices.
Processing object from 3DS-file: Cylinder33
Object 'Cylinder33_jPCT116' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder23
Object 'Cylinder23_jPCT117' created using 214 polygons and 107 vertices.
Processing object from 3DS-file: Cylinder22
Object 'Cylinder22_jPCT118' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Achterlic0
Object 'Achterlic0_jPCT119' created using 138 polygons and 67 vertices.
Processing object from 3DS-file: Cylinder30
Object 'Cylinder30_jPCT120' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder27
Object 'Cylinder27_jPCT121' created using 138 polygons and 67 vertices.
Processing object from 3DS-file: Cylinder28
Object 'Cylinder28_jPCT122' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Circle04
Object 'Circle04_jPCT123' created using 124 polygons and 64 vertices.
Processing object from 3DS-file: Box91
Object 'Box91_jPCT124' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box86
Object 'Box86_jPCT125' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Ophanging
Object 'Ophanging _jPCT126' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Voorlamp02
Object 'Voorlamp02_jPCT127' created using 226 polygons and 115 vertices.
Processing object from 3DS-file: Knipperlic
Object 'Knipperlic_jPCT128' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Knipperli0
Object 'Knipperli0_jPCT129' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Voorlamp01
Object 'Voorlamp01_jPCT130' created using 228 polygons and 116 vertices.
Processing object from 3DS-file: grill
Object 'grill_jPCT131' created using 1788 polygons and 874 vertices.
Processing object from 3DS-file: ref. lijn
Object 'ref. lijn_jPCT132' created using 39 polygons and 41 vertices.
Processing object from 3DS-file: motorkap
Object 'motorkap_jPCT133' created using 140 polygons and 72 vertices.
Processing object from 3DS-file: motorkap01
Object 'motorkap01_jPCT134' created using 140 polygons and 72 vertices.
Processing object from 3DS-file: Opbergkis0
Object 'Opbergkis0_jPCT135' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box87
Object 'Box87_jPCT136' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box88
Object 'Box88_jPCT137' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box89
Object 'Box89_jPCT138' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box90
Object 'Box90_jPCT139' created using 54 polygons and 25 vertices.
Processing object from 3DS-file: Cylinder37
Object 'Cylinder37_jPCT140' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder38
Object 'Cylinder38_jPCT141' created using 48 polygons and 26 vertices.
Processing object from 3DS-file: Sphere04
Object 'Sphere04_jPCT142' created using 516 polygons and 260 vertices.
Processing object from 3DS-file: Cylinder32
Object 'Cylinder32_jPCT143' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Circle08
Object 'Circle08_jPCT144' created using 232 polygons and 116 vertices.
Processing object from 3DS-file: zitting03
Object 'zitting03_jPCT145' created using 2588 polygons and 1296 vertices.
Processing object from 3DS-file: stoelzitti
Object 'stoelzitti_jPCT146' created using 30 polygons and 32 vertices.
Processing object from 3DS-file: stoelframe
Processing object from 3DS-file: stoel2
Object 'stoel2_jPCT147' created using 844 polygons and 424 vertices.
Processing object from 3DS-file: zitting04
Object 'zitting04_jPCT148' created using 2588 polygons and 1296 vertices.
Processing object from 3DS-file: Box81
Object 'Box81_jPCT149' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: zitting1
Object 'zitting1_jPCT150' created using 2588 polygons and 1296 vertices.
Processing object from 3DS-file: stoelzitt0
Object 'stoelzitt0_jPCT151' created using 30 polygons and 32 vertices.
Processing object from 3DS-file: stoelfram0
Processing object from 3DS-file: stoelfram1
Object 'stoelfram1_jPCT152' created using 844 polygons and 424 vertices.
Processing object from 3DS-file: zitting2
Object 'zitting2_jPCT153' created using 2588 polygons and 1296 vertices.
Processing object from 3DS-file: Cylinder20
Object 'Cylinder20_jPCT154' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Torus01
Object 'Torus01_jPCT155' created using 576 polygons and 288 vertices.
Processing object from 3DS-file: Cylinder16
Object 'Cylinder16_jPCT156' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder18
Object 'Cylinder18_jPCT157' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Cylinder17
Object 'Cylinder17_jPCT158' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: Stuurstang
Object 'Stuurstang_jPCT159' created using 96 polygons and 50 vertices.
Processing object from 3DS-file: dashbord
Object 'dashbord_jPCT160' created using 116 polygons and 60 vertices.
Processing object from 3DS-file: Cylinder19
Object 'Cylinder19_jPCT161' created using 48 polygons and 26 vertices.
Processing object from 3DS-file: Sphere03
Object 'Sphere03_jPCT162' created using 224 polygons and 114 vertices.
Processing object from 3DS-file: Cylinder14
Object 'Cylinder14_jPCT163' created using 48 polygons and 26 vertices.
Processing object from 3DS-file: Cylinder21
Object 'Cylinder21_jPCT164' created using 48 polygons and 26 vertices.
Processing object from 3DS-file: Sphere02
Object 'Sphere02_jPCT165' created using 224 polygons and 114 vertices.
Processing object from 3DS-file: Sphere01
Object 'Sphere01_jPCT166' created using 224 polygons and 114 vertices.
Processing object from 3DS-file: Versnell.
Object 'Versnell. _jPCT167' created using 144 polygons and 74 vertices.
Processing object from 3DS-file: Versnell.0
Object 'Versnell.0_jPCT168' created using 72 polygons and 38 vertices.
Processing object from 3DS-file: glas1
Object 'glas1_jPCT169' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Raam
Object 'Raam_jPCT170' created using 54 polygons and 26 vertices.
Processing object from 3DS-file: Box96
Object 'Box96_jPCT171' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box97
Object 'Box97_jPCT172' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box98
Object 'Box98_jPCT173' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Ruitenwiss
Object 'Ruitenwiss_jPCT174' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box100
Object 'Box100_jPCT175' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: Box101
Object 'Box101_jPCT176' created using 12 polygons and 8 vertices.
Processing object from 3DS-file: raam
Object 'raam_jPCT177' created using 1484 polygons and 744 vertices.
Processing object from 3DS-file: Line01
Processing object from 3DS-file: band01
Object 'band01_jPCT178' created using 352 polygons and 178 vertices.
Processing object from 3DS-file: Velg
Object 'Velg_jPCT179' created using 4244 polygons and 2122 vertices.
Done

Can you guide me ahead?

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #3 on: March 19, 2011, 08:52:32 am »
I think, since jeep 3ds file might be having lots of parts so the output is returning them. So, Do i have to combine all these parts in one .ser file?

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #4 on: March 19, 2011, 08:54:39 am »
You mean this: "A 3DS file may contains different parts/meshes. Each part will be loaded as a separate Object3D in jPCT, which is why you get an array as return value from the loader. "

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #5 on: March 19, 2011, 09:00:01 am »
hi:
Now I have modified a code a little by adding
myobj=Object3D.mergeAll(Loader.load3DS(fis, 1));
in place of
myobj=Loader.load3DS(fis, 1)[0];

Now, the size of ser file is 4386 KB. Let  me chk it in a game now.

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #6 on: March 19, 2011, 09:17:51 am »
It does not seem to work.

Online EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11972
    • View Profile
    • http://www.jpct.net
Re: Created the ser file from 3ds
« Reply #7 on: March 19, 2011, 02:49:32 pm »
That's pretty vague. Nobody can track down any problem without at least a brief description of the actual problem. Your approach is fine (apart from the fact that your model seems to be very high polygon, which isn't a good choice for a game).

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #8 on: March 20, 2011, 10:40:20 am »
ok thanks, the approach seems to be fine, as you said.

i am trying to get low poly car model. pl. send me if anyone has one. I will post an update if my task is done.

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #9 on: March 20, 2011, 11:31:00 am »
Hi: you said right. It was not working because it was high poly model. I serialized low poly car model and it was workin fine.

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #10 on: March 28, 2011, 08:17:48 am »
Now, I am trying to display AlertBox using AlertDialog after the car has hit 3 times with wall in alienrunner.

But, it shows error of "threadid=9": thread exiting with uncaught exception.

Source code of Objectpool.java, Line number 517:

if (os.hitCount >= 3) {
      w.setVisibility(false);
      SoundManager.getInstance().play(SoundManager.BOMB);
      partMan.addEmitter(w.getTranslation(tmp), BASE_DIR, 15, "rubble", 1000, 15, 30, 7, false);
      EventRegistrator.getInstance().register(EventRegistrator.CONCUSSION);

               //custom code start...
               Logger.log("Ticker will be paused")
               Ticker.setPaused(false);
               AlienRunner.getInstance.showAlert();
               //custom code ends...

      }

Any suggestions!

Online EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11972
    • View Profile
    • http://www.jpct.net
Re: Created the ser file from 3ds
« Reply #11 on: March 28, 2011, 08:22:07 am »
And the exception is?

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #12 on: March 28, 2011, 08:30:06 am »
There is no exception.  Game just force closes. What shoudl I send you for you to understand the BUG? May be, I am making a mistake in code.

Online EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11972
    • View Profile
    • http://www.jpct.net
Re: Created the ser file from 3ds
« Reply #13 on: March 28, 2011, 08:43:09 am »
I assume that removing AlienRunner.getInstance.showAlert(); fixes it? If so, make sure that showAlert() works correctly. For example, you can't open Android GUI components from inside the render thread.

Prafful

  • Guest
Re: Created the ser file from 3ds
« Reply #14 on: March 28, 2011, 08:46:51 am »
Yes, you are right. It is not allowing me to open Andrid GUI components like toast, alertdialog etc from insinde the render thread?
But, I am willing to show an information box when player hits the wall 3rd time. That is the reason, I was using alertbox, but it is un-correct way.

Can you point me to some correct way of implementing this? or any alternate way of displaying the informatino box with some message after the car hits the wall 3rd time.
Thanks.