Jump to content


Photo

Is it possible to export multiple objects/meshes?

blender lwo export

9 replies to this topic

#1 Tinkerer

Tinkerer

    Member

  • Member
  • PipPip
  • 10 posts

Posted 03 December 2017 - 04:13 PM

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

But those might be for ASE models?



#2 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 568 posts

Posted 03 December 2017 - 09:20 PM

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, 03 December 2017 - 09:29 PM.


#3 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 67 posts

Posted 04 December 2017 - 12:34 AM

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, 04 December 2017 - 01:09 AM.


#4 Tinkerer

Tinkerer

    Member

  • Member
  • PipPip
  • 10 posts

Posted 04 December 2017 - 08:33 AM

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

 



#5 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 762 posts

Posted 04 December 2017 - 08:58 AM

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, 04 December 2017 - 08:58 AM.


#6 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 568 posts

Posted 04 December 2017 - 02:06 PM

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.thedarkm...tiple_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, 04 December 2017 - 02:09 PM.


#7 Tinkerer

Tinkerer

    Member

  • Member
  • PipPip
  • 10 posts

Posted 04 December 2017 - 04:37 PM

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.



#8 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 762 posts

Posted 04 December 2017 - 04:55 PM

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, 04 December 2017 - 04:56 PM.


#9 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 568 posts

Posted 04 December 2017 - 07:37 PM

 

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, 04 December 2017 - 07:39 PM.

  • Judith likes this

#10 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 762 posts

Posted 05 December 2017 - 02:20 AM

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.


  • HMart likes this



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users