Render 1 object, but have it look as it would in a complete scene render. Canvases cannot do this.

vozolgantvozolgant Posts: 207
edited July 2021 in The Commons

1. Imagine you have a complex indoor room. There's a window with outdoor light pouring in.  Inside the room there is a table with many people sitting at it. There is multiple indoor lights all casting shadows.

2. Now, imagine you do a render of your entire scene.  We need this for comparison.

3. Now, imagine you're able to render only a single person at the table. The renderer would only output the single person in a transparent PNG, with the intent of overlaying this over the base scene in photoshop. Here's the problem, if you use canvases to try and render only that person, this render of the single person will NOT look the same as compared to a complete scene render (with the person in it).  The single person render will have a different tint, as if the shadows are incorrect. If you do a render of the whole scene without that person in it, it won't have that persons shadow data either.

So the question is, how do you render a single person at this table, but have it look exactly as if you've rendered the entire scene with the person in it at the table?  

I want to be able to render objects in a scene into separate image file and overlay it in photoshop, but it needs to look exactly as it would had you rendered the object and entire scene all in one render.

There are many posts in the past 10 years of people trying to do this, but all result in that tinting problem, or people just cant' figure it out.

Post edited by vozolgant on

Comments

  • lilweeplilweep Posts: 2,561
    edited July 2021

    it doesnt take 10 years to figure out the obvious...

    obviously if you do not include in your "sub-render" all the scene objects that cast light and interfere with light, then the scene is going to look completely different in each subrender.  So unfortunately there is no way around it, you must include all of the major light sources and all of the major light blockers in each of your sub-renders.

    For light blockers, you can use stand-ins that are simplified meshes without textures.  E.g., in your example you said there are a bunch of figures sitting around a table - you could have Subd0 figures with no textures as stand-ins.  But even those are going to come with a cost when rendering. The reflectivity of a texture-less mesh might need to be considered.

    And yes you can use Canvases to help you composite.

    Post edited by lilweep on
  • ioonrxoonioonrxoon Posts: 894

    My solution is to render the scene with all the items in it for each character... takes longer than just rendering the character, but it's the only way I know to keep the bounce light and make sure the character edges and shadows blend properly with the environment. Then I'll just take the layers and simply poke a hole in the top layer with the eraser where the character on the bottom layer is.

  • RodrijRodrij Posts: 157
    edited July 2021

    This solution won't be practicle if you are doing multiple images at once but if you are just doing one image that you want to take into photoshop.

    1. Render the object you want to isolate with max hdri lighting and back ground set to black so the object is completely white. Alternatively, if you have a depth camera(Iray depth canvase for example) that renders close things as white and far things as black you can do the same thing much easier. You can also just render the object normally with transparent background PNG and then in photoshop and increase exposure to 100.

    2. Use that image as a mask layer in photoshop.

    3. Render the entire scene once as normal and then just use the masks to isolate each object. Duplicate full render apply mask to object one, and repeat.

    If you are doing multiple images or animations you'd have to do it something like that in After Effects. You would render the mask transparent background animation and then the regular animation and then just do the same thing with masks just in a layered timeline.

    Post edited by Rodrij on
  • UncannyValetUncannyValet Posts: 230
    edited July 2021

    Rodrij said:

    3. Render the entire scene once as normal and then just use the masks to isolate each object. Duplicate full render apply mask to object one, and repeat.

     

    so in your scenario you are assuming the whole scene can be rendered at once (i.e., fits in VRAM). 

    A lot of the incentive for compositing is because a whole scene cannot be rendered at once.

     

    Also if you can render the whole scene, is there a valid reason why you cant just use beauty canvases to isolate groups of figures/props in the scene all at once?  i thought they will pick up shadows (maybe i am misremembering)

    Post edited by UncannyValet on
  • outrider42outrider42 Posts: 3,679

    You have to pick your battles. Frankly if you want a perfect match, but lack the hardware, you will have little choice. Because if you want to match the lighting exactly...well you have to match the light exactly. You cannot hide a wall and expect the light to be the same, it simply is not possible. You would have to use Photoshop to the best of your abilities to replicate the effects.

    If this is a VRAM limitation, you can try to hide as many items in the scene as you can without effecting the light. You can use the spot render tool to render a scene in sections and piece these together in post. The spot render itself will NOT save you VRAM, but because you are rendering a smaller section of the scene, it will save you time. So you can take your scene and render it without any people, if that fits your VRAM. Then using the spot render, add a single person at a time and render the area around them. Be aware this may not be perfect, as the person may cast shadows you do not anticipate. Also, the light bouncing off them may alter the color of that light, and this can cause areas that do not perfectly match. This is extremely easy to overlook.

    But with the spot render tool, you can make as many "fixes" as you wish, and each one will be faster than a full render. The smaller the area of a spot render, the faster it is. No joke, while the full render might take an hour, and spot render of just a portion might only take 60 seconds. I have personally done this. With a person, depending on how large the spot render is compared to the full scene, it might take 10 minutes in this example, maybe 15 or 20, but still far better than an hour. When you use the spot render, make sure to go to the tool settings and select "new window". This is how the magic works.

    Then in your Photoshop, open the big render and then open each spot render as a layer. You can merge things down and blend things that need it. The spot renders will drop perfectly into place.

    Note: if you use the denoiser, you might notice a visible line on the edge of a spot render when you drop it in place. If you do not use the denoiser, then the spot render will line up perfectly. You can always use a denoiser on the final image instead of using the one in Daz. Look up MCasual's guide to using the Intel denoiser, if you have hardware limitations, then you really should look this up regardless, you will be amazed. This denoiser will make a world of difference.

    https://www.daz3d.com/forums/discussion/334881/a-i-based-open-source-de-noiser-for-daz-studio-pc-and-macs/p1

    This is one way of doing it. But this still requires being able to fit the room into the scene. If you cannot do that, then you are going to have to get real good at Photoshop, or upgrade your hardware. There is no way around it.

  • RodrijRodrij Posts: 157
    edited July 2021

    blue said:

    Rodrij said:

    3. Render the entire scene once as normal and then just use the masks to isolate each object. Duplicate full render apply mask to object one, and repeat.

     

    so in your scenario you are assuming the whole scene can be rendered at once (i.e., fits in VRAM). 

    A lot of the incentive for compositing is because a whole scene cannot be rendered at once.

     

    Also if you can render the whole scene, is there a valid reason why you cant just use beauty canvases to isolate groups of figures/props in the scene all at once?  i thought they will pick up shadows (maybe i am misremembering)

    If the question is how to sperate elements into different layers in photoshop, that is how you can do it.

    If you want to seperate elements so you can render with limited VRAM, That is a different question.  The way I do that is group characters and/or scene or set different canvase elements depending on where on they are on screen. Say you have 10 characters,  Then render the scene part by part using the spot render tool  in windowed mode or canvase render. Then composite them back together in photoshop.

    You'll have to do several overlaping renders so you get shadows to appear properly. Like in the example attached below you'd want a render of group 5+6 then 4+5 and so on.  Group 1 is not likely to cast shadows or have any obvious reflections affecting group 6.

    I've used this method to render 11 characters at high resolutoin subd 2 with clothes on. 
     

    example.jpg
    900 x 522 - 169K
    Post edited by Rodrij on
Sign In or Register to comment.