PDA

View Full Version : How to rotate a bitmap in a UV map



treddie
04-11-2012, 02:38 AM
Howdie.

I have been trying to figure out how to rotate a cylindrical projected bitmap, but in the Texture Editor, the rotation fields are not selectable, because I am using UV projection, not Cylindrical. That is the problem...I need a UV Map that will export out with my obj file, but if I do not assign the bitmap to a UV Map, I can't get it to work. The only way I can rotate the bitmap is if I am in Cylindrical projection, and that rotates the bitmap, but defaults to planar when exported.

Thanks for any help!

ZE_COLMEIA
04-11-2012, 02:46 AM
In mother Russia UV map rotates the bitmap.

gerry_g
04-11-2012, 12:11 PM
Do you mean you want to know how to cylindrically unwrap the texture in the uv editor so as when you apply the bitmap it appears the way you intended it, cuz uvs have no options in the texture editor as their projection is determined at the point of uv creation. If so go back and re make it, under the Map menu click Make uv's, choose projection type – cylindrical, choose the appropriate axis for projection (usually the 'Y') prevue it in a uv texture window and your done.

biliousfrog
04-11-2012, 12:29 PM
Rotate the bitmap in an image editing application or rotate the UV's in modeler

treddie
04-11-2012, 02:02 PM
Well, the procedure for creating a cylindrical UV map that I learned from a tutorial was (leaving out the parts that deal with setting up a viewport to see the actual map). I am using LW11:
1. Set up the basic material in Surface Editor.

3. Go to Map > UV/Texture > New UV Map.

4. Name your new UV Map and click off "Initial Value". Clicking off "Initial Value" makes it impossible to set up a Planar, Cylindrical, etc. map.

5. Click "Create" and x-out of the "Create UV Texture Map" window.

2. In Surface Editor, Click the Texture "T" button for the desired channel to open the Texture Editor.

6. Select the surface of polys that will be mapped, and in Texture Editor, Set Projection to "UV", select the map just created and load the desired bitmap image (Notice that when choosing UV projection, that there is no way to choose an axis and rotate the map about that axis).

7. Click on Map > UV/Texture > Make UVs to bring up the "Assign UV Coordinates" window.

8. Select the UV map you created, set Map Type to "Cylindrical", and choose the desired axis (Notice that there is no place to rotate the map about that axis).

9. Click "Create" and x-out of the "Assign UV Coordinates" window.

10. In the Texture Editor, click on "Use Texture". Job done...but not really...You can't go back into Texture Editor and rotate the map about the axis because UV projection locks-out the Rotation tab.

biliousfrog
04-12-2012, 01:30 AM
UV co-ordinates are fixed, they are pinned to the object, your only options are to rotate the image in Photoshop (or similar), rotate the UV co-ordinates on the object or create the UV's with the correct orientation in the first place.

The procedure that you've outlined for creating a UV map seems very convoluted and wouldn't actually create any UV co-ordinates. Open the object in modeler, change one of the viewports to UV texture and, in the bottom-right corner, click the 'T' button (texture) and select the UV map you created in the drop-down next to it...is there anything showing in the UV window or is the grid empty?

By deselecting 'initial value' you're basically creating a blank UV map, a placeholder if you like.

To create a cylindrical UV map the quickest way would be (leave a viewport set to UV's for now):

Select the layer(s) or polygons for texturing
Select the 'T' button for texture
Select (new) in the drop-down box or New UV Map in the menus
Make sure that initial value is ticked
Change map type to cylindrical, leave Subpatch to Linear unless it's a Subpatch model (then choose subpatch), choose the axis which the cylinder will wrap around and click 'Create'

You should now have an unwrapped object filling the UV viewport.

Sensei
04-12-2012, 04:00 AM
If I understood you correctly, you want different start angle than default..

So, click Perspective drop-down in Modeler, pick up UV Texture viewport mode.
Enable Move tool.
Slightly move everything to the right.
Polygon which is on right side cut and move to the newly made empty space on left, and merge.

Sensei
04-12-2012, 04:07 AM
There is good old trick how to uv map manually- make new endomorph map, then do whatever you want with geometry, unfold, transform (in your case - rotate), then make uv map, and delete morph. Base mesh will be the same as before.

treddie
04-12-2012, 02:09 PM
biliousfrog > Thank you for the clarification. You're right...there was nothing there. So much for that other "tutorial" on the internet. But I still do not see how it is then possible to rotate the bitmap about the cylinder axis to another preferred angle. The only way to use the HPB rotation fields in Texture Editor is to DEselect UV mode, go to cylindrical and make a change then. But then, you are no longer referencing the UV map.

The reason this is a problem is that I am not rendering in LW...I am using an external renderer that requires an OBJ file with all textures UV mapped. So I have to export out of LW in OBJ and that is where the problems start.

Sensei > That seems so complicated when a simple rotation somewhere should work. Otherwise, if the start angle is wrong, you basically have to go back in and edit polys in the UV map again. In the least, it seems there should be some way to tell LW, "Take this cylindrically wrapped texture with the desired rotation angle about the long axis, and convert it to a UV Mapped texture."

treddie
04-12-2012, 03:07 PM
biliousfrog > Actually, now that I checked again, the UV Map DID save when I used the old method from the tutorial. It's just that the map was a big rectangular surface broken up into polys and using your technique, it was a definite unwrap-looking surface of polys. It seems to me that the rectangular one has to be the correct one since its dimensions match the bitmap image the way it should. After all, a cylinder should unwrap into a simple flat rectangle, not a bizarre unwrap shape. To be true, I have to say that the surface is ALMOST a perfect cylinder...it bulges slightly at the waist, but its so close to a true cylinder I don't see why your method would go out of its way to produce a bell curve-shaped unwrap surface, which it does. Very confused. :stumped:

biliousfrog
04-13-2012, 02:23 AM
By using the automatic unwrap it will fit the UV's to the UV grid. Generally, if I want to keep the original proportions of the polygons being UV'd I'll choose Settings - Manual, set the XYZ centre's to zero and set the XYZ size to 1m. You will probably need to scale the UV's to fit inside the grid but it's a great way of UV'ing many objects and being sure that the sizes are uniform.

When you create the UV map (initial value ticked) you'll have the option of X, Y, Z axis of projection - Y is default. Once the map is created you can scale, rotate and move the UV's on the UV grid. If there's any pinching or stretching you can move the points on the grid to smooth the mapping.

You're making it into a bigger issue than it really is. If you want maximum compatibility between applications then you need to stay within the boundaries of what's possible...otherwise you'd just use standard cylindrical mapping, right? If it was possible to rotate the image inside Lightwave's texture editor for UV's, the information wouldn't be saved in the OBJ's UV data...it would just load the same UV's with the same image.

The problem you have is NOT that Lightwave doesn't support rotation of images for UV's, the problem is that you haven't created the UV's on the right axis or that your image is not the correct way up.

treddie
04-15-2012, 01:53 AM
So there is no way to get LW to do this? (please see attached) This render is from an OBJ exported out of LW. Axis and direction are correct, only the bumps on the outer rim need to be rotated 10 degrees CW.

Sensei
04-15-2012, 02:18 AM
Rotate object, make uv map, rotate object back to original. Or use morph and delete it..

treddie
04-15-2012, 02:42 AM
AHHHHH! I LOVE that idea. Smart thinking. I'll try it out.

biliousfrog
04-15-2012, 05:43 AM
Aaaaaaah....so you don't need to rotate the bitmap or UV's, you want to offset it.

You can just move the UV's along the grid if it's a tiling texture. Select the UV view, select the points of the UV map, move them left or right until they line up how you need.

The UV grid repeats across the edges so you can have your polygons outside of the grid and the image that you're using will just tile infinitely.

treddie
04-15-2012, 02:08 PM
Damn! I tried that last week and it didn't work for some reason. I'd export out the obj, and I'd be right back where I was. I may be missing things because I've made so many changes and done so many tests it is easy to forget something critical. After all, I haven't used LW in years and now with the new renderer, LW is back into my workflow as a major step..

tayotain2
04-18-2012, 04:09 AM
Use Dpont's uv mapping node & color surface + node.

You can rotate,scale and position bit map on uv coords.
set image projection planar and texture axis z.

treddie
04-18-2012, 07:43 PM
Dude! Thank you for that reference!

I went to his website and checked it out and DL'd it. Looks like some really great tools to play with.