Page 2 of 2
Posted: Thu Jan 08, 2009 4:27 pm
by night_hawk
Milkshape doesn't import .x directly, but via Tools-DirectX Tools (or something like that).
Posted: Fri Jan 09, 2009 12:57 am
by christianclavet
poulpi33 wrote:hi christianclavet
(c'est français ca non ?
)
This can't work for lightmaps because this is the exact same faces wich need two uv coords.
Definitely need a way to easily import meshs with multiples coords from max, couldn't live without that !
Oui, C'est Français (au Québec/Canada)
Humm, I understand more your problem.
You would need to map a UV set to the other (Using the Lightmap UV set as a reference to create the other texture).
This would be a lot of work. Your Lightmapping software does not allow to use a reference UV when creating the Lightmaps?
One thing you could use while you search for a solution, is to take bake the textures in 3DS. It can use a UV channel for a reference and not create another UV set. You could create a map for the texture and another one for the illumination directly in MAX (I would propose then to activate the radiosity with the ambiant occlusion feature and do a render to texture in MAX then use them). As I said previously Max can use a specific channel as a reference so all the map you'll do there will be mapped on the same UV.
Would be interesting to know if there is a tool to remap a UV to another (Take a texture, a cut/paste the pixel as if it were remapped to another UV. It should exist somewhere...
Posted: Fri Jan 09, 2009 1:33 pm
by poulpi33
christianclavet,
I'm not using 3ds baking auto uv, i'm doing both uv manually, and i need 2 different uv for diffuse and lightmap. (because diffusemap need to tile a lot while the lightmap need to cover the full mesh once)
thanks night_hawk,
I've imported the .x mesh in milkshape and re-exported it in .x, and it works. Like hybrid said, that confirm the problem is coming from how the .x is writen by pand exporter, wich seems differents from others.
I will try kW X-porter.
We can't batch import/export meshs with milkshape. If someone know a way to convert multiple .x files at once i'm interested, that would be at least a usable workaround.
Posted: Fri Jan 09, 2009 1:54 pm
by bitplane
If
Microsoft's meshviewer works, you can find the source in the DirectX SDK. So you should be able to knock up a tool to batch the conversion.
If you do this, it would be nice if you posted the source and binary for the rest of the community.. The more options we have the better

Posted: Mon Jan 12, 2009 12:13 am
by poulpi33
Couldn't compil kw-xport for max 2009 64bit, so couldn't tried it for now.
I will install max 2009 32bit later and try again.
http://www.kwxport.org/
I've tried using the second uv with the .x mesh exported from max with panda exporter and then re-saved in .x with milkshape, the mesh load fine but UV2 still not there.
Here both .x meshs files, texture, and the shader i'm using:
http://www.ecranbl.eu/irr/
Posted: Mon Jan 12, 2009 12:23 am
by hybrid
Well, don't use that Milkshape exporter, as it seems to lack support for FVF data (the only way to store 2nd texture coord in .x). But the latest SVN version of Irrlicht should also properly support your .x files now - including the 2nd texture coord.
Posted: Mon Jan 12, 2009 1:15 am
by poulpi33
I confirm it works !
That great to see how fast this issue has been addressed.
thanks !
Posted: Thu Jan 15, 2009 2:14 pm
by skumar
hi there is a way to export in b3d .....
In 3ds max apply diffuse textures in channel 1 and lightmap in the self illumination map in channel 2. Export as .3ds file.
Now import (File->merge) in gile[s] and then from there export as b3d.
gile[s] can be downloaded for free from this link
http://www.frecle.net/index.php?show=giles.download
Posted: Fri Jan 16, 2009 1:01 pm
by poulpi33
skumar wrote:hi there is a way to export in b3d .....
In 3ds max apply diffuse textures in channel 1 and lightmap in the self illumination map in channel 2. Export as .3ds file.
No it won't work because .3ds file does not support multiples UV coords.
Posted: Mon Jan 19, 2009 6:12 am
by zillion42
I've imported the .x mesh in milkshape and re-exported it in .x, and it works. Like hybrid said, that confirm the problem is coming from how the .x is writen by pand exporter, wich seems differents from others.
I will try kW X-porter.
after reading over the thread again I'm little confused now which exporter are you using in the end to export .x files with multiple uv's from your 3d application, making use of the FVF (flexible vertex format) which irrlicht can read. Or even better I'm actually really interested in a pipline batch way to export x meshes like you suggested earlier. any progress ?
Posted: Mon Jan 19, 2009 10:36 am
by poulpi33
zillion42 wrote:I've imported the .x mesh in milkshape and re-exported it in .x, and it works. Like hybrid said, that confirm the problem is coming from how the .x is writen by pand exporter, wich seems differents from others.
I will try kW X-porter.
after reading over the thread again I'm little confused now which exporter are you using in the end to export .x files with multiple uv's from your 3d application, making use of the FVF (flexible vertex format) which irrlicht can read. Or even better I'm actually really interested in a pipline batch way to export x meshes like you suggested earlier. any progress ?
I was only talkink about mesh drawing here, not uv2, should have precised this.
The only exporter that allow 2 UV to be exported from max to irrlicht is Panda exporter.
And for batch exporting multiples meshs, it can be done with maxscript, but i don't know if we can access panda exporter settings with maxscript, i will try it ...
Posted: Mon Jan 19, 2009 7:43 pm
by poulpi33
Batch export is possible ! With
panda exporter maxscript tool