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:

normal problem

Post by juliusctw »

hey luke

about the normal problem, dont use cntrl n, it won't work for all mesh,

try in edit mode, ctrn tab -> face
choose the face you want to change by "right click"
press w
choose flip normal


Edit: Is it just me or the x format won't let you get the joint Node???? :? , that kinda make the x format subpar to b3d
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Juliusctw:


Thanks for the mesh (It already helped me fix a small uv bug)


I exported it to b3d and the animation seems fine but there is a problem near the knees.


See:

Image

But it might not be my exporters fault because changing edit modes (Not sure really want I did :lol:) in blender I got the same thing:

Image


Is it just me or the x format won't let you get the joint Node????, that kinda make the x format subpar to b3d
I’m not sure what you mean?
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

hum.........

Post by juliusctw »

hum........

That didn't happen in blender when i animated it :( . I should probably look into that.

Do you mind sending your b3d loader to the gmail account, i just want to play with it, it might be good enough for my needs for now.


Anyway, what i meant about x format, i was reading the api, and it didn't seem to have a setjointToMatrix type of command, so i concluded that you have no joint control for x in irrlicht similar to what you have in b3d.

Or am i just missing the method completely?
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

juliusctw:


In blender open your mesh, go to Weight Paint and draw around the knees, then undo it, and the problem appears, strange?


Ok I sent you the exporter, Vermeer, do you want me to send you it too?
Anyway, what i meant about x format, i was reading the api, and it didn't seem to have a setjointToMatrix type of command, so i concluded that you have no joint control for x in irrlicht similar to what you have in b3d
.Yeah your right about X meshes, but it can be added (I think there some patch), Also again don’t use AddMatrixToJoint with b3d use the other method I was talking about.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Julius: ctrl+n must work with every correct mesh ;)

Anyway, yup, you can go, select all faces, (Luke, you need to be in editing mode. Select th eobject, and then hit tab key ) and just inverte all faces.

BTW, I am not freaking expert modelling in Blender's UI ;) . But I spent too many years of my life intensely modelling in every tool one can imagine, so , it takes me very little effort to model with Blender too...I mean, most of those operations in Belnder are pretty similar to "general" 3d, and usually, "invert normal" is at every UI...

Anyway... The problem not only appears are "inverted normal".Sometimes, is, as I mentioned, face order changed.Visually,can look the same glitch, but internally is not am afraid.

Double facing also occurs: there are two sides , two walls, pointing normals of both opposite, or even in same way.

Is a problem. There are tools (great metasequoia comes to mind) to fix this pretty well.

3d Exploration will fix the face order problem , it has the feature in the tools menu section. It's full for 30 days, and after that, wont export. (besides legal issues in all the period and after)

Imo, yup, is a case of normals or face order.

mine inside out...no...surely my der ton script already setup with and inverted normals inside the script, or default setting...OR...the other meshes of the other persons are bad inside out... ;)

I say this as I am checking..-see here- and seems normals are ok...

Image

hmm...
try to use the script embeded in my scene, with other characters...from the other ppl. A way to do this can be just save as text file from file editor window where you see the derton script ...load one of those guys scenes....and now load the text file you saved from my scene. And then alt+p to execute from text editing window, as allways.

Anyway, digging in the script...

seems the md5 one actually breaks when sees different normals values for same vertice...dunno, I thought it was impossibl ein blender yet...but the option is there in the script...

Btw, with other code , not irrlicht, we experienced md5 output this worm correctly, no inversion in the mesh...That I can remember...

I exported that worm and box to obj format, (and showing normals in unwrap3D), it seems to be inside out.
beware.I'm an old user , very old , of Lithunwrap, and then since first version of Ultimate Unwrap...the import may have some viewing glitches. But internal data is perfect. Knowing, is no prob. Anyway, for x format, Ben needed to make certain changes for specially Unwrap3d load it well...Just to mention ;)

besides, a weighted mesh in Unwrap3d, wont show correctly.Is a known glitch, but I know pretty well internally is intact.Must be something bout the opengl viewer. You export the x file again, and is seen perfect in any x viewer. Or b3d viewer. Vertex based animation formats have stronger probs there...ie, md2.

Often , a weighted format apears in unwrap 3d inverted. But best is to check in a different viewer, as maybe is just UU making the flip.None of these are issues, as UU is such a 3d swiss knife for 3d operations, you can fix there whatever. If actually invert does not happen in other tools, and this can be fixed by the user just with and invert normals in UU, and weights or animation -once exported the b3d or x file, and seen in a different viewer with no glitches, then I wouldnt worry.You can support also tools specific stuffs till that point... Specially when the user workaround can be tested to work.
I had trouble exporting it using other formats, what formats work well?
General advice here is allways go to author's page script, and download the latest for the latest blender. And open in text editor, hit alt p.
As many formats are with probs in the native distribution, or dont have the improvements of newer versions, for not been comitted, or whatever the rules there.

Also, with bones and weights, few formats. I think...mainly cal3d, x's Ben (for latest 2.4x, I mean .Jox one was very good too) and one of my favs, this der_ton md5.

For statics, OBJ tends to rule.

for vertex based animation, md2. I have one of md3 with animation, but is tricky for a quality result.
but this is of no interest for the case.

Also when I press ctrl+n after I’ve selected all, nothing happens, any mode I have to be in, or something? (I’m hopeless at blender)
I understand the feeling. i was so too at first... Just you need to: -select the object first, in object (default when you start) mode(you will see a pink dot in the center of the worm), -hit then tab key , now if you hit a key, all becomes yellow, may you be in face, vertex or edge mode... -Now with all yellow, hit ctrl+n , then you must click over where says "recalculate normals outside" just move the mouse cursor till you hi light that sentence in the pop up thingie, and then click.

Actually, you can just select all with A key, and then W, then choose in the pop up menu, "flip normals" .You can do this too through the "edit" buttons panel.
Many mesh level operations, most, must be done after hitting tab, that's edit mode.
Do you have an animated character that’s been designed to export into a game?
there must be some, somewhere..dehenton I think put an url of model s he made in x and blender format, for irrlitch...
The worm mesh is good be I’d like to test something more complicated, and a different mesh.
it indeed have the constraints, which not much game meshes include...I made the worm for a project of mine where I neeeded all character animation essential features, so if the worm works... ;)

But is a good point to test more meshes. I'll send you one in case if I found it.
Yup, send me(I'll pm you an email of mine) too the file, it can be useful for me to other projects (i do all my 3d stuff and game stuff with only a friend, and we're not using irrlicht (for no special reason. irrlicht would have been as good as any.))

probably is also helps for you to debug it, as If I have a look at what it ouputs, I may give you some suggestion.

Julius, in case of problems, you may try the Ben's original plugin at his site, in my signature.


Luke and juilus: painting weights is known to bring usually problems when exporting to game engines. I got used to use just lasso selections and a lot of back and force tweaking till I get my rig right.

The undoing of weight paint strokes causing surprising effects doesnt surprise me a bit...It happens also in other packages. I suspect the too many decimals precission, and unaccuracy, or bad normalizing, or whatever, wrecks it all up. I prefer lasso. (here you can use B key, for quad selections.)

anyway, remember Unwrap d wont show it well when weighted, it'd be well internally tho. Also, if happens a prob of type left handed <--> right handed conversion, weights will look really weird in UU. happened b4 in old x exporters. Also, the Z up problem was a headache bringer. As well as...tada...! normals, inverted them, or face order.

Is notjust a list of coords, the most complex a format gets, the more possible errors...adn through the years as a an user, I get to know character animation formats -all- are problematic. But they look fantastic in a game when all fixed ;)

And Luke's b3d is my great hope for a multiple scene/character format for irrlicht... (together with the great feeling of being able to export a b3d out of blender...hard edges in smoothing are coming...I dont think either blender will be left without multiple uv channels and lightmap for over...it'll end up coming...And i guess once your b3d format comes to light, in case you're not in the mood, some maintainers will appear, if not even oficial developers will take care of it if the commit ends up happening... (that is, they have some strong rules for accepting something natively in the distribution...besides you find the will and mood to do that extra bit. Absolutely not rquired, every blenderuser out there is pretty confortable with alt p at text editor, I even prefer to tweak settings if possible ;) ...Some tho prefer to have a gui...but even that pops with derton's, after hitting alt p.... ))
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

dhenton's blender models I was talking about... are prepared for x export for irrlicht, I think :


http://s-fonline.com/webhosting/dhenton9000/models.php
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

/OT/
a tut for basic uvs and texturing : http://www.gamedev.net/reference/articl ... le2255.asp
/OT/


julius, the shader?
what do you mean?
in md5 the shader refers to the actual texture...And you need to do some manual text edit for it to export well...

the shader inside blender...well, shaders are usually a prob to export out of 3d tools...You usually just export a material and its texture...check my huge list of tuts I passed you... ;)


This can be highly counter productive but...Well, I owuldnt never ever try to export for games the usual uber complex rigs, in the style of XSI or maya that most good animators in blender do for their hi res projects...but ok...here u have a hi res, hi poly one, very complex rig, of our dear suzanne... :

http://creationanimation.com/sites/thoe ... orials.htm

wow.lol. forget it...I am an enemy of complex rigs for games, tho...they often dont give so much control, while limit in other senses...Nah, my worm rules ;) get it working and we're all safe ;)


here's another in that line(together with a great tut for animation) :
http://mediawiki.blender.org/index.php/ ... _animation

oops, blend file is corrupt..
no, it's ok, is just the first file of both...
(I would have made the feet rig in another way, tho...)

I like ludwig rig.Again. too hi mesh for game stuff, and too much complexity in the rig. I like better this feet rig. Yet tho I use other ways.
http://cs.unm.edu/~sketch/gallery/resou ... udwig.html

Elephant's dream great rig. But again, I love simple rigs, very fast for performance, and very practical. fewer bones, etc, etc.
Also I dont have an outstanding machine... hehe.
And I like "The Way of the fighting Optimizer" ...even if for hi res, not a single tri which could be out... For animation, this sort of optimization becomes handy...
http://orange.blender.org/blog/mancandy-updated

For games, is more than crucial. No one would load with otday's hardware, characters as heavy for games. As much, would build normal maps for them...
For the HW I see today, I'd say passing of more than 5k or 10k tris is go way far yet. Indeedy, for indy games I prefer the 2000 3000 as maximum...of course, depends much on the gaem type and what is being loaded!


Oh, btw, that glitch in knees weighting is...just it got a value too near zero, and it normalized to cero at some point, for picking too small value. happens so at least in many other 3d tools..one of my true reasons to hate weight painting...

I guess in Maya works great.
Finally making games again!
http://www.konekogames.com
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

about the shaders

Post by juliusctw »

hey vermeer
with the shader difference, here's a picture to show it, on the left is what it looks like in maya, but on the right is what it looks like in blender and irrlicht.

i must add the shaders in irrlicht to get it look right

http://picasaweb.google.com/juliusctw/A ... 6546309138

Oh vermeer
that girl mesh is really my first UVmapping that I did ok, can you check it out and give me some feedbacks?? Its in the gmail account.
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

tried to use your exporter

Post by juliusctw »

I can't seem to get it working

when i try to export the girl , the consol says

MemoryError
Can't get traceback


I also saw that it says that "No installed Python found" but I clearly have installed python. How did you guys get python recognized?

I also have a question about not using modifiers, do you mean to never touch them, i use the mirror modifier, so i should just copy/paste and invert now instead??
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Vermeer:



Sorry, the worm is fine, I’m talking about the box the worms standing on, that the box seems inside out.

Thanks, I can do that recalculate normals thing now, but it stays inside out, (for both obj and b3d) but it could be because the box has a negative x scale. The flip normals fixes the box.

About unwrap3d, yeah, it doesn’t seem like animating moving objects and I had trouble with some meshes before but I check all the meshes in another viewer.

I’ll send you the exporter soon, but just I found a new problem with the textures, thanks to the link to the characters you gave me, it should be easy to fix.

Other that bug the characters seem to work fine, yay.


Juliusctw:
i must add the shaders in irrlicht to get it look right

I wouldn’t jump to that ‘extreme’, have you try playing around with your light’s Ambient/Diffuse/Specular colours and the mesh’s ambient/ diffuse/ Emissive/ Specular/ Shininess values. And all so make sure the normal of the mesh are right, and were calculated smoothly (Because the normals don’t look very smooth, what format did you load it with?)

I can't seem to get it working

when i try to export the girl , the consol says

MemoryError
Can't get traceback

I also saw that it says that "No installed Python found" but I clearly have installed python. How did you guys get python recognized?

What version of blender and python have to got, and are you using Linux or Windows?
Try exporting with the md5 exporter, and see if you get any errors?
But really I don’t know much about this.

I also have a question about not using modifiers, do you mean to never touch them, i use the mirror modifier, so i should just copy/paste and invert now instead??
I don’t know much about blender, but maybe when you export you could just make all the modifiers your using real, export the mesh, then undo it?
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

alright it exported

Post by juliusctw »

hello Luke

I finally got the python issue resolved, i guess the latest blender didn't like the latest python 2.5.

Now I have 2 other problems, 1, remember the knee problem we had, i still have that problem, except now its the wrist. The animation itself is great, but some vertices didn't seem to get exported. or something.
The real problem is that when i animated it in blender, i don't see the problem, i even specifically color the problem area with darker weight. Am i just doing something stupid?

i have the latest girl.blend file in the gmail account, you can see it for yourself.

The second problem i have is that I'm not sure how you apply the UV map to the mesh, its just white right now, I have 4 seperate UV map, i think if i try to apply 1 to the head, it would just go to the rest of the body.



oh by the way, it seems that you have been going to the gmail account directly, you don't have to do that, you can treat it as an extra drive in your hardrive.
http://www.viksoe.dk/code/gmail.htm

once you get this, you can drag and drop item in there directly, put in the name and the password and save it.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

juliusctw:

Now I have 2 other problems, 1, remember the knee problem we had, i still have that problem, except now its the wrist. The animation itself is great, but some vertices didn't seem to get exported. or something.
I exported it but I can’t see any problems, maybe you could post a screen shot

The second problem i have is that I'm not sure how you apply the UV map to the mesh, its just white right now, I have 4 seperate UV map, i think if i try to apply 1 to the head, it would just go to the rest of the body.

Is this a blender thing, I’m no good at blender.

But b3d (there a bug in the exporter stopping this but I fix it) can have easily 4 textures on a single mesh.
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

screen shot

Post by juliusctw »

here is a screen shot of what i see, do you have a screen shot of what you see?
http://picasaweb.google.com/juliusctw/A ... 7723829266

Oh, I don't have the latest SVN, does that matter? I'm not sure how to get it
:oops: :oops:

all i did was this, what was your code?

scene::IAnimatedMesh* messs = smgr->getMesh("girl.b3d");
scene::IAnimatedMeshSceneNode* nody = smgr->addAnimatedMeshSceneNode( messs );
nody->setScale(core::vector3df(10,10,10));
nody->setAnimationSpeed(1000);
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

sorry guys

been quite a hard job-week for me...

quite de-motivating too...

I'll be readintg this stuff after having some food...
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 »

juliusctw:


That problem with the character is a little strange, blitz3d loads the character fine, but both unwrap and my loader, have the same problem, I look into it.

Hmmm, some vertices in that mesh have 7 bones effecting them, the Irrlicht loader has no limit, and but blitz3d has a limit of 4, but I don’t think that should cause problems, other then it being a bit slow.


The problem is not with not having the SVN. But if you would the Irrlicht SVN is easy to get as long as you have a fast internet. Search the forums. I find TortoiseSVN a helpful program to use the SVN, but there are other ways. If you use the SNV be careful that you have the right dll, libs, and includes linked to your project.
Post Reply