omaremad, about your importer modification

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

YEEHAW! (sorry hadn't seen it in time: seems bitplane provided with a full sample)

Hey, let me know if I bug certain core member, the only which I know from core team..He asked for some advice related to workflows in game art in certain other forum where he was a bit anew...I mean bug him to integrate this in the OBJ loaders (even if not possible with the complex GUI that has the blender's one, still, is not the fist time, and wont be the last, that 2 loaders appear in import menu in Blender...(ie, directx 8 and 7. ))

bcause the thing is they go changing constantly the internals in blender, and often the authors gotta be aware of those changes...once it gets integrated (with proper credits to author and gpl license, I guess) , then is their duty to maintain according to internal code changes...

If that is ok with you, I will just try to convince him so he proposes it. If not, great however ;) Der_ton keeps his plugin external, but i yet can't understand why... (I mean, why, unless is his desire...most other good plugins get incorporated, unless are very propietary formats or the like... )

It's 2:00 am here, but will try fast b4 going to bed... ;)
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

oki... when load an object and fails for sth... later on appears allways the error message of character unwanted in file name...

and if I just don't hit the buttons of import and browse, I just paste the path of folder, and paste the obj file name, in file name entry field of that dialog, then it works, but is giving this error even with simple objects :

Total objects: 7
Traceback (most recent call last):
File "trying.py", line 395, in load_obj_ui
File "trying.py", line 336, in load_obj
IndexError: list index out of range

all are uvmapped...

ok,scratch that of the dialog window import button, I was handling bad them...

the thing is a simple torus uvmapped in wings does not give an error in your importer...

can be numbers with too many decimals, or too big...
also, seems the hard edges affected faces get a normals flip only seen in render...this can be an split edge problem in 2.48a, not your importer...

the recalculate normals outside wont fix it...

lastly, not so biggy, but can be in the kind of more real life models like the one I don't know if I can send you as is gonna be paid by sme few bucks by someone...and I think they wanna keep model secret...butis a character model with several objects, weapons attached, hard edges, uvs, etc.It gives error even just human body, so I think prob is there. I mean, in that one the list index error os there, but, in this one and all models, wont read or sth the mtl file: material textures arent displaying, you need to ad in UV image editor of blender, while regular OBJ importer does put them inplace just in import.

the things is *.mtl file seems pretty correct: myguess is problem is , in any obj loading, in the way textures are listed, or sth, in the matter of materials asigning...

oh...shading was like...without volume..then I realize...opposed to any object in blender, it appears, once in edit mode, after mesh tools tab, after uv calculation, in "texture face" tab, it's marked collision, instead of "Tex".Marking viewportshading of the object comes to normality...

ok, is not edge split problem...tried with an upvmapped (but no texture asigned!) sphere of blender... added sharp edges via modifier...no black faces...but happens with the importer imported objs. It does works wel tho with regular importer of OBJs.

I guess there what happes is...well edge split does actuallys separate vertics, as I was fearing, is not cool handling of normals, it just breaks...if you apply, two verts coincident appear in every hard edge vert...not good for weights formats exporters like x, but some have a trick for this, and I will worry about it in other moment -is a general bledner problem- .The thing here is, maybe...the two generated overlapping faces, or vertices are having their normals opposite? that'd explain why flip normals nor recalculate outside fix it... in render, that is. Viewport shows good.

and is not double sided faces button, nor "no v. normal flip " button....
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

ouch

too tired, really need the bed...

there's no normals issue I guess

just was having a light really bad placed...


so, remaining possible probs :


-list index error (not with the torus, but my very complex model (not hi count, is not more than 4,000 tris, but several objects, complexhard edges, Uvs, etc. )) (i did clean up function in wings, seems there's no remaining short edge, or isolated vert...I triangulate b4 export (btw, I always do...is better to leave that to the artist, not the importer...))
Can be weird geometry...or out of range values in scale or number of decimals...os some ascii character /syntax(or tag) of obj unwanted....

-mtl files not read, or just after read not asigned the tetxures....

-sometimes like gives an error when alt+p again to import an other obj. In here, now is fixing it by clicking "reopen" in text editor of blender, the python script.

-it starts with the mention "tex" not marked, in edit mode tabs... which makes it look like has no volume, no normals, or you are in texture mode. Clicking tex (leaving or not collision on) at "Texture face" tab, fixes it.

Sorry, always giving bad news...I'd understand if you'd be tired already...
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

will cotinue tmorrow...
Finally making games again!
http://www.konekogames.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

I get the black "no volume" faces , they disapear when the mesh is "touched" by a modifer(edgesplit) / vert positiong so i think its a blender update viewport thing.

Bitplanes mesh imports perfectly, but its only a single part. I have not tested multi part meshes. Please provide samples and ill try and fix it ;)
Image

I guess there what happes is...well edge split does actuallys separate vertics, as I was fearing, is not cool handling of normals, it just breaks...if you apply, two verts coincident appear in every hard edge vert...not good for weights formats exporters like x, but some have a trick for this, and I will worry about it in other moment -is a general bledner problem- .The thing here is, maybe...the two generated overlapping faces, or vertices are having their normals opposite? that'd explain why flip normals nor recalculate outside fix it... in render, that is. Viewport shows good.
Thats how the graphics card and most engines handle the vertices, if a vertex has more than one normal/uv they need to be split anyway (especially since most game formats dont have smooth groups), the trick is to have edgesplit modifer but dont apply it until you export, this allows you to edit with a complex vertex as one vertex. Splitting is fine for weighted and skeletal meshes since the two new vertices will have the same wights and bones assigned= same math = same position.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

omaremad wrote:I get the black "no volume" faces , they disapear when the mesh is "touched" by a modifer(edgesplit) / vert positiong so i think its a blender update viewport thing.
I discovered in some cases is only solved when in editing mode putting "tex" clicked, not only collision. But one way or the other, is easy to check that all info is there.
Bitplanes mesh imports perfectly, but its only a single part. I have not tested multi part meshes. Please provide samples and ill try and fix it ;)
Yep, here an uvmapped single torus imports well...just not with the textures (no probs to asign by hand, yep a prob in an obj with 40 textures... ;) , but no biggy, anyway :) )...I'll pass it to you as well...I have a complex model around...but need to send it to you by mail, if you have an account... I will PM you would be ok to receive it by that way :)

Thats how the graphics card and most engines handle the vertices, if a vertex has more than one normal/uv they need to be split anyway (especially since most game formats dont have smooth groups), the trick is to have edgesplit modifer but dont apply it until you export, this allows you to edit with a complex vertex as one vertex. Splitting is fine for weighted and skeletal meshes since the two new vertices will have the same wights and bones assigned= same math = same position.
hmmm...very important info which I wasnt aware of (long time MAXer, stuff was very different...)... I suppose I have very bad experiences long in the past (there was no split modifier) while testing ben's x exporter for blender... (only weights and bones exporter by the time!) in '02.. The exporter had probs if double vertices found. But sounds a lot like is not issue anymore, as effectively, with edgesplit unapplied, looks like vert is functionally not separated, and/or as yousay, vertices are treated equally...

Ok, I will PM you now, as I don't know if the mail you have set here, is the one you'd like to use for this...So to send you the complex model.
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

i comfirm it, with my simple torus, adding edgesplit modifier fix viewport object shading. It's not unfrequent these things with an obj import in blender.
I wonder why tetxures are not there...however, uvs are. and...I see in console one message that may be is not important, but I will put to you just in case (but import is successful):

0.8174 sec
Total objects: 1
scene.link(ob) deprecated!
use scene.objects.link(ob) instead
Finally making games again!
http://www.konekogames.com
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

The exporter doesnt read mtls, ill add that in. but it might be after the compo depnding on how hard it is.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

omaremad wrote:The exporter doesnt read mtls, ill add that in. but it might be after the compo depnding on how hard it is.
Okedoke, whenever you feel in the mood, zero hurries and thanks a lot once again! :)
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

ok, list index error was my fault..all the time i was with a non uvmapped version, argh...

omaremad is looking at some extra details... :)

gonna have sth to eat... later will check again.. :) All comunication vias ;)
Finally making games again!
http://www.konekogames.com
Post Reply