Page 1 of 2

What map format would you recomend me?

Posted: Wed Jun 11, 2008 7:04 pm
by Gogolian
Hey, i'm searching for a map format that would be:
a. light
b. license -> free (or other good ;) )
b. not necessarly contain any additional data
c. collision works ;)

For now i've been using md2 (only for learning and trying several things) but it has disadvantages like:
1. It was done to low-poly models so it has limit to polys
2. It is animation, what means i have 245 frames but i need only one.

I tried with .x but collision seems to be broken
When i built .bsp map the size grew from ~0,5Mb (md2) to ~10Mb (bsp)

I wonder if there is any simple format that Irrlicht supports for maps.

Say, what do you think of it.

Posted: Wed Jun 11, 2008 9:22 pm
by arras
I say: what the hell are you doing out there? You do collision in Irrlicht and once your file is loaded in to Irrlicht it does not matter what file format it comes from.

If you do not mean Irrlicht than you are posting in wrong forum :)

As for light, Irrlicht does not load such data with may be exception of irr file. You have to set up your scene anew.

All formats Irrlicht supports officially are free to use up to my knowledge.

Posted: Wed Jun 11, 2008 10:41 pm
by Gogolian
sorry i mean lite ;) Means the file, after loading get's less size stored in a memory (yeah i know it depends mostly on polys), maybe filesize either.

I read while ago (i may f** up sth cause my memory is low ;) ) that pepole had problems with collisions while loading files with extensions .this or .that.

I know it is weird, (i also think: "wtf but it is the same mesh, after loading should be the same") but when i loaded .x file collisions were... well there was no collisions ;)
(Maybe i f** up something in code i'll check it later, but i think it's not it)

About formats:
As far as i know (tell me if i am wrong) 3ds is commercial format. You cannot use it in commercial projects until you'll pay.

But that won't solve my problem: which format should i choose for maps ;)
(mean terrain, rooms, ect)

Posted: Wed Jun 11, 2008 11:12 pm
by B@z
the bsp format is popular. check the tutorials.

or maybe you can write your own format too (it shouldn't be too hard i think)

Posted: Wed Jun 11, 2008 11:54 pm
by Gogolian
well, a friend of mine, wrote his own format for his project (on end of his studies) i think it was JAVA project. I'll talk to him, maybe something will come out of it.
But there will be few problems like integrating it with both Irrlicht and Blender. (Python sccripts, ugh!)

I already thinked about bsp. But as i said before it is large... Well whatever...
For now i think i'll stay with md2.

If anyone has any good ideas i'd be happy ;)

Posted: Thu Jun 12, 2008 12:10 am
by rogerborg
Gogolian wrote:sorry i mean lite ;) Means the file, after loading get's less size stored in a memory (yeah i know it depends mostly on polys), maybe filesize either.
It depends entirely on polygons (and whatever triangle selectors you choose to create). Larger filesize is in general better because it tends to indicate simpler (and thus faster) loading.
Gogolian wrote:I read while ago (i may f** up sth cause my memory is low ;) ) that pepole had problems with collisions while loading files with extensions .this or .that.
Image

Posted: Thu Jun 12, 2008 1:11 am
by Gogolian
Well, sorry I'm from Poland, I can't tell my english is very good but i think it could be worse...

I am currently trying with OBJ files, and:
I have 2 (same) meshes one stored in md2 file, and one in obj.
When i load md2 - collision works.
When i load obj - nope!

I haven't searched forum for this problem yet (but i going to do it right after i post ;) ) but it IS weird...

Posted: Thu Jun 12, 2008 7:11 am
by arras
There was temporary problem with x file because bounding box was not created properly and thus there were all sorts of related problems, collision included. This was due to Irrlicht 1.4 introduced new animation system and as much as I know it should have been fixed in Irrlicht 1.4.1. hybrid would probably know more. Other than that, rest of formats should work properly and if you are encountering problem with one of them, report it in Bug reports forum ...properly documented of course. To easily test your file in Irrlicht, load it in to mesh viewer which comes with Irrlicht. You can turn bounding box vissible there.

I don't recommend using 3ds because Irrlicht does not create normals properly for it, due to format limitations and your node will not have normals smoothed.

Posted: Thu Jun 12, 2008 8:09 am
by hybrid
Yes, .obj and other static formats had problems in Irrlicht 1.4, but basically just because of a slight glitch in the underlying SAnimatedMesh structure. One could work around that problem by carefully using the SMesh explicitely by calling getMesh(0) somewhere in between. Or use Irrlicht 1.4.1 which has this bug solved.

Posted: Thu Jun 12, 2008 12:28 pm
by Gogolian
Yes, i forgot to mention that yesterday i managed to get rid of collision problem.
I had:

Code: Select all

createTriangleSelector(mesh, node);
where mesh is terrain mesh, and node is created from that mesh
I changed it to:

Code: Select all

createTriangleSelector(mesh->getMesh(0), node);
and now everything seems to work fine.

I think i'll stay with .obj files because filesize is small and it seems that loading is fast too.

I just hope .obj file format is free ;)
I'll check that later...

Posted: Thu Jun 12, 2008 12:43 pm
by JP
yeah you really dont want to use md2, as far as i know it's really only meant for animated characters and as you know it has severe limitations on the number of polys you can have and the quality is pretty poor, such as normals... you can only use specific normals from a list so they won't be perfect for your purposes. It seems like quite a genius file format for the Quake 2 era but we've moved beyond the limitations set by that era and don't need to pack model and animation data into tiny file sizes etc.

3DS might be a decent format to use but if OBJ is working for you then just stick with that.

Posted: Thu Jun 12, 2008 1:27 pm
by Gogolian
Yeah, but...
Is 3DS free format?
I heard that if you want to use it for commercial projects, you must pay, cause its owned by 3d studio max.

Maybe I'm missunderstooded. Does someone know something about it?

Posted: Thu Jun 12, 2008 3:40 pm
by hybrid
No, any format is basically free, unless it uses some patented algorithms inside (remember the gif problems?). But 3ds, obj, and AFAIK all other formats currently supported by Irrlicht are completely free.

Posted: Thu Jun 12, 2008 3:54 pm
by JP
yeah and 3ds, along with most of the other formats supported by irrlicht, are used in freeware such as model viewers and the like so i imagine there's no limitations on them if other people get away with it.

Posted: Thu Jun 12, 2008 9:28 pm
by Gogolian
Ok, thanks very much, i must beat my friend for mistakin me ;)

And... I just gotten a job in pizzeria so i probably won't be able to be here so often, sorry Irrlich community ;)