Texture questions

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.

Texture questions // New Users

1  |  

Post by Musikman // May 3, 2009, 8:08am

Musikman
Total Posts: 88
Hi, I'm hoping these questions are because I'm just using wrong settings...any suggestions appreciated!


1. Color>.........Once I apply (for example) the brick texture onto a cube, how do I change the color of it if for some reason I wanted blue bricks? Can't find a color selector listed in the ME panel.


2. Distorted/Blurry Grass>.............I used a Constant Texture applied to a plane & then added Grass1.tga bitmap, but looks kind of blurry/distorted or stretched out, (not realistic looking), how would I tweak it to look cleaner, regardless of how it's sized. Not sure if I'm explaining this correctly??? Tried starting with Texture D3D instead of Constant Tex, then add grass, thought maybe that was why, but same result, (Therefore, I assume each texture is always replaced by the next one applied, not added to it.) Wondering if the bitmap itself was created to look that way and can't be changed?


3. Painting Faces>........When I used "paint faces with current texture" and tried painting one small face of a cube using the skull bitmap, then tried painting another face with the leaves bitmap, I don't get the whole skull or leaf, only a small piece of the whole picture gets painted onto whichever face I select to paint. Is there a way to have the whole bitmap as it's shown in the thumbnail appear in full on only one face/segment of an object ?



Thank you!


Paul

Post by TomG // May 4, 2009, 12:55am

TomG
Total Posts: 3397
1. If its procedural, then you can only change the option if it is given as a setting in the shader. No setting means you cant change it. If you are using a texture map, then you have to edit the image being used, you can't alter the color in the shader itself.



2. Sounds like UV mapping. The shader is being stretched over the object. Note that if your object is larger on screen (say 500 pixels wide) than your image used as a texture map is when opened in a 2D application (say 100 pixels wide), then the image is being expanded when shown on screen. The solution is to ensure any image used as a texture map is always bigger than its size will be in the final rendered image (or on screen in real-time).


Even then you can get stretching - if your image is square, but your object is three times longer than it is tall, the image will be stretched three times along the length. You need to adjust the UV mapping to correct for that, or adjust the number of repeats of the texture so that it repeats three times along the length (and for that, it would need to be a seamless texture).



3. This is UV mapping again - the face in question is not mapped to show a whole image. Instead, the whole image is extended across several faces. To make one face show all of an image, select it in Point Edit mode and apply a Planar UV to just that face.



HTH!

Tom

Post by Musikman // May 4, 2009, 4:38am

Musikman
Total Posts: 88
Hi Tom


Thanks for the answers. I understand #1, if no color option is shown, then color can't be changed.


On #2, if I have drawn a plane that's larger than my texture image, one solution would be to split up the plane(add polygon tool) into smaller squares & apply same (ex. grass) texture to several faces, keeping within the textures pixel proportions, correct?


On #3, not sure what "Planar UV" is. (Not very familiar with UV editor yet, just getting to it now) If I remember, maybe I was not in PE mode when I painted the faces of the cube.


Thank you! :)


Paul

Post by Jack Edwards // May 4, 2009, 4:48am

Jack Edwards
Total Posts: 4062
pic
Musicman you may want to check out my Specular Mapped Blinn material:
http://forums1.caligari.com/truespace/showthread.php?t=7791
It has texture tinting as an option.

Also you should check out Parva's shader packs. They are very professional:
http://www.parva-project.de/en/dxspack_en.html

In answer to #2, no. Use the planar projection tool to adjust the grass texture to best fit your plane. If you right click on the icon, you can get options for maintaining the aspect ratio.

To understand the problems you're having you need to learn how UV coordinates work. The easiest way to do this is to open up the UVE and select the face on your model so that you can see how it's represented in texture space (UV space).

Post by Musikman // May 4, 2009, 5:28am

Musikman
Total Posts: 88
Thank you Jack, I will definitely try your specular mapped (blinn? :)) material & Parva's shader packs.


You're right, I'm just now beginning to learn what the UVE does, so again, unfamiliar terms & territory until I have read the manual. Don't know about, or where the planar projection tool is, (or what "Planar UV" in #3 Tom mentioned), but will figure it out today. I like that I'll be able to right click to set the aspect ratio, that's exactly what I want to do.


Only thing I've tried so far in the UVE was to open it after I applied the brick texture, and as you had suggested awhile back, I just selected & moved some of the faces around to see how it would affect the texture. (Also tried the paint tool in there, but can't change the color, and seem to get stuck with that tool unless I get out of the UVE alltogether, then go back in!:D)


I appreciate all the assistance!:)


Thanks


Paul

Post by TomG // May 4, 2009, 5:42am

TomG
Total Posts: 3397
UV mapping is a big topic. It is how a 2D image is mapped onto a 3D surface.


It is hard - consider taking some wrapping paper, and setting out to wrap a football. Compare this to wrapping a square box (nice and easy). In both cases you are applying points from a 2D image (your wrapping paper) onto the 3D surface.


UV mapping is the same thing - it specifies for any given point on the 3D surface what point in the 2D image should be used to color that point (assuming we are talking a texture map here, but the same principle for normal map, except its what 2D point contains the normal information, etc).


The most basic for of UV mapping is planar - flat, like sticking a postage stamp onto something. It's just the same in 3D. If you were to take a physical object and stick the postage stamp onto the side of a cube, it will sit flat and accurate on the face - in 3D your postage stamp can magically scale to any size, so no matter how large your box, you just stick it on there (and this has no crinkly edge either, unlike a postage stamp ;) ).


But let's say you had a pyramid - stick your postage stamp on one of those triangular faces, and bits of your postage stamp stick out over the edge of it. Same in 3D with planar. This applies to any non-rectangular face of course. Only parts of your 2D image will appear on the planar-mapped face in 3D, the rest will be invisible.


There are other mappings - cubic is like taking a cardboard box and cutting it so it unfolds into a cross shape. Cylindrical is like the label wrapped around a tin of peas. And so on, and so forth.


All of them are doing the same thing, defining that "for this point on the 3D model, go to this point in a 2D image to get the information".


Picturing trying to wrap something like a football (or the reverse, of drawing a map of the 3D spherical world in 2D, see issues of how the regular look distorts locations, and how the more accurate projects look weird with all those odd cuts), and you can see how UV mapping is non-trivial.


I would start with a cube, a square texture, and apply planar mapping to one face, and adjust the UV mapping with the handles, and see how it changes how the texture is laid out on the face. Move it, stretch it, etc.


Then use Cubic mapping and see how that changes things - you can open the UV editor there to see the unfolded cube layout, and see just what parts of your 2D image that is using. Try then editing your image in a 2D application to make a die, with the numbers or dots on each face.


That should give you a good start on UV mapping.


HTH!

Tom

Post by Musikman // May 4, 2009, 3:58pm

Musikman
Total Posts: 88
Thanks very much everyone for the details, as you said Tom, this (UV & Textures) is a big topic and will require some study & practice. I hope there will be a UVE video tutorial in the future, Jack did mention that (& possible plugin to sync audio to morph), but understand he is extremely busy. I'm sure it will be well worth the wait & greatly appreciated Jack!:)


Can anyone explain why when I load some of the shaders from the library browser into my library panel, some (or in some cases, all) have NA on them? Just playing here, haven't tried using shaders yet so I thought I'd open the library & at least look at them. What situation would require me to make use of these?


Thank you!:)


Paul

Post by Jack Edwards // May 4, 2009, 4:46pm

Jack Edwards
Total Posts: 4062
pic
The "NA" appears when the library doesn't know what icon to give them. It's nothing to worry about. ;)
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