Jump to content

uv mapping?


snowstorm13
 Share

You are about to reply to a thread that has been inactive for 3804 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

The UV map is uploaded as part of the dae file. It is a list of where each 3D vertex is on the 2D texture plane. That tells the renderer how to stretch an applied texture over the mesh surface. Using the uploaded UV map IS the default mapping for mesh. It is possible to make a collada (dae) file without UV map data. In that case the outcome when you apply a texture is unpredictable.

The texture is a different matter. That does not get included in the colladafile, although it can be referenced there. You can upload textures at the same time as the collada file, but I don't recommend that for several reasons, including the fact that it gets uploaded, and you pay a charge, each time you change the mesh. Also, multiple copies accumulate in unexpected places in your inventory. So I recommend uploading textures separately and applying them inworld. That way you can also use local textures, making any necessary changes before you pay the upload fee.

Link to comment
Share on other sites

Drongle answered but in case that was too techie for you ----


The UV map sets the areas, direction and propotions *important* of the way a texture will be placed on your mesh inworld.

Once your mesh is mapped you can apply any old texture (let's say woodgrain on a table) to the mesh and it should (if you mapped well) look good all by itself.

If you want ambient shadows (shadows ON the object rather than cast BY the object) then you can generate an ambient map within your 3D program (in Blender it is the camera icon that gets you to the BAKE menu).

 

You can save your ambient map which is basically a graphic of how the shadows on an object look -- the shadows INSIDE a vase for example would be very dark, the ones on the outside may have very few shadows.  From there you can add a layer of  texture on top of the ambient map in your graphics program and use MULTIPY in your  to meld the two. Then export as a png or tga and add that as the texture to the mesh in world.

It is REALLY important when you are UV mapping to watch the cooresponding relationships between areas. I use a default woodgrain texture (actually several of different colors if I am using different materials) as the "default" mapping texture. That let's me see if I have the sizes of the area in good relationship to one another as well as making sure the DIRECTION is correct.

Sometimes that matters. Sometimes not. Always good just to do it the right way. Takes very little extra time.

Link to comment
Share on other sites

I do believe I know what your both saying, but maybe not totally.  You said the map should save with my.dae file, but apparently this is not the case.  From what I am understanding it should.  All the texture does in world is goes on tiled and not mapped.  I am using a woodgrain.  The render looks great.  It is just not working in world.  Idk, maybe I am just missing something.:matte-motes-bashful:

Link to comment
Share on other sites

Since I found out that I have to map the textures.  I went back to 3ds max since it is easier for me.  As far as the texture goes, i can try to get pics later, but in world it just adds the texture normally as it usually does on an object, there is no uv mapping.

Link to comment
Share on other sites

"...you only get a "one pixel" color, not a tiled pattern."

That is the most common effect. It appears that the uploader uses uninitialised memory to make the UV map. If that's all zeroes, you get the one-pixel result. In other cases, you get ramdom mapping (unless they changed it recently. It can be different each time you upload. Depends what happens to be in the referenced memory. Here's a pic. Top two have no UV map.

badcones.jpg

Link to comment
Share on other sites

To me it looks like you have a "double door". This seems to be a bug with exporting from 3ds max to SL. One of your doors has the correct UV mapping, the other has none, you can see the artifacts where the two "fight".

There have been several threads on the subjects on these forums. You might want to look them up. Make sure you check your channels before export, both on your model and in your multi-sub material.

Acording to your video, the exporter also warns you about turned edges.

I don't have a clue what you mean by "a regular texture", a texture is a texture.

Link to comment
Share on other sites

Ah I didn't read your previous post very well, I thought that was you modeling and exporting.

 

Still, you're missing some very basic things. As I said, a texture is a texture (or diffuse map if you will). You can have other, similar working maps, like specular or normal maps. A UV(W) map is something completely different. All the former maps are pictures, like jpg's, bmp's or png's. A UV map is a file or block of data that contains the relation between your geometry and the pixels in all the other maps.

Anyway, in SL you get only two ways of texturing your model, "default" and "planar". I have found some, but not many cases where you should use planar mapping. For your object you want to use "default". Default means SL will use the UV data that comes with the object. (Regular prims have that data too). So if I understand you correctly, this would be what you call "mapped".

If your object is unwrapped in 3ds Max and looks fine there, but the baked texture (render to texture output) doesn't work with your model in SL, that means SL isn't receiving the UV data. There are various things that can cause this, so it's hard to determine what 's the matter with the little information you provide.

First of all, it would help if you could post the version of both 3ds Max and the fbx plugin you're using.

Posting (a part of) your workflow might shed some light on things. How are your objects called? How are your materials called? What kind of materials did you use? How many channels did you use? Did you bake your map on the same channel as your UV map in the stack? Did you export your model AFTER you UV mapped it? Did you collapse the modifier stack before export or did you remove some modifiers instead? Is the number of triangles the same in 3ds Max and SL?

Link to comment
Share on other sites

refimage01.jpgrefimage02.jpg

Ok, sorry for the confusion.  I hope these imagaes help.  This is 3ds max2011 but I do have 2014.  Im not sure about the fbx version.  I downloaded it about a year ago.  The only thing that I might have done different than in the photos is changed the channel to 1.  I have tried it on channel 3 also.  When I was completely finished with model and texture then I collapsed all.  I didn't delete anything.  Then I exported the model and texture again.  If u need other pics to help figure the problem out, just let me know.  I thought I was doing it right from reading other peoples posts.  Your right, I don't think it is saving right, Im just not sure why.  Thanks for your help.:matte-motes-smile:

Link to comment
Share on other sites

I had a look at the files, it's definitely a problem with the channels.

The texture is baked on channel 3, but channel 1 is used in SL. I think you used "Automatic Unwrap" in the "Render to Texture" menu. I wouldn't do that, but if you do it like that, you need to transfer the UV map from channel 3 to 1 before you export the model to dae.

Add a UVW map modifier to the stack after you baked the texture (if you open the UV Editor, you'll see the mapping is not matching your texture), you'll see it shows map channel 1. Change it to 3 and click "Abandon". Now change it back to 1 and select "Move". If you open the UV editor now, you'll see the UV mapping matches your texture. Now you can export to dae and import the model in SL.

I would map the model by hand on channel 1 before baking, using the "Unwrap UVW" modifier. Then you can "Use Existing Channel" when you bake. The automatic unwrap (or flatten UVs) is a nice way to start unwrapping, but it's far from efficient. If you look at your texture, about half of it is completely wasted, which is bad for resolution/detail. The only way to overcome this (without editing your mapping) is using a bigger texture, which again is bad for memory use/performance in SL. Look at the difference in the picture below.

 

UV.png

(even the new one on the right can be improved a bit)

Also note that I changed the geometry from ngons to quads by connecting some vertices. You could also change the bottom of the table, that didn't look right. I used a single quad for that.

Good luck!

Link to comment
Share on other sites

  • 4 weeks later...

Alright so, learning along the way here and I swear, it's one thing or another that glitches :P yay for SL.

Anyway...

I am having the same issue, so this will be long and detailed so everything can be looked at, at once. When I apply my uvtexture to my uploaded mesh, it doesn't follow the mapping. I am using Maya 2014 which I have to export to 3ds Max Design 2014 in order to export it out to DAE so I can upload it to SL (Don't know why, but something with maya now screws that up).

But here is what in Maya the UV mapping texture completed and what it renders in Maya, it looks proper.

inMaya.PNG

 

Here is what it looks like in 3ds Max:

in3ds.PNG

So, I know they are mapped properly and showing as they should except 3ds max blurs it in their window lol

 

Now... I uploaded the mesh and then I uploaded the uv texture... and this is what it looked like

inSL.PNG

It's not following the UV mapping, it's pretty much acting like I am putting a texture on a normal prim. (man these pictures came out huge, sorry). Just trying to understand how this works really before I get into bigger projects and learning.

 

I am not sure why this is happening or what I am doing wrong. 

Here are files to look at if you wish to see them

Maya save scene file: https://drive.google.com/file/d/0B_duhiXEqBmsS1h0SV9tYlBEck0/edit?usp=sharing

DAE File: https://drive.google.com/file/d/0B_duhiXEqBmsdldUZG00XzZHV3M/edit?usp=sharing

UV texture: https://drive.google.com/file/d/0B_duhiXEqBmsZ3lnS0UtZUUzVU0/edit?usp=sharing

 

So far, been getting great help along my learning process of things, really appreciate it. Other places for help have not been so nice lol

Link to comment
Share on other sites

Where to start???

1. The dae file won't import into Blender as it is. Inspection revealed a large <library_animations> section which should not be there, and a whole lot of empty (ie they have no geometry and show up as empty objects in Blender) nodes in the <visual_scene> that were referenced in the animations section. So first thing - get rid of animations (oir whatever in Maya/3DsMax is being exported in that way).

2. Removing those was not enough. There's something in <library_effects> or <library_materials> that also causes an import error. So I removed those sections too. (I guess the SL importer skips over any problems with these).

3. Now we have a geometry that will import into Blender without all those empties. However, it has five UV maps. These appear to be (in order in the Blender list) the one you want, then one you must have made for each separate frame. Unfortunately, the SL importer can only use a single UV map, and if there are multiple maps in the file, it uses the last (strangely). So that is why it is using the wrong UV map, with the results you describe. You need to remove all but the correct UV map.

4. Your texture is 2048x2048, but the maximum for SL import is 1024x1024. It will get reduced to this by the uploader. It is essential to use the available image area as completely as possible in order to maximise pixel reolution where it is important. You can see the effects when you transfer from Maya to 3DsMax. Maya is not using the generated image to texture its display. It is using the original images. In 3DsMax, it is using the generated image. Because only a small part of the UV map (and image) is allocated to the pictures, they have very low resolutions. The blurring is the attemp of 3DsMax to smooth out the resulting pixellation which, nevertheless, remains visible.

5. The geometry of the frames is very far from optimal, and they use very many more triangles that they should. On top of that, it looks as if you have used a planar UV projection. This will work for the images, but will not provide texturing on some parts of the frames.

What you need to do...

1. If you want the highest resolution of the images, make each into a separate material (someone who knows Maya can explain how). That allows you to use up to the full 1024x1024 pixels for each image (although you should be aware that multiple large textures will contribute to lag). The frames account for much less area and do not need as high resolution. So they can be combined in a fifth material using a small texture. You could use a sixth material for the backs if they are going to show (otherwise they can be omitted).

2. This does NOT mean the images/frame have different UV maps. They still share the same map, but the areas they occupy can overlap because they are using different textures. Each image can occupy the whole 1024x1024. If the frames are identically textured, those parts that are going to share the same texture can also be overlapped, greatly reducing the texture area required for a given texture resolution.

3. If you want full texturing of the frames, you will have to do some kind of unwrapping so that all surfaces receive finite texture area. If they are just flat colours, this may not matter.

Here's a picture to explain my comment about geometry. At the back is one of your frames, 196 triangles. At the front is the same effective geometry in 44 triangles. This will not only save gpu cycles, it will also make the UV mapping cleaner and easier to understand.

cleanmesh.png

 

 

Link to comment
Share on other sites

Tottally forgot the image "size", that's something easily fixed. but it triangulates on export I believe (will have to look at that again)

As far as the planar projection, in Maya, it is providing the texturing where it should. The UV image was completely unwrapped, organized, which is why in the maya picture it look like it does. It's all one piece, the black frame, the white inside matte and the image in the middle, all 4 frames are on the same UV texture.

Link to comment
Share on other sites

Please re-read my explanation in point 3....

Your dae file has five UV maps and SL is using the wrong one. You have to have only one UV map in the file. Do not confuse UV maps with images/textures. The UV map is just a list of which points in the texture(s) are applied to each mesh vertex. You can have up to eight different textures apllied, each as a different material, using the single permitted UV map. You cannot use multiple UV maps. As it is, SL is using the fifth UV map, which only has the top right frame in it. So all the texture is appearing there and the rest remains untextured. You need to delete the extra UV maps. Someone familiar with Maya should be able to tell you how to do that. Also, your one UV map that does include the whole mesh uses too small an area for each picture to give satisfactory rendering.

Now I am guessing, but I imagine the other four UV maps, with much larger areas for the pictures and 2048x2048 are those used to apply the images in Maya, whereas the other map is being used to bake them out to the final texture. Then the baking is where the low resolution effects happen. So I assume the 3Ds import is using that baked texture. Since 3Ds can use 2048x2048, it will be even worse in SL where the resolution will be halved again.

To get good image resolution, you will need to use a material for each image, which becomes a separate face in SL, and UV map each to the full extents of the the UV map. Then you can simply upload the images and apply them in SL. I would recommend avoiding uploading any textures/images with the mesh. That means you pay the combined fees every time you change either geometry or texture, and it leads to proliferation of copies of your textures hidden away in inventory. The only problem with using separately uploaded textures is in applying them to hidden surfaces (used for special LOD techniques), and there are workarounds for that.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3804 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...