

= Warg - from cube to animated and textured game model Example





== Preview

image:jme3/external/preview.jpg[preview.jpg,with="",height=""]



== Step 1 - Prepare

- Open Blender with new Scene
- Add a simple Cube. To make it press shift-a and select Cube


image:jme3/external/2.jpg[2.jpg,with="",height=""]


- “t” key open tool window. let’s open it and set x-mirror ON


image:jme3/external/4.jpg[4.jpg,with="",height=""]


- Subdivide this cube to get more faces
* this can be also done via modifiers → subdivision surface (it will be later)


image:jme3/external/5.jpg[5.jpg,with="",height=""]


- “n” key open second toolbar with useable options. let's load an example image to help us build Warg.
I found a nice warg image on devian art.


image:jme3/external/example.jpg[example.jpg,with="",height=""]


- make simple Warg Shape like on images


image:jme3/external/6.jpg[6.jpg,with="",height=""]
image:jme3/external/7.jpg[7.jpg,with="",height=""]
image:jme3/external/9.jpg[9.jpg,with="",height=""]



== Step 2 - Modeling

- in tool window(“t”) is a smooth tool that can help model the warg.


image:jme3/external/10.jpg[10.jpg,with="",height=""]


- to easly add edge loop use “loop cut and slide” tool that work that way:


image:jme3/external/12.jpg[12.jpg,with="",height=""]
image:jme3/external/13.jpg[13.jpg,with="",height=""]


- Go to modifiers and add Mirror surface


image:jme3/external/14.jpg[14.jpg,with="",height=""]


- add some details like eyes / etc.


“


image:jme3/external/15.jpg[15.jpg,with="",height=""]
image:jme3/external/16.jpg[16.jpg,with="",height=""]


- to use smooth shading just set it in tool window.


image:jme3/external/17.jpg[17.jpg,with="",height=""]


- Apply modifier. just press “Apply” button in Mirror modifier.
- Remove doubles (it removes vertexes that are too close each other).


image:jme3/external/18.jpg[18.jpg,with="",height=""]



== Step 2 - Armature

- Shift-a and add armature in Object Mode.



image:jme3/external/19.jpg[19.jpg,with="",height=""]

image:jme3/external/21.jpg[21.jpg,with="",height=""]


- Show names and change armature view (if you like)


image:jme3/external/22.jpg[22.jpg,with="",height=""]


- set Names for bones (via properties window or “n” option window)


image:jme3/external/23.jpg[23.jpg,with="",height=""]


- Select left side bones only, press shift-d to copy them, and make mirror.
Remember to have cursor in 0,0,0 and have settings like on image (if not then you will need just to move copied bones manually)


image:jme3/external/25.jpg[25.jpg,with="",height=""]


- Press “w” and select “flip names”


image:jme3/external/26.jpg[26.jpg,with="",height=""]
image:jme3/external/27.jpg[27.jpg,with="",height=""]


- In Object Mode:
* Select Model
* With SHIFT select armature
* Press “p” and select “with automatic weights”


image:jme3/external/28.jpg[28.jpg,with="",height=""]


- Try move a leg in Pose Mode
“““““““
image:jme3/external/29.jpg[29.jpg,with="",height=""]


- Go to Animation View


image:jme3/external/30.jpg[30.jpg,with="",height=""]


- Add a new action


image:jme3/external/31.jpg[31.jpg,with="",height=""]


- Select all bones in Pose Mode and apply location / rottion / scale.
To do it press “i” and select it like on image:


image:jme3/external/32.jpg[32.jpg,with="",height=""]



- there is possibility to copy poses


image:jme3/external/33.jpg[33.jpg,with="",height=""]


- and also to copy them in mirrored pose


image:jme3/external/35.jpg[35.jpg,with="",height=""]


- in action editor you can easly remove / move / scale frames


image:jme3/external/34.jpg[34.jpg,with="",height=""]


- If animation work not linear (and you don't like it), then you can change it in Curve editor window


image:jme3/external/36.jpg[36.jpg,with="",height=""]


- Thats all for Animations, for more just Read JME wiki / documentation.



== Step 2 - Texturing

- Move armature to second layer.
press “m” to make it.


image:jme3/external/37.jpg[37.jpg,with="",height=""]


- In edit mode, need to mark seam on Edges to prepare model for texturing.
press ctrl-e to make it.


image:jme3/external/38.jpg[38.jpg,with="",height=""]


- do it similar to this (or you can make it better):


image:jme3/external/40.jpg[40.jpg,with="",height=""]
image:jme3/external/41.jpg[41.jpg,with="",height=""]
image:jme3/external/43.jpg[43.jpg,with="",height=""]


- Press “u” and select first option “unwrap”
- In UV window you can minimize stretch
(minimize stretch change with mouse wheele).


image:jme3/external/44.jpg[44.jpg,with="",height=""]


- make a 2 geometries for model:
* body (contains faces for body)
* eyes (containes faces for eyes)


image:jme3/external/45.jpg[45.jpg,with="",height=""]


image:jme3/external/48.jpg[48.jpg,with="",height=""]


- for eyes you can use “Sphere projection for unwrap”


image:jme3/external/49.jpg[49.jpg,with="",height=""]


- Select texture image


image:jme3/external/50.jpg[50.jpg,with="",height=""]


- under “n” option window, set like on image to see texture.
(ViewPort need to be set as solid, ViewPort is near Object/Edit select)


image:jme3/external/52.jpg[52.jpg,with="",height=""]


- Just make texture of model (using Texture Mode – where Object / edit mode is)


“


image:jme3/external/55.jpg[55.jpg,with="",height=""]


- Using 2d tool like Gimp / Photoshop, use filter/modifier to get nice looking skin


image:jme3/external/56.jpg[56.jpg,with="",height=""]


- Now only need to export via Ogre Mesh or just via Blend file (using SDK).


- For eyes and body, use separated j3m files, then set them in SceneComposer.





here are docs:


link:http://jmonkeyengine.org/wiki/doku.php/jme3:external:blender[http://jmonkeyengine.org/wiki/doku.php/jme3:external:blender]


- Done!

