![]() | 1 | initial version |
Hi,
here is an example of how to use different textures:
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
</script>
</material>
As in adding a jpg image, I think you have to create a collada file, and export it with the texture. And then add it to the model as a mesh. Here is a tutorial of how to load a mesh file.
Cheers, Andrei
![]() | 2 | No.2 Revision |
Hi,
here is an example of how to use different textures:
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Wood</name>
</script>
</material>
As in
For adding a jpg image, I think an image on a model you have to can create a new material script, something similar to:
material pancake/2sides
{
receive_shadows on
technique
{
pass
{
ambient 1 1 1 1.000000
diffuse 1 1 1 1.000000
specular 0.03 0.03 0.03 1.000000
emissive 0.900000 0.900000 0.900000 1.000000
texture_unit
{
texture pancake-sides.jpg
}
}
}
}
Where texture pancake-sides.jpg is the line where you add the image.
Or another possibility you could create a collada file, and export it with the texture. And then add it to the model as a mesh. Here is a tutorial of how to load a mesh file.
Cheers, Andrei