how to export texture with uvw coordinates

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
FredOgre
Gnoblar
Posts: 7
Joined: Tue Sep 13, 2005 4:40 pm

how to export texture with uvw coordinates

Post by FredOgre »

Hi People!
I'm having some problems here..
Im using 3dsmax to model and texture a simple model. In this case a House. I managed to bake all the textures into one with Render to Texture and Unwrap modifier. I then export with 3dssceneexporter script.
Then i export my house in a single mesh and choose the option "Export material"

Then i open MeshViewer, and choose Open XML file for conversion. Then when it opens the texture, the texture is not right in the model, looks like the texture was stamped in the house without any uvw coordinates.

I've noticed that DDS files have uvw coordinates built i and when i open a mesh with DDS texture in meshviewer it works great.
But i can't export my texture to DDS within 3dsmax because it gives me some kind of I\O error. Is there any other file format i could export my texture , keeping the uvw coordinates so that when i open my mesh with meshviewer it would display it correctly?

I hope i could explain it well.. Sorry my english.
Thanks in advance for any help you guys could give me!


Fred
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

If you use 3D coordinates on a model then you have no choice but to use a DDS texture, since that can handle 3D textures. Other image formats cannot, they can only contain 2D textures (ie 2D uv coordinates, not uvw).

I seriously doubt you need 3D texture coordinates in any case - can't you unwrap the model and use a single 2D texture?
FredOgre
Gnoblar
Posts: 7
Joined: Tue Sep 13, 2005 4:40 pm

Post by FredOgre »

Thanks for the reply, i try to use a 2d texture just like in Image

But when i load the mesh and material in Meshviewer, it applies the 2d texture the wrong method.. Looks like it just stamped the texture in the model and ofcourse it looks wrong.

I dont use octopus and im not aware of what its for.. What's my problem? :lol:
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

It must be the way you're exporting. Please check the docs that come with the exporter and the tips in the wiki on 3DS, I can't help you directly since I don't own it.
Bloodypriest
Goblin
Posts: 223
Joined: Thu Aug 18, 2005 2:54 pm

Post by Bloodypriest »

I think there are plugins for 3d modellers that can show you in real-time what the 2d texture will look like on your model. Can't name plugins and can't name for which modellers though so I'm really no help there.

As for 3d textures, you only really need them when you have a solid object which you can cut through and see the inside (think of that human body project for instance).
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post by P »

I don't think FredOgre was speaking about 3D textures, he probably said "uvw" because it's the name of the modifier under 3D Studio Max.

UV coordinates are stored inside the .mesh ( or .mesh.xml before the conversion ), it has nothing to do with the texture your export.

Maybe your .material file is wrong, please paste it here. Or your mesh has not been exported correctly.
FredOgre
Gnoblar
Posts: 7
Joined: Tue Sep 13, 2005 4:40 pm

Post by FredOgre »

Yes thats correct. I meant 2d textures. When i export the mesh and the material guess it doesnt work good. I cant paste the material code here because i'm not home.

I tried once with a Multi Sub Object material and it worked great. But with a Standard Material it did not work. When i load the mesh in Meshviewer it doesnt apply the texture correctly.

My goal is to export the baked texture. One single image file with all the textures of the house in a standard material. It works great on 3dsmax but when i open it on mesh viewer it messes up..
Any help?
Thanks in advance guys! :D
FredOgre
Gnoblar
Posts: 7
Joined: Tue Sep 13, 2005 4:40 pm

Post by FredOgre »

Nevermind i got it. It was a problem with Uv channel number :oops:
Post Reply