Unity material examples created with texture images from
You can download materials and textures from Release tab. Download Resources.tar.xz file and extract it to your Unity project Asset directory.
- Clone this repository with git and git-lfs: we use git-lfs for large files such as materials, meshes, texture images etc.
$ git clone https://github.com/eastskykang/RaiSimUnity.git
- Once you cloned source code, get lfs files by
You should see texture JPEG files properly from
$ git lfs pull origin
Assets/Resources/texture/cc0/
.
- Unity Editor
- Texture images
- Gimp or Photoshop (optional)
- Download texture files from web sources.
- Create a material from Unity Editor
- If the material is transparent, set rendering mode to
Transparent
instead ofOpaque
.
- If the material is transparent, set rendering mode to
- Add textures to the
material/Main Maps
in Unity Editor- Ambient occlusion map file (e.g. AO.jpg) to
Occlusion
. - Albedo map file (e.g. col.jpg) to
Albedo
. - Normal map file (e.g. normal.jpg) to
Normal Map
. - Height map file (e.g. disp.jpg) to
Height Map
.
- Ambient occlusion map file (e.g. AO.jpg) to
- Setting Roughness and Metallic of material is a bit tricky.
- Unity uses alpha channel of either Metallic map file or Albedo map file as a
Smoothness
. Here, we use Metallic map alpha channel as smoothness. - Note that
Smoothness
is an inverse of Roughness. You need to inverse roughness map file (e.g. rgh.jpg) by image editing tools (e.g. gimp or Photoshop etc.) - In the image editing tool, add inversed roughness map to metallic map file (met.jpg) as a alpha channel: see this for gimp.
- Save new image as a png file.
- Add image to
Metallic
.
- Unity uses alpha channel of either Metallic map file or Albedo map file as a