Help - Search - Members - Calendar
Full Version: Cylinder Decaling Tutorial
Hash, Inc. Forums > Technical Direction and Development (Learning Animation:Master) > A:M Rendering, Compositing and Special Effects > Materials Laboratory > Texturing
MMZ_TimeLord
This tutorial is designed to help users decal cylinders with spline references that can be edited within Photoshop (or similar graphics application).

Here are simple steps with three basic examples.

1. Create your cylinders with the primitive wizard plugin in Animation:Master (A:M).

[attachmentid=17985]

2. Import a blank decal with the proper proportions for the cylinder you created. In this example, the cylinder has a radius of 10cm and a height of 40cm (diameter is 20cm). Using the geometry formula for calculating circumference of a circle, we find that a 10cm radius circle has a circumference of about 72.8cm. So I created a blank (black background color) bitmap (.jpg in this case) 728x400 pixels in size.

3. Create a new action using your cylinder model.

4. With the action window open and active, drag and drop your decal from the 'images' section of the project workspace down and onto your cylinder model in the 'objects' section of the project workspace. A:M will then prompt you as to whether you want a decal or rotoscope, choose decal and click on 'OK'. You will see your blank decal created in the action window.

[attachmentid=17986]

5. Now crack open the properties in the project workspace for that decal. It should look something like this...
[attachmentid=17989] Crack it open by clicking on this arrow. [attachmentid=17990]

6. Now set the scale of the decal to just cover the cylinder's height. Keep both scale percentages the same. In my example, this was 384% for each. Also make sure the 'translate' settings are at 0 for each axis.

7. Set the application method in the properties to 'Cylindrical'.

8. Right click on the decal in the action window and select, 'Apply'.

9. Next, right-click on the decal in the project workspace and select 'Edit'. This will open up the CP/Spline mapping for the decal.

[attachmentid=17987]

10. Select all the CPs and use the scale manipulator to stretch the mesh to cover the decal image.

[attachmentid=17988]

11. Perform a screen capture to get your base cylinder decal with spline reference. Paste your screen capture into your favorite graphics program and crop it to the spline limits.

[attachmentid=17992]

12. You have a decal that can be applied to the model from within the model window with a cylindrical application method and it will match your model exactly. DO NOT use this image with the decal you applied in the action as it will duplicate it 3 times. Delete the old decal and create a new one with the new image.

[attachmentid=17991]

You can now paint texture on your decal knowing where the splines are.

Critiques and Comments welcome.

Last Updated 07/05/2006 at 5:25pm
Rodney
Thanks Jody! smile.gif

Do you still have the project file?
MMZ_TimeLord
I do have the project file, but it will do no good. I will probably have to make this into a video tutorial to really be able to guide someone through it.

I'll see about doing that this week. Maybe I'll do a regular 8 segement cylinder and the 3 holed one and I'll take a screen shot of every step and turn it into a gif animation.

I'll keep you posted.
Rodney
Jody,
Just thought I'd ask because I wanted to explore.

If you haven't investigated Wink yet that's not a bad option for SWF tutorials.**
Not video... but file sizes are usually pretty nice.

I've been resisting Camtasia for about two years now... may break down one of these years and by it.
I'm sure you have some adequate tools already at your disposal.

**And holy wow! Wink 2.0 has finally been released. Downloading it now. smile.gif
Stuart Rogers
QUOTE(MMZ_TimeLord @ Jul 6 2006, 12:37 AM) *
Critiques and Comments welcome.
Thanks for putting the time and effort into this, Jody. Vern and I eventually worked this much out in the thread that inspired this tutorial.

The fly in the ointment is that this approach only works for well behaved cylinders - I was after a solution for more organic objects. (I apologise for not being sufficiently clear in my original post!) If all the splines that take the short cut across the +/-180 degree boundary do so on CPs that are exactly on that boundary, such as in your example, then all is well.

For more organic, less well behaved objects, however, things are much trickier. Take a regular cylinder and give it a twist, as shown in the example image below.
[attachmentid=18011]
Image A shows the undecalled model in shaded wireframe. Image B shows what you get when right-clicking the decal and selection Edit. Image C shows the problem when trying to get the +/-180 degree boundary lined up. Image D shows the result - verticals in the decal are no longer vertical (in this image, the red/yellow border is the front of the object).

You can see that if I A:M could create a template using a cylindrical projection, I would be able to see where the splines go and still retain a true vertical in the image (as seen when using an image editor).

Shifting the CPs in the UV editor so that the left- and right-most 'vertical' splines are vertical (and aligned with the decal edges) doesn't help as I still end up with distorted verticals in my image editor.
heyvern
Hmm...

I just tested this... and... well... I get a "fairly" straight decal with no distortion...

There is a very subtle curve across the center of the cylinder decal... but not as bad as what appears in your example.

[edit]there is a bit of a "wobble" in that middle section that would be kind of icky if this were a very contrasty vertical line. Maybe my image choice didn't have enough straight vertical lines.

However... in shaded preview with a low setting (4 polys)... the decal looks more distorted. If I hit the page up key... the decal straightens out.


[attachmentid=18014]

[attachmentid=18016]

[attachmentid=18015]

-vern
Stuart Rogers
QUOTE(heyvern @ Jul 6 2006, 07:34 PM) *
I just tested this... and... well... I get a "fairly" straight decal with no distortion...
Interesting. I wonder how that is - none of my experiments produced anything remotely as good as yours.

Out of curiosity, do you have any repeats on that decal? (By default decal images tend to have three repeats in the wraparound direction - I wish it would default to 1.)
MMZ_TimeLord
Thanks guys!

I'll play around with the twisty cylinder scenario today. I'll use my 3 holed cylinder for the test, just to throw a further fly in the ointment. biggrin.gif

I'll post later what I find. Thanks again.

Rodney! Here's the project, just in case you really wanna play with it.

[attachmentid=18020]

I've put the 4 section cylinder in the initial stage with the blank decal applied in an action and the UV coordinates are untouched.

On the 6 and 8 segment cylinders I've adjusted the UV coordinates to prep to take a screen shot of th decal for making an initial decal with splines.

Lastly, on the cylinder with three holes, I've re-decaled it with the decal with splines so you can see how they line up.

Again, I will be updating this with the twisting that Vern and Stuart Rodgers have pointed out.
heyvern
Stuart,
Yes... I did have a repeat of 3 on the x.

Here is the same thing changed to 1 repeat.

[attachmentid=18022]

(The icky part at the bottom right is the seam on the back)


p.s. I am LOVIN' v13... jpg render with QUALITY SETTINGS! Wooohooo. I can render on the pc and not have to transfer to the Mac to save out of photoshop.
-vern
heyvern
Stuart,

I'm wondering if the distortion might be more or less depending on the number of patches a small detail of an image covers.

In these examples we are using pretty low patch cylinders.

I find that when you rotate a cross section... you get kind of a "general" distortion because the patches have to bend around so much.

I tried this same thing with a lathed 24 section cylinder with like... 9 vertical sections. I rotated the cross section splines and decaled...

The minor distortion I was seeing in earlier attemps was virtually eliminated.

[attachmentid=18023]

[attachmentid=18024]

-vern
MMZ_TimeLord
The primary reason for the distortion in your 3 section cylindar was due to the splines having to wrap further around the circumference of the cylinder and spines, being what they are, generally take the shortest route, unless you wanted to start messing with all the bias settings on the splines.

Remember these cylinders weren't created with the twising in them by the plug-in/lathing, so they are set up to have straight up and down ribs.

I did some experiments with twisting the cylinder AFTER decaling, in the action and in the model window, both yielded pretty good results, but that's if you don't care whether your decal gets twisted.

Vern's solution with more density on the sections, will eliminate that twisting compression on more severe twists.

Should I go further with research? or do we have too many cooks in the kitchen now? biggrin.gif
Stuart Rogers
QUOTE(MMZ_TimeLord @ Jul 6 2006, 10:14 PM) *
Remember these cylinders weren't created with the twising in them by the plug-in/lathing, so they are set up to have straight up and down ribs.
I realise that, but that shouldn't stop me from getting verticals in the decal image staying parallel (in projection) with the cylinder axis.
QUOTE
I did some experiments with twisting the cylinder AFTER decaling, in the action and in the model window, both yielded pretty good results, but that's if you don't care whether your decal gets twisted.
But I *do* care - especially for mechanical models with nice straight lines - which is why I'm getting my knickers in a twist! Generating a cylindrical projection image out of A:M would help here.
QUOTE
Vern's solution with more density on the sections, will eliminate that twisting compression on more severe twists.
It looks like that's true. I do have issues with more splinage than the surface itself requires, though, as my poor modelling skills mean I get subtle but annoying bumps in my surfaces when I want long, graceful, flowing lines.
QUOTE
Should I go further with research? or do we have too many cooks in the kitchen now?
I think we've beaten up this topic quite enough for one day - I'm sure you both have far more pressing things to be getting on with - so thank you both for putting some time and effort into this.

Given what we've explored, I do think there's a case for a plug-in to create cylindrical projection images from within A:M. If none of our plug-in writers volunteers in the next few days to do it, I'll submit a feature request to AM:Reports.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.