Milkshape3D ASCII File Loader for PB

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Milkshape3D ASCII File Loader for PB

Post 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...
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: Milkshape3D ASCII File Loader for PB

Post 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!
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Milkshape3D ASCII File Loader for PB

Post 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.
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Bad link :(
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

J. Baker wrote:Bad link :(
thats because he removed the loader because he wouldnt use things that other people made.
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post 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:
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Post 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... :?
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

J. Baker wrote: I guess I should read a little better. :oops:
anyone can misread a sentence now and then :D
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post 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.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Post 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 ;)
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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 :(
Image Image
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post 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

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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:
--Kale

Image
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

well, enough to be done, first my wishlist, then... oh...

i think i'm a bit selfish right now :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

blueznl wrote:well, enough to be done, first my wishlist, then... oh...

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