Is it Posible Loading separated mesh from one file ?
Is it Posible Loading separated mesh from one file ?
Well.. as the title says.... i have a single .3ds file but it contains a whole ambient, not just one mesh... using getMesh(file.3ds); just gives me 1 huge mesh in the screen, but in my project i need to display some info on diferent objects when selected, if i have just one huge mesh i cant tell wich object is being selected, thus i cant dysplay the corresponding info, is there any way to separate the objects in my .3ds ambient into separated mesh's from inside irrlicht or do i have to separate em outside and put one by one into the scene?
Thanks in advance
Thanks in advance
Please take a look on my code :
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=27021
You can add in irrEdit :
* Mesh // no collisions applied
* OctTree // collisiona applied
And later give an unique ID or Name for each object and later from the code you can take an ID or Name from file.irr (it is XML try to open it in Notepad
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=27021
You can add in irrEdit :
* Mesh // no collisions applied
* OctTree // collisiona applied
And later give an unique ID or Name for each object and later from the code you can take an ID or Name from file.irr (it is XML try to open it in Notepad
OK, i think meshbuffers is just about what i was looking for, let me see if i got it right.... i create an IMesh from my .3ds file..... then check how many individual mesh's are in it (getMeshBufferCount()) and then i can accses em one by one using getmeshBuffer()
it doesnt sound so hard..... thanks for the reply
it doesnt sound so hard..... thanks for the reply
About the use of .irr files.... id really really like to avoid it ar least.... avoid using irredit cause the one making the models isnt me... what happends is this:
the proyect is some sort of navigator.... its gonna be used to check the design of electrical substations.... the "production pipeline" works like this...
someone (probably the client's workgroup) is making the 3d modelling in an architecture program(allplan) it has to be that program cause it has some features they need for other part of the proyect, then the models have to go... as directly as posible to the navigator.... so if i establish that the models have to come from irredit.... it means that they have to learn irredit, not only that.... it also means.... that the work has to be double.... makin the scene in allplan and makin the scene in irredit.... plus ... so far i havent been able to dislay any of the models from allplan in irredit.... it...loads but i cant see em...
anyway... thenks for the reply
the proyect is some sort of navigator.... its gonna be used to check the design of electrical substations.... the "production pipeline" works like this...
someone (probably the client's workgroup) is making the 3d modelling in an architecture program(allplan) it has to be that program cause it has some features they need for other part of the proyect, then the models have to go... as directly as posible to the navigator.... so if i establish that the models have to come from irredit.... it means that they have to learn irredit, not only that.... it also means.... that the work has to be double.... makin the scene in allplan and makin the scene in irredit.... plus ... so far i havent been able to dislay any of the models from allplan in irredit.... it...loads but i cant see em...
anyway... thenks for the reply
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Please note that 3ds might not be the best format for this kind of export. Because groups, hierarchies, etc. are not supported for that format. You could use .obj with the latest SVN trunk code. Gives you group support, very good material support, smoothed vertex normals, ... And there should be a pretty good export from MAX to .obj.
ok.... certanly it might be a good idea to change the file format for the proyect.... but as i mentioned earlier... im not making the models.... its true that its me who has to set the rules to make those models for them to run properly in the navigating app.... but there are a few things to be aware of:
Since this is not a home proyect.... if the models have to go through MAX... the client has to have an enterprise license for max... an since max isnt the prymari modelling aplication the ( not cheap at all) license would just be used to export from .3ds(allplan) to .obj or .irr or whatever format is needed, currently im using MAX for exporting on my work computer but id rather use blender for the final version since in blender i can import .3ds and its free so the client doesnt need to buy a expensive license just for exporting models, my problem is that so far none of the blender models dysplay correctly in my test apps... so... if its absolutely necesary... ill use MAX, but id rather not to....
having said that...
-Using blender: is there a way to export scenes to .irr ?
-Using MAX: is there a way to export scenes to .irr ?
if there is no way to do so... what file format would be best(of the ones exported by blender) to use with irrlicht?
Thanks In Advance
Since this is not a home proyect.... if the models have to go through MAX... the client has to have an enterprise license for max... an since max isnt the prymari modelling aplication the ( not cheap at all) license would just be used to export from .3ds(allplan) to .obj or .irr or whatever format is needed, currently im using MAX for exporting on my work computer but id rather use blender for the final version since in blender i can import .3ds and its free so the client doesnt need to buy a expensive license just for exporting models, my problem is that so far none of the blender models dysplay correctly in my test apps... so... if its absolutely necesary... ill use MAX, but id rather not to....
having said that...
-Using blender: is there a way to export scenes to .irr ?
-Using MAX: is there a way to export scenes to .irr ?
if there is no way to do so... what file format would be best(of the ones exported by blender) to use with irrlicht?
Thanks In Advance
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Well, Collada would be a way, because Collada also loads into scene nodes. However, there are still several bugs in the current SVN version of the loader. So I just cannot tell you when the loader will work correctly, but once you can load your models with it you will have them separated automatically (and blender does export Collada).
pc0de is writing an irr exporter for blender, the code is public but was discovered before being officially announced, so it's probably not yet complete.
It's worth looking into though, in case it is usable enough for your needs-
http://code.google.com/p/tubras/wiki/irrb
It's worth looking into though, in case it is usable enough for your needs-
http://code.google.com/p/tubras/wiki/irrb
Sorry about the long weekend, i had to pay attention to some other things in the proyect.
i've been reading about meshbuffers.... and in the documentacion says:
"Struct for holding a mesh with a single material"
This means that the models in my scene are separated into diferent meshbuffers depending on the material.... meaning that if ... say...
i have an object.... that is composed by more than one object and i join em into a single mesh, but having diferent materials for diferent parts of the object..... ill get a diferent meshbuffer for every materiali use?
Anyone knows how this works? or where can i find further documentation on the engine API?
I particularly liked this option cause i get the chance to do some AI (even if its really simple)for model recognition
Thanks in advance
i've been reading about meshbuffers.... and in the documentacion says:
"Struct for holding a mesh with a single material"
This means that the models in my scene are separated into diferent meshbuffers depending on the material.... meaning that if ... say...
i have an object.... that is composed by more than one object and i join em into a single mesh, but having diferent materials for diferent parts of the object..... ill get a diferent meshbuffer for every materiali use?
Anyone knows how this works? or where can i find further documentation on the engine API?
I particularly liked this option cause i get the chance to do some AI (even if its really simple)for model recognition
Thanks in advance
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Yes, a meshbuffer will only contain the poly faces which have the same material. If a vertex shares several materials it has to be duplicated into several buffers. The several buffers are grouped inside of a Mesh, which defines a complete object with several materials and material types etc. However, not all faces with the same material will go into the same buffer. Especially for animated meshes, there will be several buffers with the same material, because mesh buffers are also used to subgroup polygons (e.g. for animating them separately).