Author Topic: Fresher to JPCT  (Read 2871 times)

Offline san14

  • int
  • **
  • Posts: 60
    • View Profile
Fresher to JPCT
« on: January 27, 2007, 06:59:56 am »
Hi I am fresher to JCPT. I have some silly questions.
I saw JPCT example at http://www.jpct.net/download.html . my question is, can i change ql.3ds to any other .3ds object in same example . Infect i tried with other may other examples of 3ds.. but it did not work.


With Thanks
San14
« Last Edit: February 15, 2008, 03:02:41 am by san14 »
San14

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Fresher to JPCT
« Reply #1 on: January 27, 2007, 10:59:21 am »
"did not work" is a bit too vague...what exactly was the problem? Other files may have a different scaling, position in object space, orientation etc. So loading them just by replacing the name may work technically but you can't see the result, because it's behind you or one pixel small etc. I suggest to use a HelloWorld example (like in this thread: http://www.jpct.net/forum/viewtopic.php?t=734) and load the 3ds model into that one. It's easier to understand how the models differ from each other that way.

P.S.: I've moved your other thread to this forum too. They didn't belong to the news-section.

Offline san14

  • int
  • **
  • Posts: 60
    • View Profile
doubt
« Reply #2 on: January 28, 2007, 08:06:27 am »
hi
>>did not work" is a bit too vague...what exactly was the problem?
Problem was i could see black screen but could see the weapon.3ds. Sure i will try for different scaling
 
Code: [Select]
Object3D[] levelParts=Loader.load3DS("3ds"+c+"ksr00.3ds", 5f); Do this fragment has soming to do with scaling. if so I tried ("3ds"+c+"ksr00.3ds", 30f) to 1f.

Can i laoad .obj object instade of .3Ds

With Regards
San14

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Fresher to JPCT
« Reply #3 on: January 28, 2007, 12:05:12 pm »
Yes, the last part is the scaling (as mentioned in the Javadocs btw.). If you see a black screen, it's most likely caused by the model's position in object space. Not all models are located around (0,0,0). Plus, the fps-example allies gravity, so if you are not located inside the model after loading you just fall down into infinity and can't see the model anymore. That's why i suggested to  use a modified HelloWorld instead which doesn't do all this application logic. That makes it much easier to understand the basics.
OBJ can be loaded with the new beta version. Have a look in the News-section for a download link.

Offline san14

  • int
  • **
  • Posts: 60
    • View Profile
Fresher to JPCT
« Reply #4 on: January 29, 2007, 11:41:40 am »
Thanks for your suggesion. I will try to go through HeloWorld example. But if scaling part is done in this example. Then it would be of great help to me. As it si doing every part what is required.

>>Not all models are located around (0,0,0).
Is there any means to find the loaction of 3ds object  (0,0,0).
San14

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Fresher to JPCT
« Reply #5 on: January 29, 2007, 06:14:35 pm »
Quote from: "san14"
>>Not all models are located around (0,0,0).
Is there any means to find the loaction of 3ds object  (0,0,0).
No, but you can use Object3D.getCenter(); (after calling build() on that object) for something similar. It gives you a SimpleVector containing the geometrical center (as jPCT has calculated it) of an Object3D.