Posts Tagged ‘Rendering’

Taking a rendering for a spin.

Monday, January 28th, 2008

Yay! A post for 2008! Happy New Year (and a few days… or more). 
Sometimes Often times I struggle to come up with neat tricks for this blog. Then I stumble on something and someone points out that it would be good blog fodder. Here’s one case and point..Anyone who knows me, knows that my current design tool fascination is real-time rendering. I just think it’s the most time saving thing for us product designers. It just eliminates so many steps of the ‘process’ and accelerates us toward our visions faster than ever.   

Alias Studio (my design tool of choice) has some pretty nice real-time visualization features, but since the features are fairly new to the tool, there are always additional features I wish for whilst using them. One such is to have a bit more control over the Image Based Lighting (IBL) set-up. There are some nice tone-mapping features, but no features that control the placement of the IBL image itself.

In this example, I have a product design from my archive that has had shaders assigned, ambient occlusion calculated and an image loaded into the IBL slot of my environment. The image is from HDRI-Studio and is a panoramic image of a professional photo-studio set-up. It’s a nice quick way of getting a real photographic look without much configuration or knowhow.   

But by definition, the image based lighting set-up uses a static image to generate both the lights and reflections you see on your display. Without the ability to move the IBL, you can’t really move the lights. They are one and the same.   
Inevitably, there are things about the light set-up that don’t suit the image. I’ve outlined a few things in this image that didn’t suit me. Aside from the details highlighted – one of the main features of this particular IBL image is the warm/cool lighting. From this vantage point, the face of the product is getting the full brunt of the blue-tinted light.
My workaround is pretty simple – I group the model geometry to the 3D view’s camera.

Now when I select the top level of the group, I can rotate about the z-axis and the model and the camera spin in tandem. The visual effect though is the opposite – it looks like the IBL image is spinning and now I can find my perfect lighting set-up. Below is the mouse shortcuts from the Alias manual. I use the right most mouse button to constrain my object rotation to just the z-axis. (You can rotate about other axes, but if you are using the reflection plane in your shaded view, you’ll get undesirable results because the plane itself is locked to the world coordinates – much like the IBL – and not the camera and/or the object.)   
This movie should illustrate the effect. Keep in mind, it’s the model and the camera moving, not the lights…  
Click to See Movie


After finding an angle that best shows off the form and materials, I can tweak my tone-mapping controls, make any last minute shader adjustments and I have a final image.

 

Another nice thing about this set-up is that the camera “eye” is still free to move within the 3D viewport. So I can navigate to the back of the product, then select the top level group again and adjust the lighting and I have an instant other view.   

This whole image (not including the documentation) took less than an hour to set-up and output.

Round and Round

Saturday, September 15th, 2007

 

I showed this trick to a colleague yesterday and he said it was too good not to pass along.

I do a lot of my 2D product exploration in Illustrator. I used to be a dyed in the wool Photoshop guy until Illustrator 10 came out. I realized most of what I was doing in Photoshop could be done in Illustrator with files that were about a tenth the size and without the need for some other drawing tool – like Vellum. For me it’s all about getting to excellent results quickly.

Along the way, I became obsessed with the appearance palette. I think it’s a totally underrated tool and I haven’t found much written about it, but the example I’m about to share starts to show what it can do. Actually, I’ll start with something it can’t do. Or, at least – doesn’t do very well…

Let’s start with a square. Nothing special.

Next, go to Effects > Stylize > Round Corners. A predictable result.

 

But what about non-rectilinear shapes? A more common scenario in product design.

I took the square and yanked some of the control handles around just to make something funky. I don’t think I would design a product that looked like this…

Here I add the same Effect and, like you, I’m scratching my head. Why do I get this? Clearly this is not what that shape should have looked like with rounded corners.

This has been broken since Adobe introduced the “Round Corners” feature. Even the less flexible and more destructive “Filter” version of this tool does the same thing. So clearly they are just re-using the same broken code. There isn’t really any predictable way of adding corner rounds to a shape in Illustrator. I’ve played with Hot Door’s CAD Tools and have had mixed success in these situations too. So here’s my work around…

 

Start with the shape and add a Path Offset effect. set it to a negative number equaling your desired radius. Here, it’s -10 points.

 

It should look something like this.

 

Now we are going to “stack” some effects. This can be done by either choosing the effect again from the effect menu, or by selecting it right in the Appearance palette and selecting duplicate in the fly-out menu, or (as I do) just drag the FX layer down to the new/duplicate icon in the palette. Double click the duplicated FX layer and change the offset value from negative to positive. Also change the Joins type from Mitered to Round and boom, you have perfect radii on your shape.

You can save this as a “Graphic Style” and access it any time from the Styles palette. One thing to note though…

Obviously, this is only useful if all your rounds are the same radii. If you want to have different radii on each corner, I use the Expand Object command on a duplicate shape, change the offset values to the second desired radius and expand again. A little snipping together of the shapes will get you to your result. You lose the “live effect” aspect of it, but it’s the most accurate way of getting that particular result.

 

Lastly, here’s an example of how obsessive I can be with the Appearance Palette. Here are some connectors I’ve rendered. These are part of a library I keep handy so I can quickly populate a product design with all the right bits. They don’t use the above technique in particular, but the ideas are largely the same.

Each connector is completely rendered from just 2 circles (as shown at the far left). The reason I do this is simple; back in the day, when I used a ton of shapes to render simple objects, not only would my files become heavy and difficult to manage but, later – when I’d export my ideas to a CAD application like Alias, all that garbage would come with it and I’d have to clean-up everything I had done just to make the rendering look nice. This way, rendering entirely with the Appearance Palette, my render only consists of the two circles I care about when I get to CAD. It saves a ton of time in the long run is and is generally just easier to deal with.

Give me a brake…

Friday, July 13th, 2007

Ok, the real name of this post is “faking anisotropic shading for real-time rendering applications”, but that made even me yawn. But that’s what this post is about. It’s the first, in what I hope to be a series of tips and tricks revolving mostly around Alias Studio. I’ve found the documentation out there limited at best and this is my opportunity to give a little.

Just to set the expectations low – I seem to be blogging about once a month. So for what it’s worth – that’s my pace. On the other hand, if there’s anybody reading out there, please feel free to drop me a comment and let me know what you’re interested in and I’ll see what I can do.

So, when I was creating the shaders for the car renderings I posted about a while ago, I encountered a particular problem. One that I’ve encountered before, but never had the planets align to solve. Much of what I learn involves planets aligning and this time was no different. The problem was how to create a convincing anisotropic reflection effect that looks cool while tumbling the model live on the screen. If you’re not sure what this is all about Neil Blevins has a good explanation on his site here.

When I went to create a shader for the brake rotors, initially I used the same soft-chrome looking shader I created for the little rivets around the hub (and incidentally, this is the same shader the is used for the overall spoked portion of the wheel). It is just a basic Phong shader with the shininess turned down (broad highlights) and the reflectivity off to give it that bead-blasted look (no crisp reflections). But look at what I got on the rotor. Compared to the rivets, it was totally flat! Which makes sense I suppose, because the rotor itself is just a simple cylinder which is, well, totally flat on the ends.

While I was thinking about the problem, I started trying things. Things like using photographs to simulate the look – which works for static images, by the way, but I think it looks funny when you tumble the model. It’s a static image and thus loses all the luster of a real spun metal disc. Another approach was to use a bump map to actually create the tiny grooves on the surface of the rotor to get the effect. That has never worked for me – real-time or other wise. I consider it a brute force approach which tends to result in brutish end results.

I wanted the effect of an anisotropic reflection – not a physically accurate model of one. Of course, the answer was right in front of me. The hub portion of the rotor had a very dynamic highlight that responded to light in a very interesting way when the model was tumbled. The hub portion of the rotor was conical in section. The effect of light on metal with tiny circular ridges on it is also conical. So when in 3D rendering is the effect of a highlight in direct opposition to the surface geometry? When you use a bump map!

So, I added a simple ramp to the specular channel of my shader and got this. Sweet! It’s just a simple black to white ramp that follows the U direction of the surface. Since the end cap of the cylinder is essentially a revolve, the UV directions are circular and thus the ramp essentially shades the end cap like it was a cone – resulting the effect I wanted.

From there I started building a layered shader. The base layer was a simple gray Lambert. This would allow me to control the overall tone of the rotor. The next was to take my ramp-modified shader and tune it a bit. I made it 100% transparent with no color, no diffuse or anything else other than the specular with the bump mapped into it. Tweaking the shininess of the Phong shader controls the amount of “splay” in the highlight, while the intensity of the bump map controls the, um, intensity. I ended-up using a huge value (1000) for the intensity. This makes the virtual bump mapped cone quite tall. This may be somewhat related to the fact that I’m just using the default “Abstract IBL” rendering environment for this example – this scene just has a really strong single light coming down from the top. I’m sure if I used a scene with more complex side lighting, the value may not have to be so high.

As an experiment, I duplicated the anisotropic reflection shader I just made, layered that on top of the others and set the intensity of the bump map to -1000. So now I have two ramps layered on top of one another – one with a positive value and one of an equal, but negative value. This made the highlight symmetrical on either side of the center axis. It is hard to show in static images, but as you rotate the model, the effect is more obvious.

Lastly, I added yet another layer. This one has an image map of the cooling flutes. I used a solid projection for this. Three actually. One in specular to choke the highlight out of the holes, another in transparency to prevent the anisotropic shaders below from shining through and one as a bump map to get a highlight around each edge (this map had been blurred in Photoshop).

Here’s a slightly different view that shows how the conically shaped highlights travel across the rotor.

That’s it! I hope you enjoyed this first whack at a tips and trick series…       

Cheers,
J.