Page 1 of 2

Milkshape3D ASCII File Loader for PB

Posted: Fri May 14, 2004 2:44 pm
by Danilo
DOWNLOAD: LoadMS3D.zip (800k)

README:

Code: Select all

- PureBasic cant load .bmp textures,
  so you have to convert .bmp textures
  to .png or .jpg first *and* change
  this extension in the MS3D ASCII file!


- model example2.txt and the 3 textures
  copyright by traumatic!
This is only to show the community that it is possible to write
own loaders for 3D file formats without waiting a long time for PB
to get more internal file format support.

Its a test only, i dont free memory correctly after the model is
loaded (mem is freed automatically on program exit) - i just dont
have the time to add this now (i´m going to holiday for 1 week).

Maybe it helps some people to get an idea how to write own
3D file format loaders...

Re: Milkshape3D ASCII File Loader for PB

Posted: Fri May 14, 2004 6:20 pm
by traumatic
Danilo wrote:- model example2.txt and the 3 textures
copyright by traumatic!
Sorry Danilo,

I know you've got this from an old example of me and I thank you for crediting me but this is not true!
I ripped the model from the game "Max Payne".
One of the reasons I never released what I showed to you that time :wink:

BTW.: Glad to see you still around here from time to time!

Re: Milkshape3D ASCII File Loader for PB

Posted: Fri May 14, 2004 8:32 pm
by Danilo
traumatic wrote:Sorry Danilo,

I know you've got this from an old example of me and I thank you for crediting me but this is not true!
I ripped the model from the game "Max Payne".
Thanks for this info, traumatic!

I dont have a free model and time to search one atm - Loader removed.

Posted: Fri May 14, 2004 9:14 pm
by J. Baker
Bad link :(

Posted: Fri May 14, 2004 11:32 pm
by thefool
J. Baker wrote:Bad link :(
thats because he removed the loader because he wouldnt use things that other people made.

Posted: Sat May 15, 2004 1:17 am
by J. Baker
thefool wrote:
J. Baker wrote:Bad link :(
thats because he removed the loader because he wouldnt use things that other people made.
I guess I should read a little better. :oops:

Posted: Sat May 15, 2004 5:24 am
by Danilo
J. Baker wrote:Bad link :(
Its online again, i just removed the 2nd (better) example
because of the licensing issue: LoadMS3D.zip (500k)

Code: Select all

- PureBasic cant load .bmp textures,
  so you have to convert .bmp textures
  to .png or .jpg first *and* change
  this extension in the MS3D ASCII file!

- Looks like PB does not include the
  Normals in the rotation for Entities,
  so light looks wrong after rotation.
Is it correct that the Engine3D doesnt allow PB-Style #PB_Any ?? If so, why that?
Docs dont say anything about #PB_Any for Meshes, Entities, Lights, ... :?

For testing the loader, its best you make/convert your own models
with milkshape and load it.
Just check that textures cant be .bmp, so convert it to .jpg or .png
yourself and change the extension within the MS3D ASCII file.

LoadTexture cant load .bmp like all other image loading functions
in PureBasic, dont blame me for this and dont ask why it is like it is... :?

Posted: Sat May 15, 2004 9:05 am
by thefool
J. Baker wrote: I guess I should read a little better. :oops:
anyone can misread a sentence now and then :D

Posted: Tue Jun 01, 2004 9:34 am
by Fred
Yes, #PB_Any isn't supported for the 3D engine objects (in progress) and BMP loading should be supported too. About the normal problem after rotation, I will take a look, thanks for the info.

Posted: Sat Jun 05, 2004 5:26 am
by Danilo
Fred wrote:Yes, #PB_Any isn't supported for the 3D engine objects (in progress)
and BMP loading should be supported too.
About the normal problem after rotation, I will take a look,
thanks for the info.
OK, thanks for the info Frédéric!

There is another thing with writing own loaders:
3rd party loaders can only load static models, no animations.
Its because the low level mesh commands for setting anim-stuff
is missing (Add mesh/entity frame, set mesh data for all frames, ..).

I dont know your plans with the 3D stuff in PureBasic, Frédéric -
looks like the 3D engine stuff hasnt changed in 1,5 years... :?:

If you want to continue to add more stuff to it one day, it would
be nice to get the functions for adding mesh anims by hand.
Better light control functions (light type: pyramid,cube,spot,...),
more low level particle control stuff, enumerating entity anims
and finally collision detection...

With some enhancements to the small engine, users could write
more stuff themself (mesh+world+terrain loader/saver, particle editors
for wind/rain/etc..) and begin to write real stuff with 3D in PB.
Hundred 3D games are waiting to be written with PureBasic, like
in Blitz3D (see http://www.blitzbasic.com/gallery/gallery.php ).

Do you have a time plan for updating the 3D engine (to newer
OGRE version) and for adding more control functions, Frédéric?

PB3D still crashes for many peoples on startup (VC++ runtime error),
maybe this goes away with newer version of the OGRE engine.

BTW: Maybe you can implement the MS3D loader (with anim support)
directly in the 3D engine? Also mesh/entity saving would be nice
for creating 3D modelers (GetMeshData or something).

Much work to do... thanks for listening ;)

Posted: Sat Jun 05, 2004 6:45 am
by Paul
Just a note...

The latest MESH conversion tools to convert 3DMax files to MESH provided on the OGRE website create MESH files that do not work with PB's OGRE.

The MESH format has progressed and it seems since PB's implementation of ORGE has not kept up with all the updates/changes, the new format doesn't work with PB :(

Posted: Sat Jun 05, 2004 9:41 am
by LarsG
Didn't Fred mention somewhere that he was going to upgrade the 3D aspect of PB after the big 4.0 release?!?
We can only wait and see...

I, for one, am eagerly awaiting some 3D games and apps in PB.. :D

Posted: Sat Jun 05, 2004 4:25 pm
by Kale
Hundred 3D games are waiting to be written with PureBasic
I'm still waiting for PB's 3D to get updated before i start a few projects i have been dreaming up too. C'mon Fred! <slap> :twisted:

Posted: Sat Jun 05, 2004 4:33 pm
by blueznl
well, enough to be done, first my wishlist, then... oh...

i think i'm a bit selfish right now :-)

Posted: Sat Jun 05, 2004 8:57 pm
by thefool
blueznl wrote:well, enough to be done, first my wishlist, then... oh...

i think i'm a bit selfish right now :-)
:D