This project is read-only.

Model import error in Xen 1.6 beta

May 20, 2009 at 4:01 PM
Edited May 20, 2009 at 4:02 PM


I was upgraded to 1.6 on Xen 1.5.3. But 1.5.3 works well with the model file, the error was 1.6.


3790 line in CameraControl.cs

System.Threading.Interlocked.Increment(ref application.currentFrame.BinaryShadersSet);
int[] arr = vertexShader.Tag as int[]; <- NullReferenceException


3ds MAX kw-Xport of output file, allowing them to use the model, the model of materials used in Multi / Sub object is. I try that contains the DirectX Shader material, it worked well.

But I can't modeling with using the DirectX Shader material.

For creating the model for Xen, I need a basic knowledge of it, but I do not know where to learn.

For use Xen with DirectX X File (created in 3ds MAX) and DirectX Shader, What do I need to learn?

I want advice that for Modeling for Xen with 3dsmax and for DirectX Shader. (example, Useful professional book ... )


PS. I am not proficient in English. Hope of understanding.


May 22, 2009 at 12:09 AM

Sorry, I do not understand why you would get that error. I cannot think of a reason why 'vertexShader' would be null.

When upgrading to 1.6, did you run the prebuild?


Xen uses the XNA Model importer.
When building the model importer, I could not get the XNA importer to import DirectX Shaders correctly.
Also, models in xen may require upto 3 versions of a shader (normal, animated (blending) and instancing).

You can manually override a shader in C# code.
This can be done with the 'ModelInstanceShaderProvider' class, and the 'SetShaderOverride' method in the ModelInstance class.

(Sorry if this reply is late)

May 22, 2009 at 3:20 AM


I solved problem with using Panda-X Exporter. (another plugin for Exporting DirectX Xfile in 3dsMAX)

Though using completely same model file, i don't know the reason why kw-port doesn't work. 


anyway, Xen is great! It is also convenient for beginner.


May 24, 2009 at 2:33 AM

Great! Good to hear things are working OK.

I might make a note in the docs for the model tutorial that Panda-X exporter works well.