Rendering in Passes?

Hello, all:

I’m looking into doing my second entry to CGChallenge using Blender to composite with live-action video. My problem is that they keep specifying the following step in their rules:

Render in passes (diffuse, specular, reflection, shadow)

I am not at all sure how to do this in Blender. Can it be done?

-Bischofftep

I’m fairly certain that unless you have the Unified Renderer turned on, Blender does this by default. You may want to ask over at www.blender.org in the developers forum to get a more specific answer. But I’m pretty sure you’re all set.

Multi-Pass rendering is not a feature that is buit in to Blender. You can try to do it by duplicating your scene and replacing your existing materials with alternative materials with only the color active or the bump channel active, but i wouldn’t reccomend it, its a hell of job (depending on you scene of course). The only real alternative would be to export your scene to Virtualight or YafRay, i think these renderers can do multi-pass rendering but i am not sure.

Greetings,
MadMesh

Well that answers that question. Where did you get that information MadMash?

It’s not mentioned in any of the manuals or documentation i’ve read on Blender. I’ve been using Blender for 3,5 jears now and the only addition to the render engine i’m aware of is the unified renderer and it supports a gamma correction an a post proces feature, no multipass-rendering i’m afraid.

Greetings,
MadMesh

Fome some things, it may not be that bad (like shadows - turn the material to alpha 0.0001 or something). You can easily apply one material to multiple objects by selecting all the target objects, then selecting an object with the intended material, and doing CTRL-L (make links) and selecting Material.

But yeah, the others are real tricky :expressionless: You’d probably need to end up making many versions of your materials and change between them at render time.

The difficulty with compositing them by hand is that the color’s and bump mapping won’t combine correctly…At least I don’t see how it could.

That’s an interesting point. But in reality you rarely would want to have bumps and color in separate passes, so it’s not a problem. And as long as we’re talking about the Blender scanline renderer, I seriously doubt that bumpmapping actually displaces the colormap at all. It’s just about where specularity and ‘darkening’ respectively is placed.

The bump map doesn’t displace the color map at all, but if you think about it, the only thing the bump map does is give the impression that there’s more detail there than really present by changing the specularity and shading of the surface. So the color map HAS to be effected by the bump map in order to give the appearance that the color darkens and lightens based on the way the light is hitting the “bumps”. Simply layering the images in photoshop wouldn’t accomplish this. Or is my understanding of what the bump map is actually accomplishing in blender limited? It seems to me that its not displacing anything, so much as it is creating the appearance of displacment by altering the color map. Not by actually altering the rendering of the mesh.

I’ve used multiple passes for a variety of things.

For example :

Sorry there’s a motion blur on this from virtualdub but…

http://fermat.ups-tlse.fr/~mcshane/blender/img/still.jpg

is done with a specular pass, a mask, a pass for the
warp plugin and a beauty pass then everything is composited
together in blender.

Even for animations

http://fermat.ups-tlse.fr/~mcshane/blender/img/bikeChase.avi

It’s not so hard for the spec pass: duplicate the scene, make
all the meshes single user, add a black shadeless material
to everything you don’t want to see, make the world black.
Add a black specular material to the objects you want to see
and adjust the add. Render in with the unified render button for
global control.

Save the avi, import as a layer above the beauty pass
in the compositing window and then do an add on the 2 layers.

Shadow passes work similarly[/img]

Yeah…that sounds…easy…I guess…

That is correct. Altering of the mesh would mean a “real” displacement, which is (almost) impossible to do in a reasonable way using a scanline renderer like the one in Blender. You would need to use a raytracer such as BMRT, VirtuaLight or 3Delight (there are more) to get ‘true displacement’

<edit>And I wouldn’t think that “altering the color map” is a correct way of explaining this. Specularity is merely the result of the specular procedure adding the correct color “on top of” the final rendered pixel.</edit>

macbuse wrote:

Add a black specular material to the objects you want to see
and adjust the add.

Does that mean that al your materials have the same highlight? What about the materials with bump maps or colored highlights. I generaly use subltle highlights and “dirt maps” to break up the specularity, i don’t think you can solve that with a single spec material.

MadMesh

MadMesh thats a good point…if you simply turn on the spec channel and turn off everything else, it won’t render the same at all because specularity is directly related to the bumb mapping and you can’t render the spec map without rendering the bumps first…or maybe I missed something there.

Jamesk:

Displacement mapping CAN be done in blender though, as we all know. Maybe the best bump mapping would be half bump and half displacement. Too bad you can’t shut off the noise once you add it :frowning:

Well :smiley: I just gotta split some hair now, so I might as well… What you’re referring to (the noise function) is not displacement MAPPING as such, it’s more like an imagebased modeling tool. Mapping per se would be a material property that could, as you said, be modulated or even switched off entirely just by editing the material. And that is not the case with the noise function, since it cannot be easily change once applied.

And the hair was split :smiley:

However, one could argue that a noise modification can in fact be done - using vertex keys. But that’s another story.

You’re absolutely right Jamesk, I misspoke. Displacement mapping is caculated render time and isn’t actually affecting the mesh in question. You’re right. What I was tying to say was that you can imitated with Blender by using the noise function. Thanks for clearing it up though because I don’t want people thinking they can just hit noise and expect everything to be hunky dory.

Okay so if you have a bump map you can leave it and not do the
shadeless thing, just remember to adjust the ref setting instead.
You should still use a black base material agains a black world.
If you want the correct contrast between “caustic” highlights
when you make a seascape for example this is just perfect.

As for a diffuse pass I used to reduce the hard and then blur
the specular pass (with VirtualDub) to save time then combine the two
in the composing window. I got that from Digital Lighting and Rendering
by Jeremy Brin.

I never saw the benefit of doing a pass for reflexions…

In fact I don’t think that it’s worthwhile to do the passes unless
you have something very shiny (ocean, large metal object, sea)
or you want to do something like bullet time where you need
a beauty pass, a pass as input for the warp effect and a specular
pass…or perhaps you want to add a diffuse effect to simulate
the “halo” of fine body hair.

On the other hand if you want really good shadows for separate
objects a shadow pass gives you a maximum of control.

The benefit would be the same - that is, you could adjust the global amount of reflections in post without having to rerender the whole shot just because stuff was too shiny or too dull.

Thats a good point Jamesk but isn’t the idea behind some of these modeling programs to REDUCE the amount of post you have to do? I mean your results may turn out better that way, but for anything time sensitive these operations wouldn’t be practical would they? And how about in an animation? Forget about that. I guess I’m just suggesting that for anything but a still scene, post work is a bandaid for a gunshot wound.

It would be nice if images were rendered in individual layers so if you needed to you could do post work on each layer. However they’re not sigh

That’s possible. All I know is that most studios doing animation, particularly if it’s stuff that’s supposed to be integrated with live action (but in pure CG as well) usually render out separate passes for all shots, then combine it all afterwords while doing editing and compositing.

That way you could have the artdirector standing behind your back as you’re working that Combustion-suite saying

  • “hey, dude, that cow is too bright!”
  • OK, I’ll just dim the diffuse pass a bit (tweak tweak, takes two seconds), the he says
  • “Well, that’s not shiny enough”
  • OK, I’ll just boost the reflection-pass a bit (tweakily-tweak, takes two seconds)—
    —and so on. You can’t just say “oh, too dull, could you wait here for like two days while I rerender the whole shot?”