Character Customization Need millions of unique individuals Need millions of unique individuals But,...
-
Upload
lynn-preston -
Category
Documents
-
view
222 -
download
0
Transcript of Character Customization Need millions of unique individuals Need millions of unique individuals But,...
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
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
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...
Character TintingCharacter Tinting
originaltexture
tinted withGL_MODULATE
tinted withphotoshop levelsdialog box
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
Tinting with Per-Pixel AlphaTinting with Per-Pixel Alpha
Character TintingCharacter Tinting
originaltexture
tinted withGL_DECAL and a per-pixel alpha
tinted withphotoshop levelsdialog box
Mesh SplicingMesh Splicing
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.
Mesh MorphingMesh Morphing
I downloaded the normal head off the internet
I made the witch and demon heads by moving vertices
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”
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.
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)
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.”
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)
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.
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!!!
City of HeroesCity of Heroes