Q's about UV Mapping/ Texture Projections/ Texture Sizes/ ETC!

B

bazooka

Guest
First of all, hello. This is my first post in these forums -- wanna get off to a positive start -- but enough of that. I need some help!

Okay, this is my very first model (some alright renders -- here -- and also some quick renders of my second model). I finally (kind of) figured out how to UV map. I think I'm doing alright but I don't know very much about it.

First thing is that I'm using a load of texture projections in order to minimize distortion of the texture. So my question is, is this going to make the model lag out or does the amount of texture projections not matter once the model is compiled? I'm using XSI Mod Tool -- I hope none of the terminology I use is exclusive to it. Here's a screenshot to for you to see how many projections I'm talking about --


-- and that's just the barrel.


-- UV Map [WIP]

Also, is it just a bad practice in general to do that many projections? I don't know of any other way, really, without distorting things, or manually moving samples. The only thing I thought was that it might be more difficult to draw the textures, as the polygons will be a little more scattered. If you don't know what I mean, sorry.

I'm wondering about texture sizes, as well. I know that for DOD, models typically used three 256x256 skin textures (for the gun). But I can't seem to find the texture files for CSS (which is what I'm doing this gun for). I know that they can be in sizes of 16, 32, ... up to 2048x2048. But I'd like to know what Valve generally has been using, just for consistency's sake.

I don't know much about all this so any info/tips/critiquing would be appreciated -- even if I didn't ask a question about it! Thanks!
 
well i dont know what texture projections are because i dont use xsi if u could just elaborate it and put it in simpler terms i could comment on that.
as for the texture sizes the smallest map u use should be a 512x512 the maximum should be 1024x1024 u can go above and beyond that but i dont sugest it ..for a gun i would use a single 1024 map.
btw your models look very highpoly for source .. what is the poly count on them ?
 
Using that many texture projections is just useless and it makes things more difficult. I'm also almost certainly sure that that many projections make the model laggy as hell.

For example using a different projection for each polygon in the barrel is simply not the way it is done. Use a cylinderical projection for the barrel and a single cubical projection for the part with the handle and magazine. Moving and separate parts need their own projections. I don't have XSI in the computer I'm working right now so I can't post more accurate instructions, but I'll try to post some later.

And I think you should optimize the model first before starting to texture it, it indeed looks quite heavy. And yeah, 1024x1024 is good for weapons.
 
Thanks guys, very much for the feedback.

Polycounts --

KG9: 2736 triangles (w/o arms and holes)
C96: 3025 triangles (w/o arms)

The KG9 is not being modelled with the holes in the barrel -- I plan to use transparency textures (except for the ejection port and where the bolt handle goes). Those renders are old. Also, I plan on deleting any hidden faces of the model, after I animate. I know that I should do this before UV mapping to maximize texture resolution, and I plan on it. I just wanted to get started learning how to UV map.

I was under the impression that those polycounts were alright. ??? I've seen many models for 1.6 that were much higher than that -- in fact, Flakk's C96 comes in at 4318 triangles (w/ or w/o arms I am unsure). So, should Source models be lower in polycount? I'm guessing you can account for some of those lost polies by using normal maps for some of the smaller details. Please tell me about these poly counts.

Thanks for the info on the projections, Korpisoturi. I knew that wasn't the standard way of doing it, in all likelihood -- but like I said, I was hoping to reduce the texture distortion across the non-perpendicular polies in the UV map -- sort of an overly ambitious innovation on my part... I'll try the way you said it. Please do try to post those instructions whenever you get to it. Also, what is the reason moving parts need there own projections?

I'd try to explain texture projections, mindless_moder, but I'd probably just end up writing too much and get lost in a subject I'm rather new to. :)

Thanks again.

Edit: Tried doing the barrel (w/o sights, front and back) using a cylinder projection and it worked like a charm. With the sights, front, and back, I get quite a nasty distortion that would be difficult to texture w/ the right proportions. How does one avoid this? I would just create a projection from the front for those parts...but that's probably not the right way...
 
I don't know what you're trying to do with all of those projections or in that UVW map, but you're supposed to select seperate groups of polygons in the model and UVW map the from the right direction. For example, UVW map the polygons that make up the left and right side of the grip from the left (unless they'll have writing or will need to look different, like the gun body, then you'd do each from the correct side and put them in their own space), then do the polygons that make up the back of the grip, the bottom, and then the front from the correct directions. If something is round, then you could do it just from the side with planar map, or with cylindrical mapping if you have to have writing or something on the sides. You'd do this to the rest of the gun and then arrange all of the pieces on the UVW map as close together taking up the most space as possible.

I can show you the UVW map for one of my models if you want.
 
UV-mapping is hard to explain so I made this small tutorial of UV mapping a simple gun:

In TextureEditor:
Hold z-left mousebutton to move, z-mid mousebutton to zoom in, z-left mousebutton to zoom out.

1.Select all the objects that belong to your model and click Property->Texture projection->Unique UV's
2.Close the pop-up window that appears, it's not necessary to touch it at all.
3.Press alt-7 to bring up the TextureEditor window, your screen should look like this now: http://img299.imageshack.us/img299/4471/19hz.jpg
4.The random UV-mapping that is done by XSI is just plain crap and some of the polygons in your model will appear twisted: http://img299.imageshack.us/img299/6599/28ra.jpg
5.To make your UV-maps better you need to choose the right subprojections for the right surfaces (polygons).

Projection basicly means that the texture is painted on to the surface from the direction of the projection. For example, a cubic projection projects the texture on to the polygon surfaces from six different directions (up, down, left etc.). The program chooses the best polygon targets for each side of the projection.

Select all the polygons in the lower part of the weapon (using the 3d-view)and click Cubic Subprojection->Best Fit (http://img299.imageshack.us/img299/1452/30ws.jpg). This clearly improves the quality of the projections of the selected polygons.
6.Move the selected polygons away from the texture area in the centre of the TextureEditor. Notice that when you select polygons in the 3d-view, the same polygon will be selected in the TextureEditor. You should mostly use this method of selection when selecting polys in the TextureEditor because in there might be overlapping polygons in TextureEditor. Overlapping polygons are seen as red in TextureEditor.
7.Select the side polygons of the barrel (http://img294.imageshack.us/img294/7420/49kp.jpg) and click Cylindrical Subprojection->Best Fit. The messed up barrel polygons are now in preussian order ready to be textured. Move them out of the texture area.
8.Go to a paint program (ie Paintshop etc) and make a white 1024x1024 .tga-file. Save it.
9.In the TextureEditor, click Clips->Import clips... and choose the .tga-file you just made. The standard texture should now be replaced with a white texture.
10.To make the UV-map for texturing, you need to fit all your polygon projections to that 1024x1024 white .tga-texture in your TextureEditor. First you'll need to shrink all the polygons a bit in the TextureEditor (hold x and drag). The bigger the polygon is in the TE (Texture Editor), the more detailed it will be.
11.Select polygons in the 3d-view and move them to the texture area in TE.
12.In the TE, click Edit->Stamp UV Mesh and save your UV-map as a .tga-file. Now you have an UV-map ready to be textured. Imageshack won't work so I attached the file.
 

Attachments

  • uv.jpg
    uv.jpg
    41.2 KB · Views: 173
heh, j/w... how do u plan on using transparency for making the holes :p that's just gonna make a hole in the gun, and u'll see right through the whole gun -_-
 
Wow, thanks guys, Korpisoturi, that was very, very helpful! Tutorial's simple and sweet.

But btw, were those poly counts good, bad, or just ok?

Wait, what's wrong with using transparency textures? I don't know much about it, am I going to run into problems?

Did some more fiddling around and I have more questions :)



There are 5 groups of polygons selected there. The front and back sights should be in the overall cubic projection right? But the bolt handle, and the two strap guides, where should each of them go? Should there be a separate cyclidrical projection and cubic (or planar) to map the bolt handle?

Sorry if this is a bit tedious -- I suppose I could probably do it myself, but I'm afraid I'd get it all wrong. Thanks again.
 
all the cylinders u have used are have segmented caps ..delete them and recreate the face to be one poly.
as for the trans parency it will make that part of the gun invisible it wont make a hole..it might look a bit weird if u use 2sided materials it should be ok i gues.
if texture projections are like gizmos then it shouldnt really matter how many u have as long as the uv's are stitched in the end.
 
Yea, forgot about those extra edges on the caps. Deleted.

I don't think were on the same page about the transparency though. I'm not talking about a transparent material in XSI, I'm talking Half-life transparency textures -- something like this --



Where ever there's blue it is transparent so it ends up looking like this --



I would just paint the transparency color on the colormap where the holes are.

Did that clear things up or am I still not getting something?
 
i know exactly what u mean ....and its not going to make the kind of hole ur expecting.
 
Okay, thanks for that. I thought it'd be okay -- guess not. I know there wouldn't be the extrusion inward -- there won't be any thickness to the barrel -- if that's what you were getting at -- or did you mean it'd be wierd because the inside of the barrel isn't modeled? Whatever, though -- I've got the old model with the holes in it so no problem (except the poly count goes up quite a bit). Thanks again.
 
you could just do it via bump mapping.
or make the holes with an opcaity map and model the insides a bit.
 
i'm not sure, but... in source, if you make a material w/ transparency, does light still go through it? if it doesn't, then it would just block the light on the model and you wouldn't see inside anyway. if that made any sense :/
 
I don't know why you're trying to add a transparency to the barrel. Just color it black.
 
Because I don't know jack about any of this, pretty much. :) This is my first model, texture, uvmap, animation, compile... So I could paint it black, then add a bump map to it to achieve a look of depth? I want it to look like there are actually holes there -- not a texture painted black. The easiest / most realistic looking way would be just to model the holes, but like I said before -- that's a quite a lot of extra polies. Seems like the second to that would be the opacity map plus modelling a bit of the insides. Then either the transparency or black texture, plus bump mapping.
 
oic what you meant pes, mb. you could bump map it, but there wouldn't be any parallax to it, so it would look more like a small black divot than a hole. parallax mapping would fix that but source doesn't support it :/
 
The minor detail of a black holed barrel is so minor that no one will notice it.

You worry too much about these things.
 
bazooka said:
There are 5 groups of polygons selected there. The front and back sights should be in the overall cubic projection right? But the bolt handle, and the two strap guides, where should each of them go? Should there be a separate cyclidrical projection and cubic (or planar) to map the bolt handle?
You'll need to create additional subprojections for those parts. Cylindrical subprojection for the bolt handle and planar one for both of the strap guide things. Make sure your whole model is selected (in object-mode) and open the TextureEditor. Now select the polygons of the bolt handle (these should be visible in the TE too) and click Cylindrical subprojection->Best Fit in TE. Then select the strap guide polys and click planar subprojection->Best fit, also in TE. You may need to turn and resize the projections (the green wireframe things to make them fit better.

The reason why you should use subprojections instead of separate projections is that by using them you can get all your UV's into a single texture.

As you see in the image, there are two texture projections visible in the 3d-windows, but they are both in the same TextureEditor. I used the cylindrical subprojection to project the barrel polygons and the cubical for the rest.
 
Thanks Korp, you practically uv mapped my model yourself!

As for the holes, I'm just gonna try different things, see which one I like best. Thanks for all the input.
 
Back
Top