PDA

View Full Version : can UV Texture be set to something other than 1x1?


Stone
10-23-2003, 09:37 AM
i have the problem of working with non-square uv maps - for instance 512x64 or worse.

isn't there a way to change the aspect of the uv texture viewport to show the uv map with the right aspect? its pretty hard to map anything when it insists on showing the texture and uv's fixed as 1x1 when the texture actually is 1x8 in this case.

not sure my problem makes sense ;) so i tried attaching a little pic to show it.

/stone

SplineGod
10-23-2003, 10:20 AM
You change the aspect by adjusting the UV coordinates in the UV view. I have some simple tutorials on my site that show the basics of UV mapping. Follow the link in my signature.

Stone
10-23-2003, 11:48 AM
hmm, thanks larry, but i guess i didnt make myself clear - i looked through your mapping videos 1 and 2, but i do know how to texture map ;)

my problem is, as seen from the attached picture, that my textures are highly irregular, this one being 512x64 - and the uv texture edit view, squeezes my texture map enormously, making it impossible to do preciese mapping. instead of squeezing my texture into a square, i want the uv edit view to match the texture. :surprised

is it possible to make the uv view and editing use the correct proportions from the texture map?

/stone

stilian
10-23-2003, 12:29 PM
my idea - if you printscreen or unrap and go to the fotoshop you can freetransfomed to the position of aspekt wath you ont to be -
for example if you have 512-512 you can strech it to 512-84 after this you will have the same square in UV edit buth diferent aspect
meybe this can help you

anieves
10-23-2003, 01:29 PM
If I understand what you want to do just make a square cube and the object you want to match to fit in the cube and make the uv map, then just delete the cube and move the object to match the texture....

Stone
10-23-2003, 03:50 PM
what i want is to adjust the interface in modeler - the uv texture viewmode, to be preciese.

i want the uv edit to show my texture with the right proportions instead of squeezing it down to a square - making it very hard to do good uv mapping.

i've tried making another picture - its the grid/shape of the uv edit view i want to change, so that i can position my uv's easier instead of having to work with a stretched map.

the left side of the pic is how it look when you edit an iregular texture, like my 512x64 one - it stretches the texture terrible - the right hand side is how i want it to look, if possible.

can that be done? can the uv edit viewmode be changed so the aspect match the shape of the texture?

/stone

comanche
10-23-2003, 05:01 PM
Unfortunately, Lightwave can not show images other than square in the UV texture view. :thumbsdow

Maybe in [8]? :surprised

Cheers,
Andreas

madrenderman
10-23-2003, 05:17 PM
often i find a square uv annoying and not simple to understand the shape of edge.

i did a simple work:

-open uvview (for a face for example)
-select all poly of map
-unweld all
-stretch all polys to have a correct or more confortable proportion
-merge all point

now you have a more comfortable distribution of poly on your uv space

naturally you have a lot of space free but object is more recognizable in the uv view, you can use a texture a bit more big than usual, but if you do it in a plain color, is not a big memory waste.

or if you prefer (better solution) , you can strech numerically the view, then, when you have did the texture, you can restore original proportion, to avoid to waste space on uv and memory.

have nice day.

Stone
10-23-2003, 05:39 PM
ah thank you comanche, finally i got my problem explained - a shame there is no solution. or maybe someone know of any?

madrenderman, what you suggest is that i in this case make the 512x64 texture 512x512 while i work? the cut it down afterwards? so that its only the leftmost 64 pixels thats actually used? i guess it might work .. but i can foresee the uv map might not match exactly when scaled up afterwards - i'll try it ;)

thanks to you all, though i had hoped for the possibility to set the correct aspect and avoid the stretching.

/stone

anieves
10-23-2003, 05:55 PM
oh, ok I get it now. I never saw the need for that since I paint my textures after the object is finished and never encountered the dilema that you have. I guess for game dev what you what to do would be very helpful... send the feature request to Newtek...

uncon
10-23-2003, 06:03 PM
I think I understand what you want, but I don't know if it is necessary. It isn't that the UV mapping is bad, or any less precise, things are just stretched out. The only way around it is to add extra pixels to your image, figure out how much you need to squish your 1x1 uv map to fit the corect size, edit like a mad man (or calm person, however you prefer to work with UV's) then un squisherize the UV co-ords back to 1x1.

Very complicated though.

Stone
10-23-2003, 07:27 PM
Originally posted by anieves
[..] I guess for game dev what you what to do would be very helpful... send the feature request to Newtek...

well, i am a gamedeveloper and i have to work with as small textures as possible for the same reason. i often have to use very irregular textures like 512 x 32 or as in the sword in this case a 512 x 64.

i would love to suggest it to newtek, but just look at how many posts it took to even explain my problem :shrug:

its a rather important feature though when you arnt lucky enough to get to work regular maps and large sizes. perhaps it will be part of their 'better suitable for gamedeveloping' promiss - i hope so ...

/stone

leigh
10-23-2003, 07:27 PM
Sure the UV template is square, but there is no reason why you can't just edit the UV map itself to be the shape you want it to be :shrug:

CIM
10-23-2003, 07:56 PM
The UV template is supposed to be square, since it goes from 0 to 1 in both U and V.

If you want to distort your UVs, manually do it or use the Transform UV Values. Simple. ;)

evilemil
10-23-2003, 08:04 PM
uncon uses a very common technique.
I would actually use this if i had prepainted textures.

normally, i feel more comfortable to lay out my UVs (in Max or LW, does not matter) with a checkerboard texture.
Same size like the final texture.
This checkerboard has "square" checkers. It may look odd in the UV view, but this does not matter so much, as it is more important to have a nice flow of uvs (squares) on the model (you check it in the perspective view), than to have the perfect solution in the uvview.

I agree, this workaround is not the best solution, but i think NT will fix this soon, as they are targeting the gamesmarket.

leigh
10-23-2003, 08:04 PM
Yep, CIM hit the nail on the head :)

Stone
10-23-2003, 09:08 PM
Originally posted by CIM
The UV template is supposed to be square, since it goes from 0 to 1 in both U and V.

If you want to distort your UVs, manually do it or use the Transform UV Values. Simple. ;)

sure uv goes from 0 to 1, but that doesnt mean they need be square, the axis can still scale independet.

what does matter though is that you can work comftable with them, and if that requires to stretch the uv template so it matches the actual texture used, then i dont see why not to do it.

you guys may be fortunate enough to work with 3000x3000 textures or 'just' 512x512, but in a game like ours thats not an option, hence the very irregular types.

try to look at the little pictures i supplied and see if you wouldn't prefer if the uv template was able to scale on the axis if you were to do precise mapping on it.

/stone

SplineGod
10-23-2003, 09:54 PM
Ive worked on a lot of games in the past and you always adjust UV coords to fit the image. I think it would be nice to have the ability to adjust the image also. Not having that ability has never seemed to keep me from just adjusting the UVs... :)

tburbage3
10-25-2003, 11:20 PM
Stone,

I do see what you mean. You would like to be able to have *display* scaling of the UV window be independent on U and V and, as an option, based on the image aspect ratio. This would not affect the actual parameterization which is by definition 0.0-1.0 for both U and V as mapped to the image.

But as already said, LW's design-time UV viewport doesn't work that way. In any case, the design-time 1:1 aspect ratio display doesn't affect the actual mapping of the mesh UV coordinates in UV space. Maybe the LW team will implement this when they implement snapping UVs to pixels :cool:

Tudor
10-26-2003, 01:23 PM
This is how I do it:

Make the UVmap in LW to be square.
Export UVmap to photoshop with the eps exporter.
Scale image to whatever you want. 512*64 or whatever.
Paint texture.
Apply in photoshop.
Same goes when I do stuff in Maya.

Stone
10-26-2003, 06:15 PM
tudor: more often than not the textures are painted first, then the uv map applied - reson is the reuse of many of the textures on a lot of different items, as well as planing the textures to take up as little space as possible after the object is modeled.

tburbage3: yeah, snapping to pixels would be very sweet as well.

/edit: corrected this last sentence ..

lightwave would be better suited for game dev., and it would go well with newteks move towards embracing the games department, if those couple features gets added.

/stone

Tudor
10-26-2003, 09:56 PM
I know that textures are often painted first. I work with games and mess with stuff like this every day. If that is the case it is just a matter of reversing the process. Stretch the UV to fit in a square, but distorted image.
Honestly I don't even know if other programs even allow non-square UV maps. What I do know is that all of us at work (where we use mostly Maya), just accept the fact that UV's are square. One reason is that resuing non square imagemaps is more limited than square ones. Another is that square UVs are packed into memory much more efficient. If all your UV's are square maps it is also quite easy to change materials back and forth. Lets say that you have a cube and a ball. The cube is 256*64 and the ball 256*256. Now what would the UV's look like if you want to change some texture space and use the same UVmap and texture for both?

ninjaman
10-26-2003, 11:25 PM
You might wannna try this L-Script: Greatbox

Go to: http://www.m2estudios.com/plugins.html
and scroll down to bottom of page.

Ninjaman

Stone
10-26-2003, 11:50 PM
Originally posted by Tudor
Honestly I don't even know if other programs even allow non-square UV maps. What I do know is that all of us at work (where we use mostly Maya), just accept the fact that UV's are square.

i belive max can do it. if not, there is no reason for lightwave not to be the first - be innovative instead of just accepting a limitation? ;)

One reason is that resuing non square imagemaps is more limited than square ones. Another is that square UVs are packed into memory much more efficient. If all your UV's are square maps it is also quite easy to change materials back and forth.

yeah, its easier to change between some maps if they are of the same size.

but, on modern graphics cards square maps does not fit better in memory than irregular ones - and making them square when you could really have used a regtangle of half the size, is memory wasted.

imagine making a sword, the blade needs be of a decent length, so a 512 point heigh texture is chosen, however it need not be very wide, so 64 should easily do. now, if you actually made that texture square you would waste 80percent of the texturememory.

/stone

CGTalk Moderation
01-16-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.