Posts Tagged ‘Cars’

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.

 

 

Car Design…

Monday, May 21st, 2007

I don’t really consider myself a “car guy”. I enjoy racing games. I’ve seen the Pixar movie. I know my fair share of the latest models on the street and many of the classics. But I don’t crave them. I don’t talk about them all the time. I don’t care if I’m driving the latest or fastest. I can’t fix them. I’ve never seen Bullitt.

 

As a designer though, there is a certain allure. I never had the chance to take a legit transportation design class in college, but there was that temptation. That niggling little voice in my head that said, “yeah, cars are cool.”

There is just something inherently interesting about the shape of cars; the whole format; the platform if you will. Four wheels, two headlights, etc. It’s amazing there are so many variants out there. So many interpretations for a fairly limited archetype.

 

That little voice told me to give it a spin. Get it out of my system. I started this project, a long time ago. I just had to finish it so I could move on to other projects that I need to get out of my system. So about a week and half ago, I dug out my old files and started over. It’s nice to step away from something and come back to it. You see new things.

 

I started with this as my basic idea: make a “super car”. Yeah, I know – cliché, but if you have to get a car design out of your system, might as well make it big and fast (looking). I wanted something that evoked classic 60′s cars (Dinos and Cobras and such) but still feel modern. I always loved this era since car design really was about the shape of things rather than how contorted the sheet metal could be or how many vents something could have (all functional of course!). Keep it simple. Make it nice.

 

I know there is a lot missing with this one. No side markers. No exhaust (hydrogen power?). The grille isn’t really finished. I didn’t do an interior since I didn’t start from the inside-out and no-one could possibly fit in it… or maybe they could. I took the basic dimensions from a Murcielago; overall XYZ dimensions, the track width and wheel base (although I ended-up stretching it a bit).

 

I took this on as a personal challenge. There was a lot I didn’t know about car surfacing and overall proportions, but I know what I like. I like Cobras (as mentioned). Harald Belker’s Lexus from Minority Report is pretty cool. I love the DBR9 Aston Martin. The Ferrari P45 and Enzo are nice as far as super cars go. So yeah, I took bits and pieces from all of these to make my car. As such, I didn’t set out to make it fit any existing brand. I don’t have a name for this car. It’s working title was just J-car in all my 3D files. It could really use a logo on the nose and tail. Details…

As an aside, I should mention that all of this was done in AliasStudio 2008 running on my new Mac Pro. Overall, I am super impressed with the performance. The images are not renderings, but screen captures directly from the CAD application (with a bit of Photoshop for the depth of field and lighting effects). Real-time rendering has simplified my life in so many ways. I love to look at a product as it is developing and evaluate in under a variety of lighting conditions and in different materials. The “image base lighting” features added in the 2008 edition make for some fantastic images. These have a nice airbrush quality to them more than photorealistic. Not hyper real, but convincing. Maybe one day, I’ll do some Maya Mental Ray images of it.

This has been a really fun project. I learned a lot. I learned how many tools are in AliasStudio are tailored for car design that I don’t use on consumer products. I also picked-up some cool shading tricks that I may share at a future date.

Oh, and here’s one for the Cobra fans…