9
$\begingroup$

While there may be cases when you want to render objects other than the ones you see in the editor, you more often need to prevent such difference and have in the render exactly the objects visible in the editor.

Is it possible to lock (meaning keep them in sync) visibility in render to visibility in viewport, so that you get what you see and don't need to search objects one by one to ensure you'll render all and only the objects currently in the editor?

Said otherwise how to keep in sync any pair of icons, at object level, at collection level, and whatever other levels if I forgot some. In sync meaning when one changes the other changes too, as if there was only one icon. In more conventional GUI, this lock is usually represented by a chain link icon:

enter image description here

Question for Blender 2.8.


By the way I don't understand why the active camera view doesn't show objects with render = visible, and rather show objects with viewport = visible. Camera views are supposed to be the ones which are rendered. So there is no way to preview what will be rendered.

$\endgroup$
5
  • 3
    $\begingroup$ Related blender.stackexchange.com/questions/121898/… (but possibly not useful) $\endgroup$
    – batFINGER
    Commented Feb 8, 2020 at 12:22
  • $\begingroup$ @batFINGER, thanks, still useful to remember, but as you mentioned not the solution (by the way, it works only by the negative --like collection icons 'disable in render' or 'hide in viewport'--, it removes (filters as programmers would say) things, like say empties which won't appear in the render, but it is not able to show non 'disabled in render' objects that have been 'hidden in viewport'). I'd add the unclear behavior of icons at collection level: Shift-Click will change all children icons, but no in the same way than if children have been Click-ed individually. $\endgroup$
    – mins
    Commented Feb 8, 2020 at 12:55
  • 2
    $\begingroup$ Having a sync feature would be very useful. Perhaps consider suggesting it on rightclickselect. And good job on the UI mockup, it looks really neat :). $\endgroup$ Commented Feb 8, 2020 at 14:12
  • 1
    $\begingroup$ Just spitballing perhaps making two master collections in scene collection, one for all (as it is now) and "Render" that populates when selected (set as active) (another job for msgbus) $\endgroup$
    – batFINGER
    Commented Feb 9, 2020 at 10:54
  • $\begingroup$ @batFINGER, thanks again, I'll remember msgbus which I didn't know. I fear such solution could be fragile, considering the strange behavior of object visibility when withing collections or when various filters are set (e.g. Show overlays switch as I discovered today). Perhaps msgbus could trigger a callback upon a change in any of the two properties to keep them in sync?? (I still hope there is a solution without scripting though). I appreciate your time on trying to find a solution. $\endgroup$
    – mins
    Commented Feb 9, 2020 at 13:00

3 Answers 3

5
+100
$\begingroup$

Edit: I wrote an add-on that allows to sync with the click of a button, and I added installation instructions below.


I found the following line of python code that syncs the ports here:

for ob in bpy.context.scene.objects: ob.hide_render = ob.hide

This line needs to be adjusted for blender 2.8+, like someone pointed out in the comments of the original post:

for ob in bpy.context.scene.objects: ob.hide_render = ob.hide_get()

However, this will only do it once and not permanently link the two.


Therefore, I wrote a short add-on that syncs the render ports with the current view ports through the click of a button in the collections panel. You need to click every time you want to synchronise. I do not yet have a solution to link them continuously, but the button should already make things considerably easier.

enter image description here

Installation If you are interested, you can download the add-on here: https://github.com/Nayunis/Blender/blob/master/sync_render_with_view.zip

Just copy the unpacked folder into the blender add-ons folder (something like C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\addons)

Then you can activate the add-on within blender via: Edit > Preferences > Add-Ons (in the left menu) and search for "Sync Render with Viewport" and tick the little box to activate it. Now the button should be there.

enter image description here

$\endgroup$
3
  • $\begingroup$ Thanks, at least this save multiple clicks in the outliner, so useful anyway. $\endgroup$
    – mins
    Commented Aug 14, 2020 at 19:00
  • $\begingroup$ I hope the little add-on I wrote helps :-) If I get around to it, I will try to make a button that allows to toggle permanent linking/un-linking, so that it is not necessary to manually synchronise. I will update this post in case I do it. $\endgroup$
    – Nayunis
    Commented Aug 15, 2020 at 4:36
  • $\begingroup$ Nice addon! But unfortunately it doesn't work for collections. I have a collection that contains multiple items that are visible, but the collection itself is hidden. I would like the sync-button to also disable the entire collection from render. $\endgroup$ Commented Nov 15, 2023 at 23:42
0
$\begingroup$

Use collections. If you already know what they icons do on the outliner, use collections to hide specific groups or unhide them: https://streamable.com/ntqif

$\endgroup$
1
  • 2
    $\begingroup$ Collection have the same problem: You can make an object visible in the render while invisible in the viewport (and vice-versa). In addition I use collections intensively and my personal experience is they add another level of discrepancy between the values, which is quickly more tedious to correct than useful. $\endgroup$
    – mins
    Commented Feb 8, 2020 at 10:57
-1
$\begingroup$

It was a little hard to understand your question simply meaning (from what I understand) to ensure that the objects you see in the viewport will be rendered in the final render. Please correct me if I am wrong.

Unless you have specifically disabled rendering for a single object in Blender, if you can see it in the render viewport, then I am almost positive you will see it in the final render.

In the case you are working with hidden objects and you want to show them all, go to the search bar and type "Show all". Select the option, and see if any objects become visible.

If you have objects that do have rendering disabled, go to the collections tab, and make sure the camera icon is selected. Also make sure that the "eye" icon is also selected. If these are selected, they will be clearly visible, not greyed out.

If what you actually want is to show the objects in the final render as they are seen in the viewport, then don't worry. DevLook function (2.8) will show you almost exactly what it will look like.

If an object is grey/transparent, then select it, and make sure that rendering is enabled. If so, then check the materials. The object may be transparent. If you want this, then the object will be invisible at full color white. If you want it to be transparent but visible, then lower the color value. If you want it to be semi-transparent, then give it a darker color, or a translucent shader.

If you want to see the actual render status (what everything looks like rendered), then you should just use rendered view. The spheres at the top right of the viewport show different views (wireframe,solid,material (LookDEV), and rendered.

I really hope my answer helps you, and Happy Blending!

$\endgroup$
5
  • 1
    $\begingroup$ I know how to show and hide objects in the viewport or in the render (using icons in the outliner). What I want is to lock the status for the viewport and for the render (make them equal, when one is changed, the other is changed, same for collections). From what I understand from your answer, this requires DevLook available since 2.8, but is unknown to me. $\endgroup$
    – mins
    Commented Feb 8, 2020 at 10:53
  • $\begingroup$ Have you used viewport render? $\endgroup$ Commented Feb 8, 2020 at 14:43
  • 1
    $\begingroup$ I don't know if you're talking about a feature of 2.8. Searching 'viewport render' returns this page describing a function which seems to have vanished between 2.7 and 2.8. Perhaps this is now the viewport shading option 'rendered'. If this is the case, then it doesn't relate directly to my problem. $\endgroup$
    – mins
    Commented Feb 8, 2020 at 15:04
  • $\begingroup$ The function (lookdev/devlook) same thing, is only available in 2.80+. In 2.79 there was a material view, but it was not as good. $\endgroup$ Commented Feb 8, 2020 at 15:40
  • $\begingroup$ If you are using compositioning, and are trying to achieve the same look in the viewport to see what the final render is going to look like, then you cannot. $\endgroup$ Commented Feb 8, 2020 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .