Obj, again

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Obj, again

Post by BlindSide »

Ok, I know OBJ files have been giving you guys a hard time recently, but it seems the problems aren't fully sorted.

Image

Top section shows wireframe in blender, everything appears in order. Bottom half is the view in Irrlicht, tested with OpenGL and software drivers.

Something is wrong with the indice loading or meshbuffer splitting, although it's probably unrelated to the meshbuffer splitting as the problem still existed in older revisions (Lets say around 1600). Do note that some of the meshbuffers in this model do exceed the 16-bit indice limit, but no warnings issued in the latest revision of Irrlicht (Pre-splitting revisions would complain of primitive count of course).

Heres a link to the file before I forget: http://www.fabianowski.eu/scenes/conference.zip
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, the bug is indeed an index overflow. You can work around this problem by adding groups (which are smaller than 65k vertices per group). The thing is that we don't create a new meshbuffer per 'usemtl' statement, as this would result in very small buffers. But we also cannot decide which grouping would be best, so the modeller should do so. Automatic mesh splitting would at least create imbalanced groups on the average.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Ah, I think I get it now. I guess I got a little too excited at the prospect.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Once we have the 32bit meshbuffers cleaned up we might give some means to choose those as the underlying structure, which would also remedy this problem. But right now (and for optimal performance also later on) all meshes need to be prepared by the designer. But ti should become simpler with each step, at least you have some simpler ways already (before you had to create new materials for each meshbuffer, now you only have to add groups) :D
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

You're right, I think I get it now, you split at the OBJ groups. I wish I understood the obj format a little better because assigning different vertex groups in Blender didn't seem to remedy anything (I guess because I am supposed to split into different selectable objects or something), infact the crappy Blender exporter decided to mess things around a bit and cause Irrlicht to autoload some textures which don't exist (Which is pretty neat btw, I didn't know it was possible with OBJ).

I am curious though, why is it not spitting out anything about the indices after updating, did you disable the warning?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I did not find the proper place to warn about such things, yet. The warning was generated by the driver before, but it also prevented the use of 32bit indices at all :roll: So I simply removed it and now it's not warning anymore, but tries to render things which are broken then. We'll have to clean up some more things with 32bit indices before everthing will run as expected...
Post Reply