I've been using the Ogre exporter for Sketchup quite a lot. One
problem I run into frequently is with Sketchup models that have
surface textures defined as colors rather than as JPG files. When the
meshes are passed through all the conversion steps, one ends up with
a .material file like this:
material 1230055334_1_<Charcoal>
{
technique
{
pass
{
ambient 0.137254901960784 0.137254901960784 0.137254901960784
diffuse 0.137254901960784 0.137254901960784 0.137254901960784
specular 0.164705882352941 0.164705882352941 0.164705882352941
15.0
emissive 0.0 0.0 0.0
}
}
}
material 1230055334_2_Metal_Panel
{
technique
{
pass
{
ambient 0.56078431372549 0.615686274509804 0.619607843137255
diffuse 0.56078431372549 0.615686274509804 0.619607843137255
specular 0.672941176470588 0.738823529411765 0.743529411764706
15.0
emissive 0.0 0.0 0.0
// texture size: 24.0, 24.0
texture_unit
{
texture 1230055334_1_Metal_Panel.jpg
}
}
}
}
material 1230055334_3_Material1
{
technique
{
pass
{
ambient 0.882352941176471 0.882352941176471 0.784313725490196
diffuse 0.882352941176471 0.882352941176471 0.784313725490196
specular 1.0 1.0 0.941176470588235 15.0
emissive 0.0 0.0 0.0
}
}
}
material 1230055334_4_<White>
{
technique
{
pass
{
scene_blend alpha_blend
depth_check on
depth_write off
ambient 1.0 1.0 1.0 0.93
diffuse 1.0 1.0 1.0 0.93
specular 1.0 1.0 1.0 0.93 15.0
emissive 0.0 0.0 0.0 1.0
}
}
}
material 1230055334_5_<DarkKhaki>
{
technique
{
pass
{
ambient 0.741176470588235 0.717647058823529 0.419607843137255
diffuse 0.741176470588235 0.717647058823529 0.419607843137255
specular 0.889411764705882 0.861176470588235 0.503529411764706
15.0
emissive 0.0 0.0 0.0
}
}
}
material 1230055334_6_<LightGray>
{
technique
{
pass
{
ambient 0.662745098039216 0.662745098039216 0.662745098039216
diffuse 0.662745098039216 0.662745098039216 0.662745098039216
specular 0.795294117647059 0.795294117647059 0.795294117647059
15.0
emissive 0.0 0.0 0.0
}
}
}
material SketchupDefault
{
technique
{
pass
{
ambient 0.8 0.8 0.8
diffuse 0.8 0.8 0.8
specular 0.96 0.96 0.96 15.0
emissive 0.0 0.0 0.0
}
}
}
In this model, only one material can be imported (the second one,
defined as a JPG file.) It would seem easy and logical for the the
tools to generate 16x16 JPGs for the pure colors and add add the
texture_unit tags so that they could be imported as textures. If this
were done, a great many more models would be immediately available for
use in realXtend.
P.S. I have modified the Ogre exporter to simplify the importing of
Sketchup models. See
http://peterquirk.wordpress.com/2008/12/22/tutorial-using-the-streamlined-tool-chain-for-importing-sketchup-models-into-realxtend-04/
-- Peter
--~--~---------~--~----~------------~-------~--~----~
this list: http://groups.google.com/group/realxtend
realXtend home page: http://www.realxtend.org/
-~----------~----~----~----~------~----~------~--~---