Multiple Textures on Single-Part Model

Started by AGP, August 16, 2014, 06:42:45 PM

Previous topic - Next topic

AGP


AGP

Actually, I have new information on this particular model: it seems that bones sees it as two parts, thankfully. But when I directly call setTexture on the individual parts, the following two textures produce the following render:








As a matter of fact, I can only see non-black at all because I scaled the textured down from 2048x2048 to 1024x1024. It seems that either Bones or OgreMax is completely remapping the model. Any help would be appreciated.

raft

you cannot assign multiple textures to a single Animated3D. unless of course you know the polygon id's and set textures via PolygonManager.

for scaling the texture, try calling Object3D.recreateTextureCoords after assigning the scaling the texture.

AGP

#3
I tried recreateTextureCoords(), but nothing changed. If I visually understood the problem I would just edit the texture itself. I don't even know whether it's Bones or OgreMax messing with the coordinates, but the coordinates have changed.

Did you read Egon's point that you in fact can assign multiple textures to a single Object3D? Obviously your loader doesn't do it, and it's possible that the information is lost by the time we create a .bones file, but wouldn't it be nice to recover this functionality for Bones? I think that it's worth a look at his loaders. At any rate, that's no longer the current issue.

AGP

I don't think that you understood my current problem at all. I would rather that the textures be at 2048x2048. But at that resolution, all I get is black (clearly because only the black part of the texture is being textured on the models). When I edit the textures to rescale them to 1024x1024, I get some of the non-black texture parts (albeit the wrong parts in the wrong places).

raft

Quote from: AGP on August 17, 2014, 08:48:08 PM
Did you read Egon's point that you in fact can assign multiple textures to a single Object3D? Obviously your loader doesn't do it, and it's possible that the information is lost by the time we create a .bones file, but wouldn't it be nice to recover this functionality for Bones? I think that it's worth a look at his loaders. At any rate, that's no longer the current issue.
yes i know core jPCT can load objects with multiple textures. but it cannot do so for example for MD2 models. i've no intention to add that for now. also i'm not sure if it's actually possible.

Quote from: AGP on August 17, 2014, 08:54:27 PM
I don't think that you understood my current problem at all. I would rather that the textures be at 2048x2048. But at that resolution, all I get is black (clearly because only the black part of the texture is being textured on the models). When I edit the textures to rescale them to 1024x1024, I get some of the non-black texture parts (albeit the wrong parts in the wrong places).
if you call recreateTextureCoords scaling a texture shouldnt change what parts of texture is mapped and hence is visible.

AGP

As I said, I did call it. The problem IS NOT WITH THE SCALING. Somewhere along the line the texture coordinates got changed.

raft


AGP

That's not cool, man. Would you like to have a look at the model?

raft


AGP

Why wouldn't it help? Is there no way to write a tester that unwraps the coordinates? Something like the following image? This model is important to me.


raft

it wouldnt help since as you said there is something wrong with its texture coordinates. what am i supposed to do with a model with some inccoreect coordinates? from my point of view they are just some numbers instead of another numbers.

this doesnt happen with other models so i can assume this happens either because of your model or your exporter settings.

AGP

It's not OgreMax's settings, because I did nothing different than usual (I just set it to export XML and I synced to Mixer). But it COULD be OgreMax. I wouldn't know how to do it, but is there no way to write something like the above image? If I could see where the coordinates were I could edit the texture files to match them.

raft

just assign a texture with a grid, it would give an idea

AGP

No, I mean the right side of it (the unwrapped spaces). This is frustrating, because I've been looking for Ogre file viewers that can do this and none seem to. Then again, this would only be useful if all the textured areas are there to begin with. Do you use 3ds max? If so, would you be willing to see the problem for yourself? Because there's 50% chance that the problem occurs during importing. I know you use jME's importer, but it would be nice to verify the problem.