Rak'kar
31-01-2007 18:32:39
Using the professional edition and Max 9.
I had a scene working fine. I then wanted to add a pass to existing materials. So I copied the existing pass to the material library, replaced that pass with another pass from the material library, then added the original pass as the second pass.
Now when I export the scene, the exported .material file is corrupt.
1. Part of a material is written, then it stops writing and goes onto the next material.
AND/OR
2. Some materials are not written at all.
This happens every time, but where it fails is different every time as well. Sometimes it will fully write out a material that failed before, sometimes not.
Lioric
31-01-2007 21:12:44
Is there any information on the ogre.log file that is created in your max folder?
Do this happens on any scene (with the steps posted above) or with an specific scene?
Rak'kar
31-01-2007 22:58:18
There is no information in either log file.
I don't know if it happens on any scene, but it probably does, since my scene is extremely simple. I think the bug is related to my usage of the material library to copy out passes and put them back in.
Lioric
03-02-2007 22:05:06
We have tested on many scenes, saving pass materials (including textureUnits) to the library and then loading them in materials techniques, and they are correctly working
Can you provide an scene were this can be reproduced?
Rak'kar
03-02-2007 23:49:19
I tried it just now and it worked. It might have been some kind of long-term memory corruption caused by working with Max all day.
Having said that, this is the second time I've seen this problem now. It happened a week ago or so too.
Rak'kar
11-02-2007 21:22:23
I got this again, with the hotfix installed. One of my planets wasn't exported, as if it just wasn't in the scene at all, even though it was visible. So I selected the planet and hit update and also update sel, and then it exported ok. The problem may be related to me sharing existing scene texture units with this planet and one of the other planets, since both of those planets were not rendering right in the oFusion viewport either.
* EDIT *
I just exported again and got the corruption again. All I did was make it stop sharing the old texture unit. Here's the output:
material oFusion_Pluto
{
receive_shadows off
technique
{
pass
{
lighting off
vertex_program_ref zPrepassVP_cg
{
param_named_auto worldViewProj worldviewproj_matrix
}
fragment_program_ref zPrepassFP_cg
{
}
}
pass
{
iteration once_per_light
ambient 0 0 0 1
specular 0 0 0 1 10
scene_blend add
alpha_rejection always_pass 128
depth_write off
depth_bias 1
vertex_program_ref BumpVP_cg
{
param_named_auto lightPositionObjectSpace light_position_object_space 0
param_named_auto cameraPositionObjectSpace camera_position_object_space
param_named_auto worldViewProj worldviewproj_matrix
}
fragment_program_ref BumpFP_cg
{
param_named lightDiffuse float4
material oFusion_Jupiter
{
receive_shadows off
technique
{
pass
{
lighting off
vertex_program_ref zPrepassVP_cg
{
param_named_auto worldViewProj worldviewproj_matrix
}
fragment_program_ref zPrepassFP_cg
{
}
}
pass
{
iteration once_per_light
ambient 0 0 0 1
diffuse 0 0 0 1
specular 0 0 0 1 10
scene_blend add
depth_write off
depth_bias 1
vertex_program_ref BumpVP_cg
{
param_named_auto lightPositionObjectSpace light_position_object_space 0
param_named_auto cameraPositionObjectSpace camera_position_object_space
param_named_auto worldViewProj worldviewproj_matrix
}
fragment_program_ref BumpFP_cg
{
param_named_auto lightDiffuse light_diffuse_colour 0
param_named_auto lightSpecular light_specular_colour 0
param_named shininess float 64
}
texture_unit
{
texture_alias 0
texture Jupiter512decal.dds
}
texture_unit
{
texture_alias 1
texture StockGrey4x4.dds
}
texture_unit
{
texture_alias 2
texture StockNormalMap4x4.dds
}
}
}
}
Log
13:15:38: == Exporting Objects ==
13:15:38: Exporting Object: JupiterBillboard
13:15:38: Object has 1 texture sets
13:15:38: Compiling material Billboard_JupiterHalo
13:15:38: New texture unit JupiterAtmosphere.png
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: JupiterBillboard_mesh.... done
13:15:38: Exporting Object: JupiterMoon
13:15:38: Object has 1 texture sets
13:15:38: Compiling material oFusion_Pluto
13:15:38: New texture unit Pluto512decal.dds
13:15:38: New texture unit StockGrey4x4.dds
13:15:38: New texture unit Pluto512normalmap.dds
13:15:38: Caught exception in compilemesh()
13:15:38: Please report it
13:15:38: Exporting Object: JupiterG
13:15:38: Object has 1 texture sets
13:15:38: Compiling material oFusion_Jupiter
13:15:38: New texture unit Jupiter512decal.dds
13:15:38: New texture unit StockGrey4x4.dds
13:15:38: New texture unit StockNormalMap4x4.dds
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: JupiterG_mesh.... done
13:15:38: Exporting Object: StarLayer1
13:15:38: Object has 1 texture sets
13:15:38: Compiling material Billboard_StarLayer1
13:15:38: New texture unit starlayer1.png
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: StarLayer1_mesh.... done
13:15:38: Exporting Object: StarLayer2
13:15:38: Object has 1 texture sets
13:15:38: Compiling material Billboard_StarLayer2
13:15:38: New texture unit starlayer2.png
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: StarLayer2_mesh.... done
13:15:38: Exporting Object: Moon
13:15:38: Object has 1 texture sets
13:15:38: Compiling material oFusion_Moon
13:15:38: New texture unit Moon512decal.dds
13:15:38: New texture unit Moon512decal.dds
13:15:38: New texture unit Moon512normalmap.dds
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: Moon_mesh.... done
13:15:38: Exporting Object: Earth
13:15:38: Object has 1 texture sets
13:15:38: Compiling material oFusion_Earth
13:15:38: New texture unit Earth512decal.dds
13:15:38: New texture unit Earth512gloss.dds
13:15:38: New texture unit Earth512normalmap.dds
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: Earth_mesh.... done
13:15:38: Exporting Object: EarthClouds
13:15:38: Object has 1 texture sets
13:15:38: Compiling material oFusion_EarthClouds
13:15:38: New texture unit EarthClouds512decal.dds
13:15:38: New texture unit StockGrey4x4.dds
13:15:38: New texture unit EarthClouds512normalmap.dds
13:15:38: Building Tangent Vectors....
13:15:38: done
13:15:38: Mesh: EarthClouds_mesh.... done
13:15:38: Exporting Helper: LevelInfo
13:15:38: , of type: PointHelper
13:15:38:
== Exporting Materials ==
13:15:38: Billboard_JupiterHalo
13:15:38: oFusion_Jupiter
13:15:38: Billboard_StarLayer1
13:15:38: Billboard_StarLayer2
13:15:38: oFusion_Moon
13:15:38: oFusion_Earth
13:15:38: oFusion_EarthClouds
13:15:38: 7 material(s) exported to dogfight1.material
Rak'kar
11-02-2007 21:32:03
The error is in the log, but is easy to overlook:
13:15:38: Caught exception in compilemesh()
13:15:38: Please report it
The mesh is a geosphere, radius 28, segments 3, Icosa, smooth and generate mapping coords is checked.
I'm not sure if that's relevant though since it's worked other times. It's probably the material in some way.
Ogre Log
13:10:57: Creating resource group General
13:10:57: Creating resource group Internal
13:10:57: Creating resource group Autodetect
13:10:57: Registering ResourceManager for type Mesh
13:10:57: Registering ResourceManager for type Skeleton
13:10:57: Registering ResourceManager for type Material
13:10:57: Material Billboard_JupiterHalo was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material Billboard_JupiterHalo to queue.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'JupiterBillboard_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to JupiterBillboard.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material oFusion_Pluto was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material oFusion_Pluto to queue.
13:10:57: MaterialSerializer : done.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'JupiterMoon_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to JupiterMoon.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material oFusion_Jupiter was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material oFusion_Jupiter to queue.
13:10:57: MaterialSerializer : done.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'JupiterG_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to JupiterG.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material Billboard_StarLayer1 was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material Billboard_StarLayer1 to queue.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'StarLayer1_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to StarLayer1.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material Billboard_StarLayer2 was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material Billboard_StarLayer2 to queue.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'StarLayer2_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to StarLayer2.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material oFusion_Moon was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material oFusion_Moon to queue.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'Moon_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to Moon.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material oFusion_Earth was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material oFusion_Earth to queue.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'Earth_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to Earth.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: Material oFusion_EarthClouds was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
13:10:57: MaterialSerializer : writing material oFusion_EarthClouds to queue.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : parsing texture layer.
13:10:57: MaterialSerializer : done.
13:10:57: WARNING: Mesh instance 'EarthClouds_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:10:57: MeshSerializer writing mesh data to EarthClouds.mesh...
13:10:57: File header written.
13:10:57: Writing mesh data...
13:10:57: Writing submesh...
13:10:57: Exporting submesh texture aliases...
13:10:57: Submesh texture aliases exported.
13:10:57: Submesh exported.
13:10:57: Exporting bounds information....
13:10:57: Bounds information exported.
13:10:57: Exporting submesh name table...
13:10:57: Submesh name table exported.
13:10:57: Mesh data exported.
13:10:57: MeshSerializer export successful.
13:10:57: MaterialSerializer : writing material(s) to material script : dogfight1.material
13:10:57: MaterialSerializer : done.
13:10:58: Unregistering ResourceManager for type Mesh
13:10:58: Unregistering ResourceManager for type Skeleton
13:10:58: Unregistering ResourceManager for type Material
The relevant object is called "Pluto"
Lioric
12-02-2007 16:16:42
I will review the scene immediately
This seems to be related to the gpu shader parameters, probably that material exports correctly if you open the "Shader Parameter Editor" for the "BumpFp_cg" fragment/pixel shader and change any value