View Full Version : Texturing cones?
TimNikias 11-10-2006, 06:08 PM I'm trying to texture a cone-like object (varying circumferance) and somehow need to generate a texture from a typical, rectangular one, to fit the new shape. The texture in question is made of slate tiles for a roof, and I've got a couple of towers in my scene, hence the conic roof-parts.
If I just UV-Map the texture to the rectangular one, I'll get shearing and the borders (once I've come full circle on the cone) won't line up, so I somehow need to create a proper, conic texture. I've also got onion-shaped roofs for the towers (the whole thing isn't my design, I'm just trying to texture it), so I need a process which would allow me to create various maps for the different roof-shapes.
As polygon-count is of the essence, I can't just keep hundreds of slates in the scene, so I'm thinking about writing a script that'll place roof-tiles based on the radius/circumferance, then render a cylindrical or top-view to project onto the roof. That's a fairly elaborate concept and will require quite some time that I don't really have, so I was wondering if anyone knew of any better or faster techniques than actually somehow tiling the roof...
Regards,
Tim
|
|
soulburn3d
11-11-2006, 05:47 PM
Well, it may not be an ideal solution, but you could make your texture flat in photoshop like you were gong to texture a cylinder, then use the distort tools under edit to stretch the map at the top, while keeping the bottom the same. Aplly the distorted map to your object, do a few tests to see how much you need to widen the top to get the expected result in 3d. Then clean up the tiling edges.
Another possability is to map your object from planar above, and then paint a map from that perspective. The only disadvantage is you'll need to rotate each tile in photoshop, which might take awhile.
A variation on that is to make one tile in 3d, and then use your 3d software's tools for moving and rotating (which are much faster than using the photoshop tools) the tiles into place for a planar map. Render the result from an orthogonal camera from above. Basically you'd be using your 3d app as a 2d program to make your map to then assign to your 3d scene, simply because most 3d apps make cloning, moving and rotating an object a faster process then in photoshop.
Hope something in there gives you an idea or two.
- Neil
TimNikias
11-12-2006, 01:14 AM
Thanks for your ideas. I was figuring that I might want to create a detailed model of the roof and just render that to a texture, but was hoping that either someone has a faster 2D-approach or some tool/script which I could just rely on.
What I did now was to script a loop that'll place the tiles based on the circumference of a given row, add a little wacky code to make the tiles cover the entire roof and overlap properly (much more complicated than you'd think) and render a cylindrical view from the inside.
I'm using POV-Ray to render the texture, as I've got years of scripting experience with that application and it doesn't crash every once in a while for no obvious reason like Maya does.
So far, a quick 3 hour hack was required just to get the proof of concept out, I'll be refining on that the next week at the university. Since POV-Ray has a few quirks and concepts quite unusual to the typical 3D-community (it's a raytracer after all) I won't get into the technical details of how I rendered the cylindrical texture, but remapping that with cylindrical projection onto the polygon-surface works pretty well. There's a little stretching and "wobbliness" at the top, I'm figuring that I'll either let the script spit out new geometry as well, or refine the original geometry beforehand.
http://img292.imageshack.us/img292/5079/proofac7.jpg (http://imageshack.us)
I need to refine the textures (especially details) and work on the scale, but since everything is procedurally generated and the script seems to be working properly, all I need to do is fumble with the numbers until the results are convincing. :-)
Thanks anyway for your input,
Tim
CGTalk Moderation
11-12-2006, 01:14 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.