Made a B3D Loader

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

you can use this one

Post by juliusctw »

here is a very lowpoly ginger breadman i made using the tutorial, it is rigged and it animates a walk sequence

http://www.freewebs.com/juliusctw/gus.blend
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

general question for vermeer

Post by juliusctw »

hey vermeer

I just have a general question for you about UV mapping, i have been using blender and I can kinda model human, I know how to use the UV mapping and export the map, but I cannot find any tutorial to teach me how to draw Human faces realistically using gimp or any other app.

I can draw them, but they look pretty bad, how did you learn it?? any books i can buy?
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Juliusctw:

Thanks for that ginger bread-man, very helpful.


Vermeer/Juliusctw:

That ginger bread-man juliusctw posted, seems to have virtual modifier on it making it smooth, if I export it straight a way to b3d it comes up as a very low poly ginger bread-man made of cubes. If I press the “Make Real” button and then apply in the modifiers tab it turns out fine.
Is that ok, or should my exporter use the virtual modifiers somehow.

Edit: I finally got a static export to .x to work, and it seems it is using the virtual modifiers, is this important?
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

modifier i used

Post by juliusctw »

yeh
in the .blend file, i used this blender specific modifier "smooth" which automatically smooths the cube. imo the modifier is used rather often in the tutorials i have seen , it might be something to look into. But vermeer would be more of the authority to answer that.


this is just an observation

It seems to me that with this skeleton animation, we can make any rigged mesh do anything using a series of setRotation, setPosition. As long as we keep the naming convention of the joints constant, we can use the same walking/running/jumping sequence on any mesh. Has anyone ever considered just storing these sequences on a seperate file and read it in realtime. This file could contain every imaginable animation and it would save us memory (since b3d files now no longer need to store any animation info) Still a noob at this, but if that's possible, i'm definitely doing it for my project.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

It seems to me that with this skeleton animation, we can make any rigged mesh do anything using a series of setRotation, setPosition. As long as we keep the naming convention of the joints constant, we can use the same walking/running/jumping sequence on any mesh. Has anyone ever considered just storing these sequences on a seperate file and read it in realtime. This file could contain every imaginable animation and it would save us memory (since b3d files now no longer need to store any animation info) Still a noob at this, but if that's possible, i'm definitely doing it for my project.
That’s easily possible, if you look at the example the walking animation comes from a hidden mesh, which could be any mesh. (It is poorly coded but you should get the idea)

Also the hidden mesh's skin is never updated as node->updateAnimtion(); only updates the joints, so any speed loss will be minimal.
Zoot
Posts: 2
Joined: Mon Sep 04, 2006 8:18 pm

Post by Zoot »

Hey. New arrivial here. I created an account just to participate in this discussion.

First, a solid b3d exporter for blender will make a lot of people very happy. Blender has great UV mapping features and would be great for games, only so far it's been hard to get the models out.

The 3ds exporter is solid, but doesn't support animation. The directX exporter(s) are a little bit unpredictable. B3D is a great format for game stuff, both levels and characters.

In my opinion modifiers should not be applied before exporting. The user can do that manually, and I don't think any other exporters do that.

Anyway, I can make blender models for testing if you want.

Here's three blender files containing a simple mech. No material are applied. http://hem.bredband.net/b120780/mech.zip

The first has parent-child relationships defined.
The second is without relationships, but it's still 8 separate meshes.
The third has a simple T/R/S animation. Press alt-A to play and esc to stop.

Theres a ton of blender video tutorials and other material available here: http://ocw.tufts.edu/Course/28
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Zoot:


Thanks for that mesh,

It helped me fix a bug in the exporter with mesh’s materials.

Right now the parent-child information is not being kept so that first mesh will be helpful for when I write it.

I should be able the start writing the animation code now as fix has caused lots of meshes that weren’t exporting right to be fixed, thanks.
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

thanx luke

Post by juliusctw »

thanx luke for clearifying that

i am going to forge ahead doing research working with this seperate file system, this is how i kinda picture

sceneManager->loadAnimationProfile( fileName)
sceneManager->getAllB3dAnimation();

luke = sceneManager->createBipedalNode(......)
luke->b3dAnimation("RUN")

dragon = sceneManager->createWingedBipedalNode(......)
dragon->b3dAnimation("ATTACK")

dog = sceneManager->createAuadrupedalNode()
dog->b3dAnimation("JUMP")

The amazing thing to this is that the animation is stored ahead of time so artists don't have to do it over and over, Each b3d file will be significantly smaller. As long as the artist follow the naming convention, anybody should be able to load in their mesh, and all the animation would just work like magic.

Of course, defining complicated sequence might become tedious, (like dancing) so perhaps I could "possibly" program a reader that reads in an animated b3d and produce the setPos and setRot requred data.

i'm still a noob but it sounds like a fun project to work on
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Juliusctw:

If you use setposition to the bones in the mesh you will probably want to base each mesh off the same bone structure as its animation.


Vermeer:

Some good news (hopefully…)

I looked into the md5 exporter’s animation and it does appear to simply bake each frame to the file. So you should be able to get the same animations with b3d files as you can get with md5 files. It depends on how the md5 viewer animates the files (Linear/Bezier/etc) but hopefully it should work fine, I could always change the b3d loader if it doesn’t.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

oops...thread has grown a lot..Sorry, been away a bit.

Luke wrote:Wow that first mesh is very high poly, I don’t think blitz3D or Irrlicht can load meshes that high poly. I tried load the exported b3d mesh in unwrap but I gave up after 10 minutes of it loading....
Didnt know, I never downloaded...sorry.. :oops:
juliusctw wrote:hey vermeer

I just have a general question for you about UV mapping, i have been using blender and I can kinda model human, I know how to use the UV mapping and export the map, but I cannot find any tutorial to teach me how to draw Human faces realistically using gimp or any other app.

I can draw them, but they look pretty bad, how did you learn it?? any books i can buy?
Then your question is not how to uv map, but how to draw...
Difficult answer. I have been 30 or so years learning it.. ;)

My advice would be...just pic a photo free of rights, make some filters and changes, draw over it, and wrap it over your UV template. You can also mix several photos of your friends, picking pasrts, doing feathered selections, mixing, changing stuff...Just ensure they don't get recognized!! Even if they agree, they dont know it's a bad thing to have your face photo floating everywhere...

Learning to draw ...heh. You're attacking too much stuff at a time if also want to control this engine ;)

Anyway, I'll answer partially your question(a real answer would require a long talk in a café, and that counting on my short free time...)...I personally like an anatomy book from Moreaux, can't remember the Book's name...

On the inet, is very famous a Loomis book, somewhere...but I saw the pages and am not fan of that.

I don't get into more detail -searching in google- , cause, basically, is all practice/good eye...I have needed a life of practice for my today's skills...

A book wont make magic...

But...many texturers dont know how to draw!! Most of which I know. Today, at AAA companies, they require it. An dthey think their buddies really do have the skills cause they showed em some nice concept art...the true is..they dont. And they still make great textures. Is mro ephotoediting, effects, and filters...mountains of tricks...still way faster than learning to draw.

Is just a random advice, dont take it seriously ;)
Luke wrote:Vermeer/Juliusctw:

That ginger bread-man juliusctw posted, seems to have virtual modifier on it making it smooth, if I export it straight a way to b3d it comes up as a very low poly ginger bread-man made of cubes. If I press the “Make Real” button and then apply in the modifiers tab it turns out fine.
Is that ok, or should my exporter use the virtual modifiers somehow.
No worries...
julius didnt kno...no modifiers when export to an engine..is like the wise advice of compiling the stack in 3ds Max beforeexporting...or plot everything before exporting an x file from xsi...
Make real button is correct. Is a bake. :)
The formats arent prepared to know every specific 3d package feature, they indeed must keep universal, so is b3d, md5 and x. So, as I guessed, nothing wrong in your methods...

Julius, you can just subdivide in the edit(tab key) buttons. Or hit the make real button like he did before exproting...Anyway, am unsure on all those new modifiers, which will/wont cause exporters probs...
julius wrote: It seems to me that with this skeleton animation, we can make any rigged mesh do anything using a series of setRotation, setPosition. As long as we keep the naming convention of the joints constant, we can use the same walking/running/jumping sequence on any mesh
Very interesting, julius. Have been done in many engines, and is done by artists in Max. I dunnot kno never to do anything in code, tho.

reading on real time as u say, woul add a lot of flexibilityu in thegame. But unsure on how hard is it. Maybe wait till the loader is done, then do the extra bonuses :)
since b3d files now no longer need to store any animation info
been done already with b3d engine...so, yep, sounds cool.
zoot wrote:First, a solid b3d exporter for blender will make a lot of people very happy. Blender has great UV mapping features and would be great for games, only so far it's been hard to get the models out.
yup.I mentioned earlier. ;) I kno many ppl will at bb forums among several places...

I hope that of several meshes doesnt mean we loose the single piece, well weighted human model sort of rigging we all love...
Luke wrote:Vermeer:

Some good news (hopefully…)
You sure md5 does bake em?
I thought it was actually just taking ipos info...As the anim files are ridiculously small...even just some tiny Ks...

in any case, you mean baking all bone keyframes(not the mesh vertices)...yep, probably...

test the worm export(from the blend I gave you) with the md5 exporter(is in that text window, already opened, just hit alt+p after clicking there), is prepared for that...you can check in the md5anim exported file what it is actually outputting...the md5mesh I think is the model mesh itself,no anim....

BTW, if is how md5 does, great way to go then... :)
Finally making games again!
http://www.konekogames.com
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Vermeer:

Yeah it seems that the md5 exporter is baking the bone positions and rotations of each frame and letting blender deal with the ipo curves, and anything else that might affect them. There’s a function getIpoValue in the md5 exporter but it doesn’t appear to ever get used.
As the anim files are ridiculously small...even just some tiny Ks
I wouldn’t expect them to be very big anyway, but wait till I finish the b3d exporter, the b3d files should be much smaller then md5 animation and mesh files, as b3d files are in binary.

To give you an example that .md5mesh of the worm is 158 KB (Does that sound right?) and the same mesh in b3d is 44 KB.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

well, if the anim is seen 1:1 in terms of accuracy(more or less) in Irrlicht, and is not too cpu killer in the engine, what the heck, great. As main purpose in going towards b3d in Irrlicht is for less probs than the x format gives...specially with loads(mountains...lorries of mountains) of newcomers...

Also, lots of Blitz3d users(the smaller bunch(but not small) of em which like Blender) are going to love this, and in the future, if not already ...Blitzmax users.

I have read many cries at several blitz forums(and Blender ones!, ie: Elysiun+blender.org ) for a b3d plugin from blender...during years.

Actually, not only in free world, but also bellow 500$ , to me is the best tool for animating characters.
Finally making games again!
http://www.konekogames.com
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Hi,

I’m so close to finishing the exporter, but there is this one bug stopping me from finishing it.

If anyone has any rigged blender characters (animated helpful, but I don’t care about quality), I could use really use them to find the bug, I cannot work out exactly what’s causing it.

Also anyone who is good with matrixes (where I think the bug is) and blender and knows a bit of python and wants to help out I’ll send you the script, just post here or PM me.

Thanks
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Hi, there's something I don't get...maybe you dont have now my worm? It's rigged and animated...a very basic sample, but actually is better for this kind of thing to keep simple.Yet tho, has all essential features in.

Maybe you need soemthing different?

http://www.filesend.net/download.php?f= ... f6113e2e38


der_ton from doom3world.org and blenderartists.org/forum/ may have more than one advice for you...I dunno if I am doing right directing you to him(as I dont know him)...I dont know him actually, but is the author of md5 blender importer and exporter...

I'll pm you the email I have of him, was available publicly once, so maybe he does not attend it much, or maybe yes.

I cant think now of anyone else better than him for an advice about that :)
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

artist/blender ui -wise, beware this , in general was probs with x and others :

-blender armatures have a bone.001 name stuff...that dot messes most exporters and engines.

-same with materials.

-unwelded meshes mess weights calculations. do a remove doubles before rigging in a basic cilinder....building from a cilinder indeeed sould be no doubles already. just add armature and parent (ctrl p) the mesh to it... Blender documentation at blender.org explains it well... surely also the great tutorial afe linked recently where I got so passional ;)

there, I made you a even more basic example, a cilinder, purely created in blender.


http://www.filesend.net/download.php?f= ... afc2631744

anyway, imo making the worm work is safest way...as tests everything
Finally making games again!
http://www.konekogames.com
Post Reply