Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by sooshicat · Oct 06, 2012 at 05:03 PM · characterrpgmodelsbestpractices

Best way to format characters/models in game?

Hi all
I just have a few questions on the best practices to employ while making characters and models for a game. Mainly one that would be RPG type.

How is the best way to make them? Lets imagine for the sake of the example that there are 3 separate races in the game.
EXAMPLE: 3 separate bodies- One for each race, and say, 5 different heads for each race, then you would just pick and choose to make characters and NPCs individual. Choose from different skin textures. Armor and clothing is also made separate and can just be placed with the character model.

Would this be too CPU intensive, loading all these different models and textures??
Before I start modelling characters and NPCs for the game, I need to know the best way to do it. How do modern game companies go about this without slowing down the game too much?

Thanks guys!

EDIT: By the way I am not the programmer for this project, only the 3D modeller and texturer. I have no experience with scripting - So please be gentle and try to keep it simple if you need to mention it :) Thank you

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by whydoidoit · Oct 06, 2012 at 05:16 PM

The number of textures used has an significant impact on the performance as what would normally happen would be that you would combine together all of the active meshes that use a single material reducing the number of draw calls that are needed to render out the model. So even though you have 20 pieces, once configured your programmer might be able to combine them into much fewer pieces that share the same material.

It might be worth looking at these videos for an asset store asset that does some of this combining for its purpose.

It might be possible to automatically atlas (combine) the textures from multiple parts into one but you will always have problems if you are using a shader property to affect the color(s) of something and those colors differ from part to part.

Really the loading isn't the problem - it's the number of different ones on the screen at the same time. Unity will hopefully dynamically batch calls to draw the same meshes and materials so it's hard to exactly predict.

This script from the Wiki could be used to combine together the multiple parts after configuration.

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sooshicat · Oct 06, 2012 at 05:37 PM 0
Share

Hi, Thanks for your response. So if I understand correctly, you are saying that I should create each part individually and then the programmer will combine all the parts sharing the same material when it comes to rendering them on the screen? Consider a game such as Skyrim- It appears that they have separate head and body meshes, heads are interchangeable for differently shaped heads, and they use color and texture overlays for skin color and details, with a separate mesh for hair. So would they be combining all the texture overlays (scars, marks and skin color overlay) to the main skin texture, and combining the head and the body, at rendering? Is this a good way to go about it?

avatar image whydoidoit · Oct 06, 2012 at 05:45 PM 0
Share

Yes, build bits, combine at runtime.

So yes - multiple heads is a good idea (those videos show an interesting point about hair BTW, making the top/sides/front/back different meshes gives a lot of variety).

As for scars etc - this is where it gets more tricky. You could use a shader that has multiple textures (and hence multiple UVs) so you can modify the scar textures differently from the skin textures etc.

Combining all of those things into 1 texture at runtime is almost definitely going to be bad for performance because it will probably be different for every character, lots of draw calls and lots of loading things to the graphics card - you need to $$anonymous$$imise the number of textures at runtime too. Now here we are at the edge of my knowledge really - I don't know whether the multiple texture shader is going to be bad for performance because I've never done that. If you are going to have lots of these details then I imagine multiple texture shaders is the way to go.

You should also consider making multiple LOD levels - I'm guessing skin details don't matter much for a character that isn't right in the middle of the screen. You can basically make multiple LOD models and name them xxx_lod_0 etc and then the programmer can create a LOD group and that will certainly improve performance.

avatar image sooshicat · Oct 06, 2012 at 05:56 PM 0
Share

$$anonymous$$ost of this makes sense but you lost me at multiple texture shaders and LOD levels ;) The videos you linked certainly were interesting. Very ugly, $$anonymous$$d you, but interesting nonetheless. I'll pass on this info to the programmer and see what he thinks... However I can't imagine how that would work with rigging and animation. If I didn't combine the head and body it would be easy enough to just have the full character rig and parent the head to the head bone at runtime. But if these were combined that would make things complicated, would it not? Thoughts?

avatar image whydoidoit · Oct 06, 2012 at 06:03 PM 0
Share

Agreed - they aren't the prettiest models in the world :) But the tech is sound.

O$$anonymous$$ so multiple Levels Of Detail (LOD) basically you make more than one version of the model at decreasing numbers of quads/detail - then Unity moves between them as the camera approaches or moves away from each of the models in the world. The performance gets better because you don't need all of those polygons when the thing is 30 pixels high in the distance.

$$anonymous$$ultiple textures - so you build your models, unwrap the UVs and paint the character for the base as normal. Then you might make a texture that contained a whole bunch of scars, marks, tattoos or whatever and you map those onto the model using a different set of UVs.

avatar image sooshicat · Oct 06, 2012 at 06:11 PM 0
Share

Aaahhh... Gotcha. Both of these things sound like great ideas. I'll check out how multiple texture shaders go performance-wise.
Thanks for your help, I appreciate it a lot (a lot a lot). I am still trying to understand how all these things work inside a game engine as I've only ever created 3D models for purely artistic purposes. Any thoughts on the rigging?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Third Person type Rpg movement 0 Answers

multiple models same animation 1 Answer

animating a character model 0 Answers

Basic Movement on a Plane without Character Controller 2 Answers

Best program for 3D characters? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges