Materials not exported

vexd

04-06-2007 16:08:55

Hi, recently I have been attempting to export a material from 3dsmax8 using oFusion CE 1.8 as part of a scene. The material is composed of two passes using shaders of my own construction which have been tested thoroughly inside ogre and run fine through the respective compilers, cg and hlsl.

Firstly editing the hlsl parameter values in oFusion was not possible with the documented error of the "Shader program has been modified or used with a another Render System". No amount of alteration of the code could solve this.

Luckily the cg versions of the shader worked fine however when exporting there were further errors. The log reported as follows when exporting a basic max scene with nothing expcept for a box with the material applied to it:


15:54:36: == Exporting Objects ==


15:54:36: Exporting Object: Box01


15:54:36: Object has 1 texture sets


15:54:36: Compiling material rabbit_cel


15:54:36: Mesh: Box01_mesh.... done


15:54:36: Exporting Object: Spot01.Target


15:54:36:

== Exporting Materials ==


15:54:36: rabbit_cel


15:54:36: 1 material(s) exported to face.material


=



This however was untrue as no such face.material file was ever created. A full system scan and multiple attempts later, including closing max, restarting the entire system and running the export on a different machine there were no better results.

If anyone can identify why this could happen then I would be very grateful.



Shader code, max scene and exporter output and logs can be found in this file :

http://www.megaupload.com/?d=FE7EPQ7I

Lioric

04-06-2007 16:42:14

Could you post the scene in a different server?

The file cant be downloaded from the current server

I will take a look at it asap

vexd

04-06-2007 17:13:36

Sorry about that, hosting on my university account, this _should_ work.

http://homepages.inf.ed.ac.uk/s0342489/material%20export%20failure.rar

Lioric

05-06-2007 01:29:59

I tested your scene and its being exported correctly

I tested with:

loading -> exporting, and
loading -> changing shader parameters -> exporting

In either case the material file is created with the correct values

The contents of the produced material is:



material rabbit_cel
{
technique
{
scheme two_pass_blend
pass
{
ambient 0.7 0.7 0.7 1
diffuse 0.7 0.7 0.7 1
specular 0.9 0.9 0.9 1 20

vertex_program_ref Transform_vs_3_0_vp_cg
{
param_named_auto world world_matrix
param_named_auto worldViewProj worldviewproj_matrix
param_named_auto EyePosition camera_position_object_space
param_named_auto LightPosition light_position_object_space 0
}

fragment_program_ref Cel_no_tex_ps_3_0_fp_cg
{
param_named DiffuseColor float4 0.3 0.3 0.3 1
param_named_auto DiffuseLightColor light_diffuse_colour 0
param_named LayerOneSharp float 0.6
param_named LayerOneRough float 0.05
param_named LayerOneContrib float 0.05
param_named LayerTwoSharp float 0.7
param_named LayerTwoRough float 0.3
param_named LayerTwoContrib float 0.1
}
}

pass
{
ambient 0.7 0.7 0.7 1
diffuse 0.7 0.7 0.7 1
specular 0.9 0.9 0.9 1 20
scene_blend modulate
cull_hardware anticlockwise

vertex_program_ref Outline_vs_3_0_vp_cg
{
param_named_auto worldViewProj worldviewproj_matrix
param_named offset float 3.64911
}

fragment_program_ref Black_ps_3_0_fp_cg
{
}
}

}

}


Your scene was tested with the latest version (should be available in the next hours)

Pottej

05-06-2007 10:33:12

Hi Lioric, cheers for the help (I'm working with Vexd on this).

Are you referring to the Pro version or is there an update to the community edition about to come out?

syedhs

06-06-2007 03:23:50

Hi just to chip in. There is one or two occasions where we cant get the materials exported. They are there, but they are simply not exported which is the same problem here. My artist solve it when he noticed something like id ( I didn't really pay attention to his explanation of solutions) that has number in it. Once he renumber the id ie 1,2,3,4 all in order, then materials are exported correctly. Originally there was a gap among the numbers.

HTH.


Your scene was tested with the latest version (should be available in the next hours)

Sorry for hijacking the thread a bit, but a new version on horizon? Wow.. cant wait for that. Is it 2.0?

Lioric

07-06-2007 16:33:22

Do you mean non-contiguous material Id's (in Multi/Sub-Object Materials)? this is supported

Could you provide a sample scene where your issue can be reproduced?

The new version is an update

(version 2 details will be annouced soon)

syedhs

07-06-2007 17:31:09

Do you mean non-contiguous material Id's (in Multi/Sub-Object Materials)? this is supported

Could you provide a sample scene where your issue can be reproduced?

I will ask him again whether it is what as you mentioned or others. I will provide the sample as soon as we can encounter a new one. The existing scenes have all been rectified.