IrrMax (wip)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

IrrMax (wip)

Post by poulpi33 »

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.

Image

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.
Last edited by poulpi33 on Sat Mar 07, 2009 11:06 pm, edited 3 times in total.
ragyrss
Posts: 2
Joined: Mon Jan 05, 2009 1:16 pm

Post by ragyrss »

well done, hope it gets better and better.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

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.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Ali_Hashemi
Posts: 5
Joined: Fri Oct 24, 2008 8:42 pm

Post by Ali_Hashemi »

Hi.

Your Project is really great :P

But When I tried to change material type to "irrMat", This Error has occurred :
-Type Error: Call needs function or class , got: undefined
And I saw this text in MaxScript Listener,s window,
-- 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'm Using 3ds 2009-SP1
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post by poulpi33 »

Ali_Hashemi wrote: But When I tried to change material type to "irrMat", This Error has occurred :
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.
fmx

Post by fmx »

whoh, awesome!
keep up the great work, I'm looking forward to using it when its ready :D
Ali_Hashemi
Posts: 5
Joined: Fri Oct 24, 2008 8:42 pm

Post by Ali_Hashemi »

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.
Thanks a lot, and I hope you successful. 8)
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post by poulpi33 »

material error fixed.
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post by poulpi33 »

tangents and binormals are now exported
Post Reply