I've started writing a maxscript plugin to export .irr scene and .irrmesh
You can download it here, put irrMax.mzp in your plugins folder.
I did it in max 2009 but should work on 2008, and may work on max 9.
What's actually visible in the interface but do not work yet:
- material: "lighted" and "shadows" custom properties are not exported
- UV in material texture is used by the exporter to know if the mesh should be exported with 2Tcoords, but is not exported as custom properties (standard irrlicht lightmap material use only uv1 for texture1 ?)
- camera "orthogonal" not exported
- light "Attenuation" and cones angles not exported
Limitations:
- no smoothing between faces with different material id.
- camera aspect is linked to max render aspect setting, so you can only have 1 aspect for all cameras
- everything is done with maxscript, so can be slow on heavy meshs with multiples smoothing groups and uv seams
how "auto" type for meshs works:
If the mesh don't have an irrMat material applied, it will be exported as a standard mesh with 1 uv.
If irrMat is applied and:
- no texture file in texture0, the mesh will be exported as standard but with no uv (set to 0,0,0 in irrmesh); and will not be splitted by uv seams (less vertices)
- material type == lightmap and texture1 uv == 2, will be exported as 2tcoords
- material type == normal or paralax map, exported as tangents type
- else standard with 1 uv
Every objects wich are not geometry or one of the special irrlicht objects (box, light...), will be exported as empty node
I did a few tests with simple scenes and irredit. It is likely you will get errors. In this case please check the maxscript listener and copy some info here.
Also i'm printing some useful info about exported mesh, check them in the listener to know how your meshs are exported.
note about multi-materials:
meshs with multiples ids will be exported with one mesh buffer per id with theirs own material. One mesh buffer will be created per 'material id' set to the sub-object faces, whatever you have a multi-material applied or not, so check ids.
Instances meshs will be exported once. Meshs files names are the same as objects names, so instances must have the same names, and non instances must have differents names.
What you see in max viewport is not exactly what you will get in irrlicht. To fine tune your scene and lights use irredit.
IrrMax (wip)
Cool, this is a great step in the Irrlicht pipeline, I don't use MAX personally but I think alot of people will find this useful.
I wish someone has time to update the IrrMesh format to include binary data and animation so these plugins can be more useful though.
I wish someone has time to update the IrrMesh format to include binary data and animation so these plugins can be more useful though.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 5
- Joined: Fri Oct 24, 2008 8:42 pm
Hi.
Your Project is really great
But When I tried to change material type to "irrMat", This Error has occurred :
Your Project is really great
But When I tried to change material type to "irrMat", This Error has occurred :
And I saw this text in MaxScript Listener,s window,-Type Error: Call needs function or class , got: undefined
I'm Using 3ds 2009-SP1-- Error occurred in create(); filename: C:\DOCUME~1\ICE_HE~1\LOCALS~1\Temp\mzptmp2\irrMaterial.mse; position: 14274
-- Defined in encrypted script
>> Max Script Scripted Plugin Handler Exception: -- Type error: Call needs function or class, got: undefined <<
I found it is a problem with loading plugins when there are multiples of them in one file. Until i correct it, you can simply manually execute irrMax.mzp from the maxscript menu once after max started.Ali_Hashemi wrote: But When I tried to change material type to "irrMat", This Error has occurred :
-
- Posts: 5
- Joined: Fri Oct 24, 2008 8:42 pm