PDA

View Full Version : How to "unwrap" a cylyndrical model?



ttomw
11-07-2011, 06:34 PM
I have a model of a bore hole model derived from some radar mapping tool that I have imported into LW 10 and chopped up into manageable (500k trigon) chunks. Basically a large cylinder 30 meters tall X 4 meters diameter, showing significant texture and detail from the walls.

I need to unwrap it/(flatten it?) as if it were a label on a soup can that I made a vertical cut and then remove it and flatten it on a table, resulting in a rectangular view but maintaining all the small detail of the inside walls of the bore hole.

Can anyone suggest a methodology that would work for this case?
Thanks,
Tom

lertola2
11-07-2011, 07:49 PM
Haven't tried this but I think this should work. Make a ring of bones and use it to unbend your object in layout. You may need to create some weight maps to isolate the area influenced by the first bone from the area influenced by the last. Then use the save transformed command to save the flattened object.

An easy way to make a ring of bones is to draw a disk in modeler and then use the Make Skelegons command. This will put a skelegon between each pair of vertices on the outside of the disk. Load the disk into lightwave and use the Convert Skelegons to turn the skelegons into bones.

-Joe

erikals
11-07-2011, 10:42 PM
you can also flatten it by using clothfx. (if the mesh is dense, you might wanna use metalink as well to drive the highres object)

have an image?

ttomw
11-07-2011, 11:16 PM
Thanks Joe and Erikals. These are excellent suggestions and I look forward to exploring them.

Another approach I have thought about, that might be more direct for my purpose, is to just leave the model alone and put a render camera in the center of the bore model and rotate it around and stitch the render images together.

If anyone has suggestions on automating those circular renders, I have 155 meters of shaft in 10 meter chunks. Render, rotate 90, render, rotate 90, render, rotate 90,render, rotate 90, then drop 4 meters and do it again etc. is going to be rather tedious.

Thanks,
Tom

sandman300
11-08-2011, 12:02 AM
You could try the advanced camera, set the Horizontal FoV to 180 degrees and the vertical FoV to cylinder. I've never tried it so there are likely some other things that could be set.

Simon-S
11-08-2011, 06:31 AM
I use the PLG UV tools to unwrap my geometry in modeler. The plg_Make_UV_Edit is really fast and easy to use, enabling you to uv map quite complex objects in seconds.

http://homepage2.nifty.com/nif-hp/index2_english.htm

probiner
11-08-2011, 07:17 AM
Why not make a Cylinder in LW that would fit that one, send it over xNormal and bake out Displacement maps and normal maps?
xNormal can also handle many millions of triangles for the baking process better than LW can load a couple of millions, so you wouldn't have to bring the polycount down or atleast not as much.

If you want to use the 500k anyway, why not just cut a vertical guides, with Solid Dril>Stencil and Triple; use point groups so you can select the points belongging to the guides; select the points of one of the guides and Unweld (this is your UV vertical seam) and use PLG like Simon suggested. Then relax it a couple of times, straighten the guids and the boundaries and relax again with the guides and boundaries selected (what is selected is not relaxed) so the map adjusts to the straighting.

Example attached \/
Used 4 guides for the UV. So then with with Set UV Value I know they will be at 0%/100%, 25%, 50% and 75%.

More ideas to the pile =)

Cheers

ttomw
11-08-2011, 02:12 PM
Simon-S and Probiner,

I can see how both your methods would unwrap the object for UV, but how could I then use that UV map to create a non-distorted rectangular render of the inside surfaces of the cylinder?

I am trying to extract/render an image using the topography of the bore rather than applying a UV image texture to the model. I'm sure I'm just missing something obvious since I am a little rusty.

Also....For Camera settings I have not found successful settings on advanced camera to eliminate vertical distortion, even with Sandman300's suggestion: "set the Horizontal FoV to 180 degrees and the vertical FoV to cylinder".

Thanks,
Tom

probiner
11-08-2011, 02:50 PM
Simon-S and Probiner,

I can see how both your methods would unwrap the object for UV, but how could I then use that UV map to create a non-distorted rectangular render of the inside surfaces of the cylinder?

I am trying to extract/render an image using the topography of the bore rather than applying a UV image texture to the model. I'm sure I'm just missing something obvious since I am a little rusty.

If You want to apply the high-resolution model into UV images for a low-poly simple cylinder model. As far as I know that is Baking and one solution to acomplish it is what I started to point out in the other post.

You can do it in LW, but like I said, if you want to use your hi-res model without bringging the polycount down, use xNormal http://www.xnormal.net/1.aspx
With xNormal you can bake maps (Displacement [aka Height], Normal Maps, Curvatures, etc) that will help you to input the hi-res detail into your low-res cylinder.

If for some reason, that I'm not understanding, you still want to UV Map that 500k model just use Cylindrical Projection
http://www.youtube.com/watch?v=8eIiQboLUA4
I just went with PLG on the other post, cause I understood that you wanted to iron the mesh in the UV map. But if you are going to use Cylindrical images, use Cylindrical UV Maps straight away.

Anyway take a look at this video by William Vaughan: ftp://ftp.newtek.com/pub/LightWave/LW9/ACT_Lenses.mov
So you can see you can make you own cylindrical camera, based on a UV map. Seam might present issues though. This is close to surface baking camera though.


If you have trouble with xNormal, ring =)

Good Luck

ttomw
11-09-2011, 03:09 AM
:thumbsup: Probiner thanks for that link to William Vaughans tut on advanced camera! That was just what I needed.

I just created a small cylinder model (I call it dowel cam)and dropped it in the middle of my bore cylinder model and set it up as an advanced camera. Bammo! Just what I needed. Got a beautiful, flat, non-distorted render of the entire inside surface of the bore in 1 go.

Thanks again to all of you who contributed your expertise.

I attached a screeny of the settings and render.

Tom

probiner
11-09-2011, 06:19 AM
Glad it woked out, kudos to William.