June 14, 2006

ASK MORDY: 3D Extrusion with a Twist

This question about the 3D Extrude effect came in from Dyske Suematsu:

This is really puzzling me. I can't find an easy way to extrude type without shifting the perspective of the type itself. It is a very common effect. It's basically the same as dropshadow but instead of soft-shadow, it's block-shadow. But, not just copying the type and shifting it several pixels down and right. I need a real extruded look; so the front part must be connected with the back part. Do you know how to do this easily?

Unfortunately, there's no easy way to do this in Illustrator. In fact, I can't think of a difficult way to do it either. Here's what the problem is. Illustrator's 3D effect is a bit different than what you might find in other apps -- either CorelDRAW or FreeHand, or Maya or Strata. In CD or FH, the Extrude effect is created by controlling the extrusion. The object pretty much sits there, and you extend and adjust the extrusion of the obejct -- kind of like the drop shadow effect in Illustrator, as you had pointed out. In programs like Maya, you have the ability to control the object in a 3D world, but you also have the ability to position the camera to view that object from any angle.

In Illustrator however, the camera is always stationery. You cannot adjust the camera at all. The settings in the 3D dialog allow you to rotate the object in front of the camera so that you can view the object in different ways. Here's how I think of what you can do with 3D in Illustrator. Pick up an object and hold it in your hand -- stretch out your hand in front of you so you're looking right at the object. Now, you can use your fingers to see different views of the object, but you can't move your head or your arm from side to side or even top to bottom. If you move the object closer to you (by bring your hand closer to your face), that's the same thing as adjusting the lens perspective setting in the 3D dialog.

Because Illustrator works in this way, you can add an extrusion to an object using 3D, but if you're looking straight at the object, you can't see it (because the depth is "behind" the object. So in order to see the extrusion, you have to rotate the object a bit (such as the Off Axis front view). But as you mention, this changes the perspective of the text -- you want that to remain straight. But you can't, because then you won't see the extrusion. You can add perspective, which will allow you to see SOME of the extrusion, but I highly doubt that will be what you're looking for. Unfortuanately, you can't select the extrusion and change it's perspective without changing the perspective of the object itself.

The only way to do that would be to apply the extrusion to the object, using the Front view. You won't see the extrusion, but it will be there. Then, expand the 3D effect by choosing Object > Expand Appearance. Then, you can manually select the extruded portion of the object and adjust it to what you need. But this will be EXTREMELY difficult because you will need to select anchor points that are sitting below the object, and also directly below the anchor points for the front of the extrusion.

Oddly enough, this exact kind of effect is something that's far easier to do in CD or FH and if you have those apps available, you might try doing it there and bring the art into AI.

11 comments:

Anonymous said...

Yes, this is a rather big shortcoming. I teach an Illustrator class and one of the "advanced" topics I cover is how to do this by hand. Ages ago, there was KPT Vector Effects that did off-axis extrusions very well. It's no longer around, although, oddly enough, a Japanese software company now develops and distributes it. Hopefully Adobe will add it into their product some day (the 3D effect can use a little updating anyway).

Anonymous said...

Do you have an example of what this looks like as a final result? It sounds to me like you can accomplish a similar effect with blends, but it seems like I'm missing something in the understanding of the result, and that's why I'm looking for a solid example of the desired effect.

Anonymous said...

I was a bit disappointed the 3d effect had no updates in the CS2 version, especially since it was kind of meant to replace Dimensions.

Anonymous said...

Yeah, alright, I'll concede that the shadowland output is a lot more interesting than what you can accomplish with a blend, but with a little tweaking it could give you a similar result, at least that you could trace out and modify to your liking.

Admittedly though, that is still a lot more work than it should be.

Anonymous said...

If you make the back element of the blend lighter or darker than the front, you already get a more interesting effect.

This wasn't too hard to do, but I'm running into a strange thing where my text will only blend in steps (even when it is set to smooth) and even when I outline it. Other shapes still blend smooth, so... I havn't had time to figure it out.

Anonymous said...

Smooth Color blends only work between paths and compound paths. Anything that can potentially contain multiple colors is blended in discrete steps. Also, Smooth Color spacing only works between objects that are painted with solid color fills or strokes of different colors. If the objects are painted with gradients or patterns, or if they are painted the same color, then they always blended in discrete steps.

I prefer using Specified Steps even when the conditions for Smooth Color spacing are met, since you have more control. Smooth Color takes the maximum channel difference between the two objects and divides it by 255. For blends where there is a large color difference between the two objects but not much spacial distance, that is way more steps than you need, and just causes file bloat. Often 20 or so is plenty to get the appearance of a smooth blend even between black and white. Conversely, if the objects are separated by a large distance rather than nested, and the color difference is low, it may not make enough steps to provide a smooth contour. (For some reason, people tend to overlook the "Color" part of "Smooth Color" spacing.)

Dyske said...

After I sent this question to you, I managed to come up with a hack solution for this. It was a potentially embarrassing situation with my client. This extrusion look was quite common in the days before the computers, so most people assume that it must be really easy to do. So, if I tell my client that I can't do it, it just sounds like I am incompetent.

The hack solution I came up with was :
1. Break up all the letters.
2. Run the 3D extrude one letter at a time.
3. Put the minimum amount of Y and X rotations (I believe 0.1 degree is the minimum).
4. And apply a huge amount of extrusion.

If you rotate by the minimum amount, the difference is hardly noticeable.

Anonymous said...

Here is my solution:
basically you rotate the type in the opposite direction first to prepare it for the positive rotation in extrude and bevel that brings it back to normal perspective. I was able to achieve this effect while keeping all the type live. This method has the added benefit of being able to create a graphic style out of it containing 2 effects the 3D Rotate followed by the 3D Extrude and Bevel.

First rotate the type using 3D... Rotate.
this takes some planning...
if you want the extrusion to be moving down and to the left, point the face of your type up and to the left and vice versa.
Then use the 3D Extrude and Bevel to counteract the previous rotation and bring the type back to facing front while adding extrusion. Use 0 for perspective in both effects.
I couldn't find any relationship between the numbers (degrees of rotation) in 3D Rotate and 3D Extrude and Bevel. They are not direct opposites so this must be done visually. Use guides for the baseline and some vertical guides for the vertical strokes. It may take some trial and error but once you have it, you can apply it over and over with a graphic style.
Hope this helps.

josh d said...

josh -- that's an excellent workaround. nice job!

Anonymous said...

@ Josh

Thank you very much for this workaround, I was breaking mu head on it.
I just wanted to add that it seems to me there is a relation between rotation and extrusion.

on my test to obtain dropping down right I first rotated vertically 8 degrees and then horizontally -11.
after that I extruded with a vertical rotation of 11 degrees and a horizontal one of 8.
and lines are straight.

Vdogg said...

Wow great work Josh! They should packaged this as one of the default styles if they haven't done so already.