render faster with camera culling

Поділитися
Вставка
  • Опубліковано 1 жов 2024

КОМЕНТАРІ • 79

  • @johanavril1691
    @johanavril1691 Рік тому +237

    you can just use the camera culling setting in the Render properties Instead of using a geometric node: in the simplify section turn on "camera culling".
    And then you can enable or disable culling for each object in the scene with the "use camera cull" in the Object tab for more control.

    • @Zev_Reef
      @Zev_Reef Рік тому +14

      Didnt even realize Simplify section had that, I never used simplify caus I thought it was just subdivion control

    • @infectioussneeze9099
      @infectioussneeze9099 Рік тому +39

      Cgmatter has left the chat...

    • @BlenderDaily
      @BlenderDaily Рік тому +5

      wow! good to know, thanks!

    • @TheRumpletiltskin
      @TheRumpletiltskin Рік тому +6

      doesn't that completely destroy any reflections though?
      Like, if you have metallic items in the scene they won't have anything behind the camera to reflect.

    • @johanavril1691
      @johanavril1691 Рік тому +8

      @@TheRumpletiltskin you can manually turn off the culling for the objects that will be visible in reflections but thats about it

  • @akre54
    @akre54 Рік тому +138

    This is cool but it's just frustum culling. You can turn it on in Render > Simplify > Camera Culling (or Distance Culling). I'd love to see an occlusion culling tutorial, since that isn't built into the software

    • @ri-gor
      @ri-gor Рік тому +9

      I was going to say, I'm really surprised that blender wouldn't do frustrum calling by default... I guess it somewhat makes sense if you're using ray tracing on a scene with a bunch of shiny objects - you don't want things behind the camera to not render at all - but if you're not that concerned about realistic reflections from behind the camera it's kind of whatever. I can see some value in this method, but it's fairly niche and I would assume is exactly what frustrum calling does by default behind the scenes.

    • @Achelon
      @Achelon Рік тому +3

      @@ri-gor I just feel that if you want something like that, one could just use Eevee

    • @ri-gor
      @ri-gor Рік тому

      @@Achelon in most cases, yeah. It might be a good one if you're doing a large space scene where there isn't much behind the camera anyway though. It was still allow ship and HDR reflections and have realistic nearby lighting for asteroids, but less detailed lighting from asteroids that may have passed behind the camera. Like I said, very very niche, but I could see some applications... Even in that example there are quite a few problems, but I am a total amateur in anything related to 3D rendering, so I will definitely defer to someone with more experience lol

    • @digital0785
      @digital0785 Рік тому

      ​@@Achelonya with ssgi

    • @phizc
      @phizc Рік тому +2

      ​@@ri-gorYou could also have objects outside the frustum that can cast shadows into the field of view, so frustum culling isn't safe to have on by default. It can be worked around by having a shadow pass with "all" objects enabled, I presume, but it's still too aggressive to have on by default.

  • @sinom
    @sinom Рік тому +21

    This is basically view space culling. While this is a great idea in rendering, in ray-traced applications like blender it will cause artifacting. Here it's usually a better idea to instead improve the sampling heuristics.

  • @elliotmarks06
    @elliotmarks06 Рік тому +45

    The only problem is the lack of lighting (cast shadows, reflections, etc.) from the deleted geometry

  • @SuperSuperka
    @SuperSuperka Рік тому +5

    This method works only for these kind of super-simple scenes. For real-life scenes it just non-sence.

  • @Eric-ue5mm
    @Eric-ue5mm Рік тому +21

    This is.... Camera culling. You find that under "Render->Simplify->Culling"

  • @Purpbatboi
    @Purpbatboi Рік тому +7

    You mean the most simple optimization trick in history of computer graphics?

    • @SuperSuperka
      @SuperSuperka Рік тому

      most useless - defently.

    • @Purpbatboi
      @Purpbatboi Рік тому

      @@SuperSuperka Its not useless its just that its basically the thing you SHOULD know and should be doing in the first place
      on Cycles there's a fancy setting while for eevee you need to setup a Geometry Node system

  • @baseult116
    @baseult116 Рік тому +4

    Basically just using a world to screen function to not render anything outside of camera... Cool but nothing new

  • @SongStudios
    @SongStudios Рік тому +8

    This is really cool, but unfortunately it doesnt work with reflections. Is there a way to make it work with that?

    • @sutsuj6437
      @sutsuj6437 Рік тому +1

      No. The only thing you could do is disable culling for that object.

    • @Eric-ue5mm
      @Eric-ue5mm Рік тому +1

      Probably not really, you could use alt+D instead of shift+D on individual objects to not copy them but reference them.

  • @eternalgamer496
    @eternalgamer496 Рік тому +8

    I just got into college and was learning about vectors, at first it didn't appear that interesting but seeing you fix real life problems with it motivated me a lot to learn more about vectors.

    • @_S_P_A_C_E_M_A_N_
      @_S_P_A_C_E_M_A_N_ Рік тому

      Geometry nodes really made me appreciate all of the math and physics I did in highschool and college

    • @AHSEN.
      @AHSEN. Рік тому

      @@_S_P_A_C_E_M_A_N_ Typical story. Pretty much every subject you'll discover is way more fun and interesting when you're using it voluntarily, outside of school 😆

  • @alexvith
    @alexvith Рік тому +6

    I think the real value of this technique is easing the toll on the Workbench render engine, i.e the viewport render engine that struggles when there's lots of polygons in the scene. The issue, though, is that it becomes a pain in the ass to move the camera if you are doing culling on a lot of objects, because if has to recalculate everything with each transform you make.

  • @True-VFX
    @True-VFX Рік тому +3

    This doesn’t work for instances in cycles. So culling won’t make your renders faster if you’re camera culling anything scattered because an instance is only calculated once anyway.
    So this only works on culling objects which means you either need to have one massive object like yours (unlikely for the average user) or have the modifier on every object in a scene to get any value from this which at that point you may as well use the culling in the simplify tab because it’s quicker than putting a modifier on hundreds of asset and does the same thing.
    Also to caveat. If you’re using cycles then you’ve just destroyed any off camera bounce lighting so reflections will be wrong and global illumination will be wrong. May not be an issue in a still image but will be visible light artefacts in an animation so it’s useless for that, and if you’re working a still image only you may as well just not place objects outside of the camera view as this will optimise your viewport and renders as you work and is less work in the long run.
    A better way to optimise would be having off-camera decimation and texture lods so you can reduce geometry in the scene and reduce the amount of ram being used on textures so you’ll still get all your global illumination but now you’re not calculating high geo counts off camera. Decimation could be done in geo-nodes but you’d need a script to handle texture lods.

  • @robostep9829
    @robostep9829 Рік тому +2

    Applying gamedev tricks to blender renders day 532

  • @KaidenBird
    @KaidenBird Рік тому +26

    Could you instead remove certain vertices? To keep reflections and stuff, instead of getting rid of it, potentially stopping some sort of light bouncing?

    • @moritz7214
      @moritz7214 Рік тому

      I thought of that too, I would create a new layer and render the reflections, in that new layer, with the backgound. For example, if you render a bathroom with a mirror in the center of the picture, you can "esaly" render it out and compose it together.

    • @TobiasLeanderOfficial
      @TobiasLeanderOfficial Рік тому

      U can use the same technique but with subdivision, so u have a low poly scene and anything in view gets subdivided.

    • @sander-wit
      @sander-wit Рік тому

      Perhaps you could decimate all verts outside the view to lower the vert count but keep the rest for shadows and reflections, but I wonder if this solution is feasible with a complete scene with multiple objects and collections instead of a single mesh.

  • @mustafakhaled92
    @mustafakhaled92 Рік тому +2

    man, you just make blender harder to learn every day! :D, I'm ok with the 16 sec

  • @mixerbrush7839
    @mixerbrush7839 Рік тому +1

    For those who don't get whats happening. Remember you are not alone.

  • @Maarten-Nauta
    @Maarten-Nauta Рік тому +2

    In an actual scene where you have more than 1 single geonode setup how would this be feasible. I have 5K objects in an avg archviz scene. And camera culling my scatter layers takes a fair amount of time when the render is still initializing. I just don't think this scene is a good representation of an avg blend project that needs optimization.

  • @ejcy3101
    @ejcy3101 Рік тому +1

    Viewport culling with geometry nodes, awesome. How does this compare to culling addons?

  • @gavinpenrose
    @gavinpenrose Рік тому

    I used to absolutely love yr videos, now i just feel dumb watching them as i don't understand them anymore :((((((

  • @zyugyzarc
    @zyugyzarc Рік тому +2

    bro invented frustum culling in geo nodes 💀

  • @jonathan6296
    @jonathan6296 Рік тому

    WoW! Dude! You just discovered a ... wheel! But seriously, do an interior scene and see how this "technique" works ...

  • @vlodgoral8258
    @vlodgoral8258 5 місяців тому

    it works but massively slows down my viewport navigation, but cool feature to have once you actually get to the rendering stage and enable it then to save time

  • @ivanpergasiFreelance
    @ivanpergasiFreelance Рік тому

    Is there a similar solution that could be applied to a complex scene with more than a single geometry node, can we exclude or temporary cut out part of a scene if it is not in the camera view ? Does it significantly reduce the render time?

  • @ujjwalsingh5188
    @ujjwalsingh5188 Рік тому

    but If we delete other object there will be no reflected light from that .... and when the object appear again sudden Reflected light start to show ?

  • @serbanandrei7532
    @serbanandrei7532 Рік тому

    Can you make it block the objects behind other objects?
    Maybe in distance layers?

  • @user-qh3nq8np5i
    @user-qh3nq8np5i Рік тому +1

    how do you do it if one of the objects in view is metal and you see things disappear from the reflection? but good video about frustum culling, you should do one about backface culling and occlusion culling!!!

  • @bryangrunauer
    @bryangrunauer Рік тому +1

    - teacher, when will i ever use this algebra BS in the real world?
    - well camera culling

  • @abdallahraafat432
    @abdallahraafat432 Рік тому

    What if you have a reflecting material like metal or glass
    you want the material to catch data from other objects outside the camera frame as well

  • @abstract_duck
    @abstract_duck Рік тому

    you gaslit me real good here ... sadly im rendering 360 animation so week long render it is

  • @themollerz
    @themollerz Рік тому

    Like how the heck do you look at something called dot product and figure out a real use for it lmao

  • @rackneh
    @rackneh Рік тому +1

    Would this be more performant than the current culling system in Unity? I assume it would be if you used a kdtree for the foreach loop

  • @pleaserespond3984
    @pleaserespond3984 Рік тому

    Ah, so you've reinvented XGen's camera culling. (apologies to whoever's PTSD was triggered)

  • @lemonhscott7667
    @lemonhscott7667 Рік тому

    Ooo this could be a cool idea for like a flashlight

  • @muslim_vegeta1445
    @muslim_vegeta1445 Рік тому

    Dont you have a channel called default cube ?

  • @mqbaka
    @mqbaka Рік тому

    I also liked the video 2 times faster.

  • @AgustinCaniglia1992
    @AgustinCaniglia1992 4 місяці тому

    It isn't working for me :(

  • @thalisgrey
    @thalisgrey Рік тому

    More questions than answers.

  • @jmh3d
    @jmh3d 5 місяців тому

    The fastest most concise version of the culling from what I've seen. Being able to tweak which aspect of the geometry is deleted in addition to easily focusing the culling cone makes this very powerful and useful. Thanks again!

  • @waelsahly30
    @waelsahly30 Рік тому

    i need a upbge tutorial please :)

  • @ex-secular-4996
    @ex-secular-4996 Рік тому

    Good information brother🎉

  • @Heavenira
    @Heavenira Рік тому

    damn you knew this video title was gonna be contentious didn't you 🤣 great tutorial

  • @vco7285
    @vco7285 Рік тому

    I have my correction exam in maths soon and I'll have one problem about spherical coordinate system and I need to know what function can make a cone or a sphere n all that. Funny to see it in use after learning. Great video, thanks!

  • @cg3Dim
    @cg3Dim Рік тому

    Nice

  • @tehf00n
    @tehf00n Рік тому

    Dot Product is one of the handiest things in game development.

  • @ian2593
    @ian2593 Рік тому

    Which object are you using to generate the Geometry Nodes? The camera, one of the spheres or a separate object?

  • @tartyto
    @tartyto Рік тому

    I thought blender has this from default. Thanks for the tutorial!

  • @VisualistAyush07
    @VisualistAyush07 Рік тому

    Gigchad of geometry node

  • @janvandertoorn
    @janvandertoorn Рік тому

    Bro, not a fan of overcomplementing someone but damn, dude, that's ff'n genius! Love it thnx

  • @terr20114
    @terr20114 Рік тому

    This man does not disappoint.

  • @radosawkubicki5076
    @radosawkubicki5076 Рік тому

    Hi. Are you able to help me? I have a challenge for you.
    It needs nodes thanks to which the shadow will be in the form of dots. But not regular, systematic dots. Something like dotted shadows in a drawing. Greater density of dots where the shadow is darker. I gave up and would like to use them for my projects.

    • @nehemiahsomers4141
      @nehemiahsomers4141 Рік тому

      In Eevee, make a principled BSDF shader (white) and connect the output to a shader to RGB node. Use a color ramp to make it so only the shadows are visible, then use that as the factor for a MixRGB node connected to a voronoi texture with the randomness turned to zero. Also add a color ramp to the voronoi output so it's solid dots instead of soft ones. For the scale you can make another color ramp from the original shader-to-rgb node and plug that into the voronoi scale input. After all that, overlay it onto your original texture using a mixRGB node with itself as the factor.