1
$\begingroup$

I have been working on using Cycles to bake textures for a game environment. This works well for base lighting which can be rendered at low resolutions, then scaled-up and blurred but for high resolution/high frequency textures Cycles takes way to long to render. Basically this takes about an hour per texture at 1024x1024 since I have to render at higher samples since the final texture cannot be blurred. However this only takes a few minutes for the base diffuse texture rendered at 512x512 then blurred and scaled up.

To deal with this, I would like to just bake the diffuse shader result to a texture and then scale it up to match the high-res base texture and combine them both using the compositor but I really have no idea where to begin. What nodes would I use and with what settings?

Here are some textures to help illustrate this point.

(i) a basic colored procedural texture baked with no lighting(Blender Internal), the original is 2048x2048.

(ii) a texture baked with Cycles_OSL diffuse lighting only.(512x512)

(iii) a texture baked with both of the above(this is what I'm hoping to avoid)

(iv) The final scene with textures applied and no lighting.

enter image description here

enter image description here

enter image description here

enter image description here

UPDATE: Well, the multiply node seems to be what I needed for this, thanks, here is a test that that uses more diverse colors. The strip on the left is the Cycles bake output done the way things are normally done and the strip to the right uses the compositor node to combine the original colors with the diffuse shader node output. Both look identical so this all works.(except for the weird margin problem but that's off-topic)

To the right is the scene, the center cube was baked.enter image description here

$\endgroup$
1
$\begingroup$

Basic node trees would be like this:

enter image description here

Sample file

Note:

  • The Composite node will only output based on Scene size set in Render tab. If you want to output full-size composite result, you have to use File Output node.
  • Mask node is sort of a trick to apply the transform result without being limited by the original image size.
$\endgroup$
  • $\begingroup$ Leon, I don't see how to mark your answer as the solution that I was looking for. Any thoughts on this? $\endgroup$ – MarcClintDion Mar 6 '14 at 15:44
  • $\begingroup$ @MarcClintDion Hmm, I'm gonna watch your updates again. Trying to understand what you really meant. Or we can chat here now. $\endgroup$ – Leon Cheung Mar 6 '14 at 15:53
  • $\begingroup$ I don't see much thing to do more with blender in your question. You were asking why something seemed wrong when multiplying layers in GIMP. Will you provide with a more clearer question? I really can't get your point fully from what you asked if this is not what you want. $\endgroup$ – Leon Cheung Mar 6 '14 at 16:16
  • $\begingroup$ @MarcClintDion Ah, OK. However, I just tried GIMP yesterday, B ut I still don't see the difference. And I really would like to help you to figure it out. Btw, there is a "√" on the left hand side to my answer, check it if you like. :) And, I'm in that chat room, we can still chat there. $\endgroup$ – Leon Cheung Mar 7 '14 at 0:34
  • 1
    $\begingroup$ EDIT, in case anyone is wondering what Leon is talking about here. There was a reference to GIMP in the original post that was a Copy and Paste error. Then we got on the topic in the comments but I deleted all references to avoid further confusion. Sorry. $\endgroup$ – MarcClintDion Mar 7 '14 at 1:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.