I have a blender material that I want to get as a meshbuffer in Irrlicht. The blender material is called "grass" and there are a couple other materials in blender. When I export to .obj will those show up as Irrlicht meshbuffers with correct mapping?
Thanks .
Meshbuffer name same as blender material name?
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Meshbuffer name same as blender material name?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Beginers help?
I thought that since it had to do with blender I should put it here, sorry.
I've never seen how to get a pointer to an IMeshBuffer so I thought that I would ask you that here, I have the mesh buffers set up in blender but I want to manually load the textures so that I can make sure the file path is right.
I've never seen how to get a pointer to an IMeshBuffer so I thought that I would ask you that here, I have the mesh buffers set up in blender but I want to manually load the textures so that I can make sure the file path is right.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 199
- Joined: Wed Nov 29, 2006 4:07 am
That is a very interesting question indeed. Or rather it would be nice if not meshbuffers but at least SMaterials would have a name... I tried exactly that, to find there is no information left whatsoever after exporting except the index, in my case with another B3D exporter... The reason that would be very useful, is that it would enable us to set different irrlicht materials based on the material name in an automated way.
The only two other solutions that come to my mind would be writing an xml exporter for my 3d application or to determine the material type based on the diffuse texture name.
The xml solution is probably the best, since it could carry material type, relative translations of objects and all sorts of other useful information, is also the most difficult to implement.
The second solution, determining material type based on diffuse texture name, automatically sorts my texture names in a nice fashion, but it's in fact very 1980's...
any suggestions ? Any other importer capable of doing that ?
The only two other solutions that come to my mind would be writing an xml exporter for my 3d application or to determine the material type based on the diffuse texture name.
The xml solution is probably the best, since it could carry material type, relative translations of objects and all sorts of other useful information, is also the most difficult to implement.
The second solution, determining material type based on diffuse texture name, automatically sorts my texture names in a nice fashion, but it's in fact very 1980's...
Code: Select all
scene::IAnimatedMesh* testcubeM = smgr->getMesh("../data/testcube.b3d");
u32 MbCount = testcubeM->getMeshBufferCount();
for(u32 i=0; i<MbCount; i++){
scene::IMeshBuffer* currBuff = testcubeM->getMeshBuffer(i);
video::SMaterial currMat = currBuff->getMaterial();
"string name = currMat->getName()"
"if(name.startsWith("BLABLABLA") change material to BLABLABLA"
}