[Fixed] Max 2009 -> Irrlicht, multiple UVs, batch export

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

Milkshape doesn't import .x directly, but via Tools-DirectX Tools (or something like that).
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

poulpi33 wrote:hi christianclavet (c'est français ca non ? :wink:)

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) :wink:

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...
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post 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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post 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 :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post 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/
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post by poulpi33 »

I confirm it works !

That great to see how fast this issue has been addressed.

thanks !
skumar
Posts: 201
Joined: Thu Feb 14, 2008 6:24 pm
Location: kerala state india
Contact:

Post 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
skumar
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post 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.
zillion42
Posts: 324
Joined: Wed Aug 29, 2007 12:32 am
Location: Hamburg, Germany

Post 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 ?
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post 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 ...
poulpi33
Posts: 31
Joined: Tue Jan 06, 2009 8:01 pm
Location: Bordeaux, France

Post by poulpi33 »

Batch export is possible ! With panda exporter maxscript tool
Post Reply