About Store Forum Documentation Contact



Post Reply 
Can multiple models be linked to make one?
Author Message
JMtheCONQUERER Offline
Member

Post: #1
Can multiple models be linked to make one?
Sorry if this sounds noob, the title doesnt say it all though.

I wanted to know if multiple meshes can be linked together to form one mesh while each part having its own texture layout. Example: A tree. The trunk is one mesh, and there would be several other separate meshes for the branches. But is it possible to give each separate mesh its own texture layout? Just so I dont have to pack everything onto one UV layout? Thats what I want to do in order to maintain the detail on each of the individual meshes and also give each part its own material. But my gutt tells me that it might create problems with memory or something.
BTW, Im making my own custom textures with zbrush and gimp for my unwrapped models. Im not using any seamless repeating image textures. At least not if I can help it.

thanks a lot everybody.
10-30-2011 07:38 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #2
RE: Can multiple models be linked to make one?
This is how many models are structured, they are made up of different 'parts'. You can do this in your external modeling program.
10-30-2011 07:49 PM
Find all posts by this user Quote this message in a reply
Dwight Offline
Member

Post: #3
RE: Can multiple models be linked to make one?
Models can be stitched/combined together in your favourite modelling program, just as llinx mentioned. Although each part of a model can also be exported seperately to create some customization while in the world editor as well; e.g a gatehouse that you created that has doors attached: detach the doors and export them seperately so you can make a gatehouse WITH and WITHOUT doors. In that way, you won't need to have 2 seperate (rather large) models, but 1 large and 2 smaller ones!

You should always make your own textures, but I don't see how you won't be using seamless textures for terrains, except if you want to use too much memory on someone's computer with a texture of 100GB big if you are building a game with a lot of terrain?

SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
10-30-2011 09:51 PM
Find all posts by this user Quote this message in a reply
JMtheCONQUERER Offline
Member

Post: #4
RE: Can multiple models be linked to make one?
(10-30-2011 09:51 PM)Dwight Wrote:  Models can be stitched/combined together in your favourite modelling program, just as llinx mentioned. Although each part of a model can also be exported seperately to create some customization while in the world editor as well; e.g a gatehouse that you created that has doors attached: detach the doors and export them seperately so you can make a gatehouse WITH and WITHOUT doors. In that way, you won't need to have 2 seperate (rather large) models, but 1 large and 2 smaller ones!

You should always make your own textures, but I don't see how you won't be using seamless textures for terrains, except if you want to use too much memory on someone's computer with a texture of 100GB big if you are building a game with a lot of terrain?

What I mean is if one model contains multiple meshes can each one of those meshes have their own UV layout? Say you had a model that was made up of 20 independent meshes. Therefore it has 20 UV layouts all of the size 1024x1024. Would that take up too much graphic memory?
10-30-2011 11:49 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #5
RE: Can multiple models be linked to make one?
Yes, this can be achieved in an external modelling program as others have mentioned. However the biggest problem is draw call count per material. A tree made from a single model is a single draw call for the video card. In addition, EE can batch mutliple trees for a single draw call. Breaking the tree up into say 3 parts for example, results in 3 draw calls if each part uses a different material. If you want to use "parts" to build your worlds, then ensure you share materials across parts as much as possible. You can even use a texture atlas to group small parts together.
10-31-2011 05:08 AM
Find all posts by this user Quote this message in a reply
JMtheCONQUERER Offline
Member

Post: #6
RE: Can multiple models be linked to make one?
(10-31-2011 05:08 AM)fatcoder Wrote:  Yes, this can be achieved in an external modelling program as others have mentioned. However the biggest problem is draw call count per material. A tree made from a single model is a single draw call for the video card. In addition, EE can batch mutliple trees for a single draw call. Breaking the tree up into say 3 parts for example, results in 3 draw calls if each part uses a different material. If you want to use "parts" to build your worlds, then ensure you share materials across parts as much as possible. You can even use a texture atlas to group small parts together.

Ok, I had to reread that a few times for it to really click but I get what your saying.
So if multiple parts share the same material then EE will batch them as one draw call? Or did I read that wrong?
Either way thanks for your help I appreciate it.
10-31-2011 07:10 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #7
RE: Can multiple models be linked to make one?
Yes, that is correct. Geometry can be sent to the video card in batched groups. A batch must share the same texutres and shaders, which is what makes up a material.

Therefore it is usually a good idea to try and share materials between similar parts. For example, if you have a set of building wall parts, have them all share the same brick material for example. You can use different UV's on each part to ensure the material appears correct for the part.
10-31-2011 07:26 AM
Find all posts by this user Quote this message in a reply
JMtheCONQUERER Offline
Member

Post: #8
RE: Can multiple models be linked to make one?
(10-31-2011 07:26 AM)fatcoder Wrote:  Yes, that is correct. Geometry can be sent to the video card in batched groups. A batch must share the same texutres and shaders, which is what makes up a material.

Therefore it is usually a good idea to try and share materials between similar parts. For example, if you have a set of building wall parts, have them all share the same brick material for example. You can use different UV's on each part to ensure the material appears correct for the part.

just one more question, what if they all have the same material settings as far as the material sliders go in the esenthel editor. But they each have different image textures assigned to them?? So same material settings inside EE but each mesh will have its own different diffuse texture and normal map. Would it still batch them like that?
(This post was last modified: 10-31-2011 06:40 PM by JMtheCONQUERER.)
10-31-2011 06:40 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #9
RE: Can multiple models be linked to make one?
No. When you save a material out of the editor, it will save a material file. This file references the textures, shaders and settings required to render that material. For two or more objects to be batched, they must share the same material file.

To solve the problem you are referring to, you would need to use a texture atlas. This just means that you stich multiple textures together and then use a different set of UV's for each mesh to refer to the part of the texture the mesh uses. This is best used with small similar objects. Like for example if you had 4 rock meshes that each use a different texture. Instead of 4 128x128 textures, you could use 1 256x256 texture.
(This post was last modified: 11-02-2011 06:37 AM by fatcoder.)
11-01-2011 12:31 AM
Find all posts by this user Quote this message in a reply
JMtheCONQUERER Offline
Member

Post: #10
RE: Can multiple models be linked to make one?
(11-01-2011 12:31 AM)fatcoder Wrote:  No. When you save a material out of the editor, it will save a material file. This file references the textures, shaders and settings required to render that material. For two or more objects to be batched, they must share the same material file.

To solve the problem you are referring to, you would need to use a texture atlas. This just means that you stich multiple textures together and then use a different set of UV's for each mesh to refer to the part of the texture the mesh uses. This is best used with small similar objects. Like for example if you had 4 rock meshes that each use a different texture. Instead of 4 128x128 textures, you could use 1 512x512 texture.

Dont multiple meshes have to be joined as one mesh to share the same texture atlas?
11-02-2011 01:34 AM
Find all posts by this user Quote this message in a reply
impi Offline
Member

Post: #11
RE: Can multiple models be linked to make one?
(11-01-2011 12:31 AM)fatcoder Wrote:  Instead of 4 128x128 textures, you could use 1 512x512 texture.
Good explanation on drawcalls, but think you mean: "you could use 1 256x256 texture"


No. You could make one texture of all handweapons for eg, and have the diff meshes for each.
(This post was last modified: 11-02-2011 04:15 AM by impi.)
11-02-2011 04:11 AM
Visit this user's website Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #12
RE: Can multiple models be linked to make one?
(11-02-2011 01:34 AM)JMtheCONQUERER Wrote:  Dont multiple meshes have to be joined as one mesh to share the same texture atlas?

No, not at all.

impi Wrote:Good explanation on drawcalls, but think you mean: "you could use 1 256x256 texture"

Good save old chap. I've fixed up my original post.
11-02-2011 06:41 AM
Find all posts by this user Quote this message in a reply
JMtheCONQUERER Offline
Member

Post: #13
RE: Can multiple models be linked to make one?
(11-02-2011 06:41 AM)fatcoder Wrote:  
(11-02-2011 01:34 AM)JMtheCONQUERER Wrote:  Dont multiple meshes have to be joined as one mesh to share the same texture atlas?

No, not at all.

I dont know how to do it in blender. I guess I'll have to address that question on the blender forums.

And I think its about time to retire this post.
thanks you guys.
(This post was last modified: 11-03-2011 08:41 PM by JMtheCONQUERER.)
11-03-2011 08:34 PM
Find all posts by this user Quote this message in a reply
Post Reply