Browse Source

Update monkey and format instructions

Yes, the texture is extremely ugly. It's for testing :)
pitch-detection
Macoy Madson 3 years ago
parent
commit
ce88b9ecde
  1. 28
      ReadMe.org
  2. BIN
      test/assets/Monkey.blend
  3. BIN
      test/assets/Monkey_Texture.png

28
ReadMe.org

@ -50,23 +50,23 @@ For a textured mesh:
- Paint the texture as desired
- In the Image Editor window, do ~Image -> Save As~ and save the image to a lossless format (I used PNG)
- Run the following to convert the image to ~.dds~ (which will be a larger file, but will load /drastically/ faster):
#+BEGIN_SRC sh
convert assets/MyTexture.png data/Materials/Textures/MyTexture.dds
#+END_SRC
#+BEGIN_SRC sh
convert assets/MyTexture.png data/Materials/Textures/MyTexture.dds
#+END_SRC
- Export the mesh. Because export materials doesn't do us any good yet, we only export the mesh to get the updated UV coordinates and material (name only)
- Create a ~.material~ text file like below:
#+BEGIN_SRC C
hlms MyMaterial pbs
{
roughness 0.4
fresnel 1.33
#+BEGIN_SRC C
hlms MyMaterial pbs
{
roughness 0.4
fresnel 1.33
diffuse_map MyTexture.dds
// normal_map Rocks_Normal.tga
// roughness_map Rocks_Spec.tga
// specular_map Rocks_Diffuse.tga
}
#+END_SRC
diffuse_map MyTexture.dds
// normal_map Rocks_Normal.tga
// roughness_map Rocks_Spec.tga
// specular_map Rocks_Diffuse.tga
}
#+END_SRC
- Finally, add the material to the ~Ogre::Item~:
#+BEGIN_SRC C++
item->setDatablock("MyMaterial");

BIN
test/assets/Monkey.blend

Binary file not shown.

BIN
test/assets/Monkey_Texture.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Loading…
Cancel
Save