www.tombraiderforums.com (https://www.tombraiderforums.com/index.php)
-   XNALara (https://www.tombraiderforums.com/forumdisplay.php?f=52)
-   -   XnaLara for 3dsmax (https://www.tombraiderforums.com/showthread.php?t=181251)

mariokart64n 14-05-11 16:15

XnaLara for 3dsmax
Maxscript for importing and exporting geometry between 3dsmax and xnalara.
maxscripts tested on 3dsmax8-3dsmax2012 should work across all versions of max past v8(2005).

Videos are included below to give an idea of script operation. but are not made to teach you 3dsmax.
scripts are designed with the assumption that the user is already capable in 3dsmax.

Please leave feedback if you have an idea that would benefit the script.


MaxScript - XnaLara Import/Export
https://dl.dropbox.com/u/86746436/Ma...20Converter.ms (Updated: March 07, 2016)

VIDEO Complete Xnalara Import/Export Script:

VIDEO XNALara (Beginners Tutorial for 3dsmax):

[OUTDATED] VIDEO (Importing Models From XNALara to 3DSMAX):

[OUTDATED] VIDEO (Exporting Models From 3DSMAX to XNALara):

DeleteDoubleFaces: http://www.mediafire.com/?3dmab8ej93b9faw


Mesh Importer: http://www.mediafire.com/?z2vbc4lbbobtlwk
Ascii Exporter: http://pastebin.com/1p7GKNhg
Xnalara Converter (Updated: August 2, 2011):http://www.mediafire.com/?139hxd1wb2cbf4j

Features Yet to be added, will be included with UserInterface
- Ascii Import Support
- Ascii Editor (Reassign Textures/Rendering Group)

- Copy Materials on Export (Copies any textures used on the model to the export path)
- Fix Error with Reading Instanced Modifiers
- Multiple UV Support
- Actual Normal Recalulation
- Project CleanUp (Removes unused assets from the Project Folder)
- Add diffuse colour pickup on material gathering (export this if no diffuse map)

Notes / Research:
Mesh Spec:


DOWNLOAD DeleteDoubleFaces SCRIPT: (By Bobo)

Ventrue 15-05-11 10:14


Originally Posted by mariokart64n (Post 5415379)
Bone Limit 59?

For just one meshpart... According to Dusan, that's the hardware limit, or s/t like that. If you separate the mesh you can have as many bones as you want. (My Bayonetta port has like 300 bones. :D)

Anyway... You can still contact XNAaraL on deviantART.

mariokart64n 15-05-11 14:32

great, then its 59 per mesh piece. otherwise theres no limit, just as long as the persons hardware holds up to XXX amount of bones right?

next, are there mesh limits?

also important how are textures detected?

the paths are like: data/somewhere/mytexture_diffuse.png

1. can I ignore paths, and only state texture name.
2. can I assume that name descriptors are always present.
example: eye_diffuse.png, eye_lightmap.png
the only way I can determine a texture from each other is by reading the name "diffuse" of "lightmap"
without that, there is no other indicators in the mesh or ascii format.

I need more info on the generic format, i know that alot of the meshes are hardcoded.. so you cannot alter the meshes order or the bone order. however its possible the generic mesh type bypasses these limitations. and if it does not follow descriptors then I have to rethink the texture type detection

sn00p 15-05-11 14:43

I doubt there's mesh limit, even if it's gotta be high, since some Lara models are with 40/50 meshes.

About the paths, I guess they can be ignored if they are in the same folder as the .mesh file, Blender export the file with the full path to texture but while editing the .mesh.ascii you can let just Texture_Diff.png and will work fine.

Uhm not everyone use _diffuse/_diff or w/e is it when they release something, but I guess wouldn't hurt to be a "standard" and it's aesthetic tho.

Ventrue 15-05-11 15:00

I was thinking about the textures' detection. I think it depends on the order in the mesh.ascii. For example: There's a meshpart with a diffuse, a specular, a bump and with a lightmap. It will start like this in the mesh.ascii:

1 # uv layers
4 # textures
0 # uv layer index
0 # uv layer index
0 # uv layer index
0 # uv layer index

There's a different order for every rendergroup though...


sn00p 15-05-11 15:11

Yea the order for each group can be found here http://www.tombraiderforums.com/show...postcount=1735

Ventrue 15-05-11 15:12


Originally Posted by sn00p (Post 5417705)
Yea the order for each group can be found here http://www.tombraiderforums.com/show...postcount=1735

Just added that link to my post... xD

mariokart64n 15-05-11 15:14

I don't understand what are these groups?

is this for the hardcoded mesh files or the generic format?

if I understand correctly group 1, which is mesh 1, does diffuse, bump, light
but mesh 2 only does diffuse, bump.. something to that effect?

o0Crofty0o 15-05-11 15:39

These groups are used in generic meshes.
They tell how many textures go on one mesh part and wich ones. The order of the listed textures is quite important there^^

for eg render group 1_ wants 6 textures they have to be listed like : diffuse, lightmap, bump, mask, minibump1, minibump2

but this changes with the render groups for eg 6_ only needs 2 textures listed like: diffuse, bump

but well mesh 1 doesn't have to be render group 1. you can use every render group you want on any mesh you want.... :)

mariokart64n 15-05-11 15:42

ok so that list is only relating to the generic format. and what does groups mean?

a group of meshes..

mesh1, mesh2, etc..

or mesh1 is group1?

I'm scripting up the material section of the importer now, after thats done max import will be working.

All times are GMT. The time now is 16:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.