Made a B3D Loader
Made a B3D Loader
Hi, I am a new user to irrlicht, I only really started using it last week, but I have been using blitz basic for years.
I tried out the examples of irrlicht and found the animations looked very poor compared to blitz basic.
So I wrote a b3d file loader for Irrlicht.
So far it plays animations smoothly (interpolated frames, weighted vertices), and can also load light mapped meshes.
Transitions between animations are not yet done, I will need a custom IAnimatedMeshSceneNode to get it to work.
And one or two functions don’t yet work.
(Edit: File is out of date and the loader has been included with the new version of irrlicht)
Download:
ftp://codedrop%40gdlib%2Enet:codedrop@c ... Loader.zip
if that fails:
http://www.uploading.com/en/?get=K3VYIQNJ
I am a beginner at C++ programming, so please help me improve this loader.
I’m happy for people to do what ever they like with it.
Any feedback welcome
I tried out the examples of irrlicht and found the animations looked very poor compared to blitz basic.
So I wrote a b3d file loader for Irrlicht.
So far it plays animations smoothly (interpolated frames, weighted vertices), and can also load light mapped meshes.
Transitions between animations are not yet done, I will need a custom IAnimatedMeshSceneNode to get it to work.
And one or two functions don’t yet work.
(Edit: File is out of date and the loader has been included with the new version of irrlicht)
Download:
ftp://codedrop%40gdlib%2Enet:codedrop@c ... Loader.zip
if that fails:
http://www.uploading.com/en/?get=K3VYIQNJ
I am a beginner at C++ programming, so please help me improve this loader.
I’m happy for people to do what ever they like with it.
Any feedback welcome
Last edited by Luke on Wed Dec 06, 2006 1:50 pm, edited 3 times in total.
WOW
A hundred of congrats!
There are *tons* of free and comercial lightmappers exporting as b3d!
It packs the whole level thing!
People, grab this now
Also animated meshes!!!!!
(a question...while b3d format I think supports spline interpolation, like x, the dx7 old blitz3d engine did only supported linear, for the dx limits I think...are you supporting to grab the spline interpolation, the curves, from the 3d package? there are great exporters for character animation in b3d format in Character Fx, Max, Ultimate Unwrap, etc...)
Really.Outstanding.
Some of the experts in code here, please play with it, so to help the man in possible issues, etc...do so now that he's attending the thread
Do not make him wait...!
Please!
Don't let this post buried...!
edit - Masters of the C++ language ...help him! In case is needed...
A hundred of congrats!
There are *tons* of free and comercial lightmappers exporting as b3d!
It packs the whole level thing!
People, grab this now
Also animated meshes!!!!!
(a question...while b3d format I think supports spline interpolation, like x, the dx7 old blitz3d engine did only supported linear, for the dx limits I think...are you supporting to grab the spline interpolation, the curves, from the 3d package? there are great exporters for character animation in b3d format in Character Fx, Max, Ultimate Unwrap, etc...)
Really.Outstanding.
Some of the experts in code here, please play with it, so to help the man in possible issues, etc...do so now that he's attending the thread
Do not make him wait...!
Please!
Don't let this post buried...!
edit - Masters of the C++ language ...help him! In case is needed...
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
vermeer: Thanks,
It should be pretty easy to add spline interpolation (only a change in the formula, and getting the key frames) but right now it is only using linear interpolation. I may make an option of picking which to use at runtime.
It should be pretty easy to add spline interpolation (only a change in the formula, and getting the key frames) but right now it is only using linear interpolation. I may make an option of picking which to use at runtime.
Last edited by Luke on Fri Jul 21, 2006 11:13 am, edited 1 time in total.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
From a first glance I'd say code is definitely not bad. However I'd prefer to have the changes being presented more compact: Try to move your changes into the SVN version of Irrlicht (instructions to get the code are on the project page and elsewhere in this forum). Then you can make a patch file with 'svn diff >b3dloader.patch'
For hosting you should contact bitplane and put it onto gdlib.net.
For hosting you should contact bitplane and put it onto gdlib.net.
maybe he gets a bit lost trying to achieve that...As probably is not familiar with it.
Luke, spline interpolation is what translates stuff like feet not sinking, or a real clothes , hair or othe rmovements as natural and organic as were created (provided that thecode imports the exact curves made...)
Other possibility is the artist baking all frames to keyframes, or every two frames, but it gets really hd memory heavy and maybe cpu overloading files... (I dunno if would be the case)
Luke, spline interpolation is what translates stuff like feet not sinking, or a real clothes , hair or othe rmovements as natural and organic as were created (provided that thecode imports the exact curves made...)
Other possibility is the artist baking all frames to keyframes, or every two frames, but it gets really hd memory heavy and maybe cpu overloading files... (I dunno if would be the case)
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
hybrid:
I have never used SVN but I'll try.
vermeer:
My b3d loader uses linear spline interpolation like blitz basic (which is used only to save cpu usage not the dx limits as it is done in the engine, not the driver/hardware (I think))
Are talking about (Quadratic/Cubic/others..) spline interpolation where 3, 4 or more key frames are used to make a curve (smoother movement), then yes I know want you mean
linear interpolation needs bigger files but is easier on the cpu (then spline interpolation), and still looks ok, but I will try and add spline interpolation later with an option of picking which to use at runtime.
I have never used SVN but I'll try.
vermeer:
My b3d loader uses linear spline interpolation like blitz basic (which is used only to save cpu usage not the dx limits as it is done in the engine, not the driver/hardware (I think))
Are talking about (Quadratic/Cubic/others..) spline interpolation where 3, 4 or more key frames are used to make a curve (smoother movement), then yes I know want you mean
linear interpolation needs bigger files but is easier on the cpu (then spline interpolation), and still looks ok, but I will try and add spline interpolation later with an option of picking which to use at runtime.
I don't know if is really possible...What i mean is whaty I observed the md5 exporter from Blender does...it takes the ipo curves and seem to translate as they are in the 3d package: if there was an ease in aproaching a keyframe, it is ported as it was, with that exact curve...It affects how much traslation and in which axe more or less between one keyframe and the following...are curves per axe (x,y, z) each ported as they were at the 3d pacakge. This allows a 1:1 output in the engine....
wasn't the refering to put an standard average smoothing curve, I think...
This perhaps is extremely complex to code...
Anyway, the loader does already an amazing number of things...
wasn't the refering to put an standard average smoothing curve, I think...
This perhaps is extremely complex to code...
Anyway, the loader does already an amazing number of things...
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
Luke I tried loading one of my b3d scenes (created in Giles, 3dworldstudio and Deled) and none of them loaded. The app compiles ok but when trying to load the b3d file it crashes and launches that "dwwin" thingie. To make sure, I reloaded yours and It loads ok. Is there a poly limit or something that may be making my levels crash? Or perhaps only Maplet b3d files are accepted? dunno...any ideas?
EDITED: I thought it was the missin _lm in the lightmaps so I lightmapped my level again in Giles, corrected the lightmap names and re-exported but nothing. Everything loads ok, but then the app crashes.
EDITED: I thought it was the missin _lm in the lightmaps so I lightmapped my level again in Giles, corrected the lightmap names and re-exported but nothing. Everything loads ok, but then the app crashes.
Afecelis: Have you got it to work with other b3d files?, if not you know that you cannot just use the “Irrlicht.dll” with your programs as the Library file and include files are different, so you need to compile the source to get the new library file and change the irrlicht’s include files (make backups first).
If it is only the one b3d file, can you send me the b3d file that is crashing the program?
Edit: try renaming your b3d mesh to test.b3d and run my example
Edit:
dwwin:
http://www.hardavenue.com/a/dwwin.exe.php
Maybe it is dwwin causing the problems?
Hybrid:
Is this what you mean?
http://www.uploading.com/?get=V7TUVLGG
If it is only the one b3d file, can you send me the b3d file that is crashing the program?
Edit: try renaming your b3d mesh to test.b3d and run my example
Edit:
dwwin:
http://www.hardavenue.com/a/dwwin.exe.php
Maybe it is dwwin causing the problems?
Hybrid:
Is this what you mean?
http://www.uploading.com/?get=V7TUVLGG
Last edited by Luke on Sat Jul 22, 2006 12:59 pm, edited 6 times in total.
-
- Posts: 518
- Joined: Tue Mar 29, 2005 9:02 pm
- Location: Alex,Egypt
- Contact:
Luke good luck,that very good work ,hope that you can finish this project.
Magic 2d Library For Irrlicht : http://www.freewebs.com/bcxgl/index.htm
http://www.freewebs.com/bcxdx/index.htm
http://groups.yahoo.com/group/bcxdxc/
http://www.freewebs.com/bcxdx/index.htm
http://groups.yahoo.com/group/bcxdxc/
@Luke: yup I recompiled the engine using your source and I'm using the proper dll (btw, do you have an MSVC project as well?). Your file loads perfecly ok and i tried 3 different b3ds of mine.
Here's a shot of my b3d as seen in blitz3d:
and here's the file for you to test it out:
http://afecelis.gdlib.net/Blitz3d/mymap.zip
here's the temple scene I created for Irrlicht loaded in blitz as well (couldn't resist trying it out in blitz3d!!):
and here's the b3d file to try (also crashes):
http://afecelis.gdlib.net/Blitz3d/temple02.zip
and finally, here's the 3rd file. A test model I created to lightmap in Giles and load in blitz3d:
b3d file here (also crashes):
http://afecelis.gdlib.net/Blitz3d/hallway.zip
Here's a shot of my b3d as seen in blitz3d:
and here's the file for you to test it out:
http://afecelis.gdlib.net/Blitz3d/mymap.zip
here's the temple scene I created for Irrlicht loaded in blitz as well (couldn't resist trying it out in blitz3d!!):
and here's the b3d file to try (also crashes):
http://afecelis.gdlib.net/Blitz3d/temple02.zip
and finally, here's the 3rd file. A test model I created to lightmap in Giles and load in blitz3d:
b3d file here (also crashes):
http://afecelis.gdlib.net/Blitz3d/hallway.zip