Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Convert MD2 models to JPCT Native Format
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Convert MD2 models to JPCT Native Format (Read 3942 times)
hytparadisee
int
Posts: 86
Convert MD2 models to JPCT Native Format
«
on:
May 11, 2007, 04:52:22 am »
Before I ask. Is it true that loading models in JPCT Native format is much faster than MD2?
Let's say I loaded the model (usually with animation) using Loader.loadMD2(...) and got the Object3D, what should i do next to export it to the Native JPCT format. And once exported, how do i load it back again to get the Object3D for use?
Logged
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution
raft
quad
Posts: 1993
Re: Convert MD2 models to JPCT Native Format
«
Reply #1 on:
May 11, 2007, 10:23:44 am »
i do store animations in serialized form (java's native format
) loading it is really faster. storage space is slightly higher but you can reduce it using low precision serializing or not serializing normals. see Mesh class for details
beware of one drawback, each time Egon changes something in mesh class serialized form breaks. i dont know why he insists on not adding a serialVersionUID to his classes
r a f t
Logged
hytparadisee
int
Posts: 86
Re: Convert MD2 models to JPCT Native Format
«
Reply #2 on:
May 11, 2007, 11:02:52 am »
So we can save our models like that? At first i thought JPCT has its own xml file format (like jME).
Logged
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution
raft
quad
Posts: 1993
Re: Convert MD2 models to JPCT Native Format
«
Reply #3 on:
May 11, 2007, 11:08:23 am »
sure. most of the jPCT classes are serializable so you can save them using standard java serialization mechanism. for animations, save the Animation as a whole then during load set it with the Object3D.setAnimationSequence(Animation)
Logged
EgonOlsen
Administrator
quad
Posts: 12295
Re: Convert MD2 models to JPCT Native Format
«
Reply #4 on:
May 11, 2007, 11:08:45 am »
It has an xml-format, but i don't recommend it for saving animations because xml is usually bloated. Loading won't be faster but slower. Loading MD2-files already is fast, because MD2 is a quite optimized format in terms of size.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Convert MD2 models to JPCT Native Format