18
Character Customization Character Customization Need millions of unique individuals Need millions of unique individuals But, artists can only create dozens But, artists can only create dozens How to solve? How to solve? Texture swapping Texture swapping Tinting Tinting Mesh splicing Mesh splicing Mesh morphing Mesh morphing Accessory polygons Accessory polygons Linear scaling Linear scaling Bone scaling Bone scaling

Character Customization

Embed Size (px)

DESCRIPTION

Character Customization. Need millions of unique individuals But, artists can only create dozens How to solve? Texture swapping Tinting Mesh splicing Mesh morphing Accessory polygons Linear scaling Bone scaling. Texture Swapping. This is much cheaper than creating a new model - PowerPoint PPT Presentation

Citation preview

Page 1: Character Customization

Character CustomizationCharacter Customization Need millions of unique individualsNeed millions of unique individuals But, artists can only create dozensBut, artists can only create dozens

How to solve?How to solve? Texture swappingTexture swapping TintingTinting Mesh splicingMesh splicing Mesh morphingMesh morphing Accessory polygonsAccessory polygons Linear scalingLinear scaling Bone scalingBone scaling

Page 2: Character Customization

Texture SwappingTexture Swapping

This is much cheaper than creating a new This is much cheaper than creating a new modelmodel

Can segment model, swap each piece Can segment model, swap each piece separatelyseparately

Page 3: Character Customization

Character TintingCharacter Tinting Slice character up into sectionsSlice character up into sections Colorize each section with vertex colorsColorize each section with vertex colors

Results on next slide...Results on next slide...

Page 4: Character Customization

Character TintingCharacter Tinting

originaltexture

tinted withGL_MODULATE

tinted withphotoshop levelsdialog box

Page 5: Character Customization

Tinting with “Levels”Tinting with “Levels”

The Photoshop “levels” dialog:

Each channel (R,G,B) has

Scale, Offset, Power

Gives broad range of results

Trivially implemented in pixel shader

Just offset without scale and power ok

90% of my shadersare implementations ofphotoshop effects

Page 6: Character Customization

Tinting with Per-Pixel AlphaTinting with Per-Pixel Alpha

Page 7: Character Customization

Character TintingCharacter Tinting

originaltexture

tinted withGL_DECAL and a per-pixel alpha

tinted withphotoshop levelsdialog box

Page 8: Character Customization

Mesh SplicingMesh Splicing

Page 9: Character Customization

Mesh SplicingMesh Splicing

Vertices have to line up perfectly – easy

They have to have same vertex weights - hard

This is a problem

(and your artist isn’t going to solve it)

Answer: don’t model it separately.

Model it as one giant hydra-like object.

Make sure seam vertices are shared.

Page 10: Character Customization

Mesh MorphingMesh Morphing

I downloaded the normal head off the internet

I made the witch and demon heads by moving vertices

Page 11: Character Customization

Mesh MorphingMesh Morphing

// assume three global vertex arrays: witchpos, normalpos, demonpos

void makehead(float witchfactor, float demonfactor){ for (int i=0; i<NUMVERTICES; i++) { output[i] = normalpos[i]; output[i] += witchfactor * (witchpos[i] – normalpos[i]); output[i] += demonfactor * (demonpos[i] – normalpos[i]); }}

download “makehuman”

Page 12: Character Customization

Morphing vs SplicingMorphing vs Splicing

Important advantage of morphing:Important advantage of morphing: With splicing, cannot reshape the With splicing, cannot reshape the

boundariesboundaries Cannot reshape waist (no fat characters)Cannot reshape waist (no fat characters) Cannot reshape any other boundaries either.Cannot reshape any other boundaries either.

No such limitations with morphing.No such limitations with morphing.

Page 13: Character Customization

Morphing vs Splicing IIMorphing vs Splicing II Does artist have to do “weird stuff”?Does artist have to do “weird stuff”?

Splicing:Splicing: Make several meshes (easy)Make several meshes (easy) Make edges line up (easy)Make edges line up (easy) Maintain invariant that edge vertex weights are exactly Maintain invariant that edge vertex weights are exactly

equal.equal. Artist must use numeric vertex weights (very inconvenient)Artist must use numeric vertex weights (very inconvenient) Or, artist must use a “shared edge” (clumsy, Or, artist must use a “shared edge” (clumsy,

counterintuitive)counterintuitive)

Morphing:Morphing: Make a mesh (easy)Make a mesh (easy) Insert extra vertices in interesting areas (easy)Insert extra vertices in interesting areas (easy) Clone the mesh (easy)Clone the mesh (easy) Now tweak the clone without adding vertices (easy)Now tweak the clone without adding vertices (easy)

Page 14: Character Customization

Accessory Accessory PolygonsPolygons

There are some things that morphing can’t do well. See image:

For this, mesh splicing is better.

Mesh splicing is easy when it’s not a choice of multiple meshes, only “mesh” or “no mesh.”

Page 15: Character Customization

Morphing vs Splicing IIMorphing vs Splicing II Does artist have to do “weird stuff”?Does artist have to do “weird stuff”?

Splicing:Splicing: Make several meshes (easy)Make several meshes (easy) Make edges line up (easy)Make edges line up (easy) Maintain invariant that edge vertex weights are exactly Maintain invariant that edge vertex weights are exactly

equal.equal. Artist must use numeric vertex weights (very inconvenient)Artist must use numeric vertex weights (very inconvenient) Or, artist must use a “shared edge” (clumsy, Or, artist must use a “shared edge” (clumsy,

counterintuitive)counterintuitive)

Morphing:Morphing: Make a mesh (easy)Make a mesh (easy) Insert extra vertices in interesting areas (easy)Insert extra vertices in interesting areas (easy) Clone the mesh (easy)Clone the mesh (easy) Now tweak the clone without adding vertices (easy)Now tweak the clone without adding vertices (easy)

Page 16: Character Customization

Using glScaleUsing glScale If scale is uniform:If scale is uniform:

Makes character look bigger, not taller.Makes character look bigger, not taller. If scale is nonuniform:If scale is nonuniform:

Doesn’t work. See image.Doesn’t work. See image.

Need somethingNeed somethingsmarter – bonesmarter – bonescaling.scaling.

Page 17: Character Customization

Bone-based ScalingBone-based Scaling Normally, you think about rotating bones.Normally, you think about rotating bones. But bones are represented as matrices –But bones are represented as matrices –

meaning, you can translate and scale as well.meaning, you can translate and scale as well. and, you can do nonuniform scaling.and, you can do nonuniform scaling.

sims modders have discovered that it’s possible sims modders have discovered that it’s possible to use nonuniform scaling to create fat sims:to use nonuniform scaling to create fat sims:

That’s a lot of varietyThat’s a lot of varietyfor just tweaking a fewfor just tweaking a fewscaling factors. Noscaling factors. Noextra memory usage!!!extra memory usage!!!

Page 18: Character Customization

City of HeroesCity of Heroes