Applying a texture

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Applying a texture // New Users

1  |  

Post by LongWolf // Jan 8, 2009, 9:40am

LongWolf
Total Posts: 62
Is there as good tutorial on applying textures?
This thing is driving me crazy.

In the image below, the top object is my card shape.
You can see what the texture is doing.

I tried adding a Plane (the lower obj), then textureing it.
It looks pretty good.
It was textured without changing any of the settings used on the card.
What the heck is going on?

Post by TomG // Jan 8, 2009, 9:56am

TomG
Total Posts: 3397
Apply Planar UV to the top object.


UV mapping is VERY complex. Look at how to unwrap a map of the world with all those weird projects that exist to do it. Same thing, just in reverse.


Basically though, each point on the 3D surface has to be mapped to a point in a 2D image. This is UV mapping, mapping the x,y,z of the 3D space down into just the two dimensions in the image.


On a simple object like your card, it should be simple Planar UV. The image is "pasted on" like a piece of paper being stuck onto a card in the real world. Great for flat surfaces.


Try pasting a piece of paper onto a soccer ball though, and note how it crinkles and creases. You can't stick Planar UV so well onto curved surfaces. And that's where you get into more complex mappings, like spherical, cylindrical etc.


On even more complex objects, you may need different mappings for different parts. Eg a Planar UV for the front of the house (everything pastes on flat to that), but a separate Planar UV for the front of the sloping roof (its at an angle to the front of the house, so can't use the same Planar UV), and another Planar UV for the other side of the sloping roof, and another Planar UV for the back, and one Planar UV for each side.


You could do Cubic to the whole object, then apply separate Planar UV s to the two sloping roof faces. That would be good in this case.


You can use unwrapping programs to help too, some free or low cost ones out there are very handy such as UV Unwrap and Lithunwrap.


But right now, just apply Planar UV and you should be good - you may need one for the front and back, to stop mirroring of the back face texture.


HTH!

Tom


PS - Point Editing will change a UV mapping and you may need to reapply it. That's what has happened to your object, although all primitives start with working UVs in tS, as you push, pull, scale and move vertices, edges and faces, the UV map gets more and more "inappropriate", so you'll find once done modeling, you'll need to apply a UV map to get the textures mapped on properly. You'll also find doing modeling after applying the UV map may need you to reapply the mapping too, depending on just how much and what modeling you do.


PPS - you'll need to scale your UV to fit, since you have "cut out" parts like the rounded corners - a default planar will put the whole image into the face, ignoring the fact you want to "trim off" the edges of the image. Just scale the Planar UV mapping until the right bit of the image is mapped onto your face.

Post by LongWolf // Jan 8, 2009, 10:54am

LongWolf
Total Posts: 62
Thx Tom,


That helped.

It's still a pita, but at least I'm getting somewhere :)

Post by LongWolf // Jan 8, 2009, 11:48am

LongWolf
Total Posts: 62
I take back my pita statement.
I had noticed that under display options, the 'Txt Res' button was set to 128x128.
So I had re-sized my 72x52 card picture to 128x92 then placed it on a 128x128 background.

In tS I was fighting the U/V Repts and U/V Offsets.
But decided to just try loading the original 72x52 pic.

BOOM, it fell right into place :D
Still had to tweak the U and V Repts to 1.01 each, but that wasn't bad!

Ya gota love that learning curve. :)
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn