Meshbuffer name same as blender material name?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Meshbuffer name same as blender material name?

Post by 3DModelerMan »

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 :D .
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

No, meshbuffers don't have names, and any groups with the same texture will probably be merged into the same mesh buffer for performance reasons.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It's far easier to test it out, maybe you don't even get the object properly exported. So asking would be pointless. Do your very best and show us the results. If they don't do what would be expected we can suggest better ways.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Also, this topic should be in beginner's help, not off-topic.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Beginers help?

Post by 3DModelerMan »

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.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
oldskoolPunk
Posts: 199
Joined: Wed Nov 29, 2006 4:07 am

Post by oldskoolPunk »

gandaldf's b3d exporter retains material grouping when imported in irrlicht ! :D

But you access it by material(n) , not by names lol.
Signature? I ain't signin nuthin!
zillion42
Posts: 324
Joined: Wed Aug 29, 2007 12:32 am
Location: Hamburg, Germany

Post by zillion42 »

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...

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"
	}
any suggestions ? Any other importer capable of doing that ?
Spawn
Posts: 9
Joined: Wed Feb 04, 2009 9:19 pm

Post by Spawn »

Don't use the obj exporter. Go ahead and open it up in notepad, it saves the number or vertices and their locations. Use 3ds
Post Reply