Jump to content
The Dark Mod Forums

Is it possible to export multiple objects/meshes?


Tinkerer

Recommended Posts

Is it possible to export multiple objects/meshes from blender with the LWO exporter?

Or do they always have to be joined into one mesh first? So far that is the only way i can get everything to show up in game.

 

Also, does it have advantages to have separate meshes? In blender yes, but in game also?

This article talks about submeshes and different skins:

http://wiki.thedarkmod.com/index.php?title=Creating_Multiple_Skins_For_A_Model

But those might be for ASE models?

Link to comment
Share on other sites

No is not possible to export multiple separate layers/objects in a single lwo or ASE file, at lest not to be used in idtech 4, if you want separate models you will have to export them has separate lwo files and assemble them in DR, fortunately idtech 4 respects the blender placement of the objects ingame, if you want them to be exactly where they were in Blender, you just need to freeze the transforms and zero the values, and when importing them into DR, just zero the origin values in DR and the model will snap to the same place it was on Blender.

 

About advantages, yes there's advantages and one is automatic camera occlusion culling made by the engine, if your mesh is a huge single object then it will never be culled by the engine, because no matter where the player looks the object would be visible, also portals will be unable to cull the object has well, even if one single vertex is visible throught a portal ALL the mesh get's rendered and depending on the number of lights illuminating that mesh, every surface on it can be rendered more than one time per frame.

 

Also if the object origin gets into the "void", that means outside the confines of the rooms/world made by DR brushwork, then map will leak and not compile, even if the visible object is inside the world and this kind of leaks can be hard to find.

Edited by HMart
Link to comment
Share on other sites

I'd like to add that you'd still want to combine as much as possible based on where it all fits into the visibility and portals, to cut down on batch counts that will negatively affect performance. If the models use unique materials, all the textures should also be atlased as much as possible, also based on the "scene". Like any engine, it wants things in digestible chunks instead of a packet of crumbs, but not such a huge chunk that it chokes. There is a flag to make each model "inline" which means it will be baked into the proc file on compiling it, thus cutting down on batches as much as possible, but I just think it'd be easier to get them all together in Blender before exporting.

 

(edit): I realised you can just select all your different func_statics and type in the key "inline" with the value "1" and it will flag them all at once. That's easy enough too.

Edited by LDAsh
Link to comment
Share on other sites

Interesting information guys. Too advanced for me though.

For my purposes, if we could focus on the skins part it would be most useful.

 

From what i read on the wiki the statement about not being able to export multiple meshes in a single ASE seems incorrect. In fact it seems that it's required to get multiple materials working.

http://wiki.thedarkmod.com/index.php?title=Creating_an_ASE_model_using_multiple_Materials

And since ASE can do it i wonder why LWO cannot...

 

But a practical question for me is how to do skins. I just looked at it a bit more and it looks like one can just replace every material used with a new one. But in that case how about if you tweaked a UV map... one UV fits all textures? I assume one should just make different versions of the same model if anything special is done in the UV mapping stage? And don't bother about skins? Or... is it possible to change the model also or supply a seperate uv map... questions questions...

 

Link to comment
Share on other sites

You asked for Blender, so I can't say anything about that, but there aren't any problems with exporting multiple meshes as one .ase mesh (scene) in 3dsmax. Also, besides having one piece of mesh e.g. with custom collision or simplified shadow mesh, there's no advantage in either method in terms of materials. Every new (simple) material means more drawcalls + added triangle count. Every additional material stage other than diffuse, normal, and specular slot adds to it as well. Unless you have special-purpose elements like custom shadows or collision, you should strive for one mesh / one material ratio. Or even better, one material / several mesh variations, to save on texture memory.

Edited by Judith
Link to comment
Share on other sites

Interesting information guys. Too advanced for me though.

For my purposes, if we could focus on the skins part it would be most useful.

 

From what i read on the wiki the statement about not being able to export multiple meshes in a single ASE seems incorrect. In fact it seems that it's required to get multiple materials working.

http://wiki.thedarkmod.com/index.php?title=Creating_an_ASE_model_using_multiple_Materials

And since ASE can do it i wonder why LWO cannot...

 

But a practical question for me is how to do skins. I just looked at it a bit more and it looks like one can just replace every material used with a new one. But in that case how about if you tweaked a UV map... one UV fits all textures? I assume one should just make different versions of the same model if anything special is done in the UV mapping stage? And don't bother about skins? Or... is it possible to change the model also or supply a seperate uv map... questions questions...

 

 

I only worked with skins briefly and that was some time ago, so my memory is rusty but afaik skins have nothing to do with multiple meshes, skins only replace a material name/link for another.

 

About what i said about ASE, i pretty much only work with LWO and MD5 exclusively, so i could be indeed wrong about it, but i did made some ASE models in the past and unless idtech 4 treats 3DS Max ASE exported files differently, as the ones exported by my Modo ASE plugin (is possible), the ASE file should be a single model ingame and in DR, having said that, lwo and ASE indeed support multiple meshs/layers, but afaik idtech 4 does not, when you export your mesh for this engine, all of your geometry needs to be on a single layer, and i mean even if your model is made of separate objects, you need to put them all in a single layer, in blender parlor you need to combine them, for TDM for example this means, the visible object, the collision mesh hull and the shadow mesh, need to be grouped into a single layer/ object, you can only differentiate surfaces in the engine by material id's, this means a single model can have multiple different materials on it, but like Judith said be carefully with that.

 

About UV's, idtech 4 require's a single non overlapping UV map per mesh, so no second UV layer, that doesn't mean you can't blend textures in a single mesh in idtech 4, for that you use vertex weight painting AND OR different material stages.

 

I hope what i'm saying is clear.

Edited by HMart
Link to comment
Share on other sites

All the different software people use certainly makes all this modding more... interesting to sort out!

 

Would i be correct to think that it's not possible to use skins when the UV's are not all the same for every version? This is probably a very basic question, but that's where i'm at, so just like to get this confirmed. This means if i want to have different 'skins' i just got to export several mat./UV versions of the same model right?

 

Oh, about "idtech 4 require's a single non overlapping UV map per mesh", is that right? Since i use two materials on one mesh with one UV map and they overlap and i can see no problems with it. Unless i'm not understanding what i'm actually doing and i'm doing something else than what you are talking about. Which is also very possible.

Link to comment
Share on other sites

About UV's, idtech 4 require's a single non overlapping UV map per mesh

 

Not sure if I understand you correctly, but if you mean that you can't overlap UV islands, then you're wrong. I'm using mirrored UVs in my unwrapped meshes to save on texture space all the time, and engine displays it correctly.

Edited by Judith
Link to comment
Share on other sites

 

Not sure if I understand you correctly, but if you mean that you can't overlap UV islands, then you're wrong. I'm using mirrored UVs in my unwrapped meshes to save on texture space all the time, and engine displays it correctly.

 

Oh yes i forgot about that particular trick, but imo you are not really overlapping totally different and unique uv islands, you are just overlapping the same UV information on top of itself, so there's no real conflict, but you are right, this "rule" is really for those that like me paint the normal map and the diffuse texture inside the 3d tool and want unique normal mapped/painted texels throughout the model surface, that requires non overlaped UV's. But i'm sure you know that.

Edited by HMart
  • Like 1
Link to comment
Share on other sites

Absolutely. This is completely optional, but if you think about your models in terms of which sides player can see on screen simultaneously, you can use this to mirror those that are out of view. As you know, it works best with regular geometric shapes and not "organic" models, although in character modeling the sides are often mirrored too.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 3 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...