@ -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");