How's them apples? XSI --> OGRE material file
Posted: Fri Jan 07, 2005 4:28 am
Well this is creaping along by inches, but I got the SoftImage Material OpenGL Real Time shaders to write out to an OGRE material file.
Only two things are bogus:
shading phong - you can't pick the shader algorithm with the OpenGl shaders in XSI so I just selected phong.
tex_coord_set 0 - I haven't figured out how to properly reference the texture UV maps yet. (That comes next.)
Everything else comes from the XSI shaders.
Of course I haven't actually tested it yet. I only just got it to run without crashing. It's been 6 years since I wrote in C++, but it's slowly coming back.
Anyway, without further adieu here is an output from my material exporter:
Not to shabby huh?
Only two things are bogus:
shading phong - you can't pick the shader algorithm with the OpenGl shaders in XSI so I just selected phong.
tex_coord_set 0 - I haven't figured out how to properly reference the texture UV maps yet. (That comes next.)
Everything else comes from the XSI shaders.
Of course I haven't actually tested it yet. I only just got it to run without crashing. It's been 6 years since I wrote in C++, but it's slowly coming back.
Anyway, without further adieu here is an output from my material exporter:
Code: Select all
material Scene/Material2
{
technique
{
pass
{
shading phong
lighting on
ambient 0.300000 0.300000 0.300000 1.000000
diffuse 0.500000 0.500000 0.500000 1.000000
diffuse 0.000000 0.000000 0.000000 1.000000
specular 0.700000 0.700000 0.700000 1.000000 10.000000
depth_check on
depth_write on
cull_hardware none
cull_software none
scene_blend one zero
texture_unit
{
texture Pictures\noIcon.pic 2d
colour_op modulate
tex_coord_set 0
filtering linear linear none
max_anisotropy 1
env_map off
tex_address_mode clamp
scale 1.000000 1.000000
rotate 0.000000
scroll 0.000000 0.000000
}
}
pass
{
shading phong
depth_check on
depth_write on
cull_hardware none
cull_software none
scene_blend one dest_alpha
texture_unit
{
texture Pictures\noIcon.pic 2d
colour_op alpha_blend
tex_coord_set 0
filtering linear linear none
max_anisotropy 1
env_map off
tex_address_mode clamp
scale 1.000000 1.000000
rotate 0.000000
scroll 0.000000 0.000000
}
}
pass
{
shading phong
depth_check on
depth_write on
cull_hardware clockwise
cull_software back
scene_blend one dest_colour
texture_unit
{
texture C:\Softimage\XSI_4.2\Application\rsrc\noIcon.pic
colour_op replace
tex_coord_set 0
filtering linear linear none
max_anisotropy 1
texture_unit
{
texture Pictures\noIcon.pic 2d
colour_op modulate
tex_coord_set 0
filtering point anisotropic linear
max_anisotropy 6
env_map off
tex_address_mode clamp
scale 1.000000 1.000000
rotate 0.000000
scroll 0.000000 0.000000
}
}
}
}