Sign in to follow this  

Character Creation Idea

This topic is 1123 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello gamedev,

 

I am currently working on a game, it's nothing big but I have a question about character creation. If any of you have played APB Reloaded or something along the line of free MMO's like it, one of it's coolest features is character creation. Now I don't want to go overboard on this small project but I was wondering how do you make sliders that adjust the characters dimensions. So bluntly these are my two questions:

 

1. How do you make a slider

2. How do you make that slider change the dimensions of the character. For example: weight, height, facial features, etc.

 

If it's very complicated please try and dumbify it because I'm learning programming and visuals on my own. (AKA I don't have a degree in anything, I'm just a high school student with a lot of free time)

 

Thanks for the help in advance! :D

Share this post


Link to post
Share on other sites

1. How do you make a slider


A GUI sliderbar widget is a pretty common widget included in most GUI libraries. Many games don't require complex GUI kits, and just roll their own (so it doesn't look like a desktop application like Microsoft Word) but MMOs usually require more complex GUIs, and either use a preset GUI kit.

The basic idea is it's a button you are dragging along a rail, often with another button on either end for smaller increments of movement.
Have you ever made a button widget before?

What language and API are you using to program in? Chances are, there are both native GUI toolkits (like Win32), cross-platform wrappers for native GUIs (like Qt), and more game-related GUIs like SFGUI or Crazy Eddie's.
 
You can also code your own.
 

2. How do you make that slider change the dimensions of the character. For example: weight, height, facial features, etc.


That's a more difficult question. It's easy to make the slider, and easy to make the slider affect things, but now you're wanting to procedurally generate (or at least manipulate) a 3D model. At the easiest method, you can make each "notch" of the scrollbar select a different pre-made component (like different styles of hair), and use the scrollbar's value to tweak the color of the hair.

But the other features like swapping out noses and making sure they still integrate smoothly with the face, raising lowering and stretching ears, and so on, that's not an area I personally have experience in.

Share this post


Link to post
Share on other sites

 

1. How do you make a slider


A GUI sliderbar widget is a pretty common widget included in most GUI libraries. Many games don't require complex GUI kits, and just roll their own (so it doesn't look like a desktop application like Microsoft Word) but MMOs usually require more complex GUIs, and either use a preset GUI kit.

The basic idea is it's a button you are dragging along a rail, often with another button on either end for smaller increments of movement.
Have you ever made a button widget before?

What language and API are you using to program in? Chances are, there are both native GUI toolkits (like Win32), cross-platform wrappers for native GUIs (like Qt), and more game-related GUIs like SFGUI or Crazy Eddie's.
 
You can also code your own.
 

2. How do you make that slider change the dimensions of the character. For example: weight, height, facial features, etc.


That's a more difficult question. It's easy to make the slider, and easy to make the slider affect things, but now you're wanting to procedurally generate (or at least manipulate) a 3D model. At the easiest method, you can make each "notch" of the scrollbar select a different pre-made component (like different styles of hair), and use the scrollbar's value to tweak the color of the hair.

But the other features like swapping out noses and making sure they still integrate smoothly with the face, raising lowering and stretching ears, and so on, that's not an area I personally have experience in.

 

I am not sure if this is considered an API but I am using Unity and I am programming in C# with MonoDevelop. As for the slider itself I was thinking about making it a click and drag rather than a button increment, or is a click and drag too complicated. Forgive my vocabulary I don't know many specific "terms" with regards to programming and graphics.

Share this post


Link to post
Share on other sites

I second Goliath Forge's mention of blended morph targets. Given 2 vertex arrays, one each at an extreme of, for instance, a small nose and a large nose, the slider merely selects what ratio (in the range of 0 to 1) of each extreme is to be used. The final vertices for the nose of the character are calculated [ smallNose * ratio + bigNose * (1 - ratio) ] and baked into the final complete character mesh.

 

It requires some work in a modeling program (3ds Max, Blender, etc.) to create the two morph targets (the 2 meshes for a body part at the "extremes"), but the implementation of the ratio algorithm is relatively straightforward.

 

A very simple alternative, not always as nice looking, is simply to scale the vertices of a body part from a point or along an axis. The user's choice is similarly just baked into the character mesh.

 

A similar ratio scheme can be used for color or texture blending.

Share this post


Link to post
Share on other sites

I am not sure if this is considered an API but I am using Unity and I am programming in C# with MonoDevelop. As for the slider itself I was thinking about making it a click and drag rather than a button increment, or is a click and drag too complicated.

Click and drag (while still holding down the mouse) is fine, and isn't overly difficult.

Doesn't Unity have a built-in GUI library? I don't use Unity myself, but it looks like they have horizontal scrollbars already implemented for you.

Share this post


Link to post
Share on other sites

Something ive seen used in games, is in addition to the traditional Morph targets off a base mesh, is a concept of Inheritance.

 

Basically you have 2 sets of Base Heads with their respective textures. The player then chooses 2 heads to be the parents. These are then blended together based off of a user defined weighted blend value (Geometry blend). The diffuse/normals can then be blended together off a different weighted value (Texture Blend). This produces your new "Base Mesh". From there you have your set of Morph Targets Which you can blend with your dynamic "Base Mesh", creating your 2nd and final mesh.

 

This might sound a bit confusing, but it allows for an extremely high variation in player geometry.

Edited by theflamingskunk

Share this post


Link to post
Share on other sites

This topic is 1123 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this