Hello Blender Wizards!

I am seeking your help in trying to solve a GIS problem using Blender. Any help, pointers or general discussion related to this will be highly appreciated.

I am a Blender n00b but I am aware that Blender has a GIS plugin that helps in creating cityscapes by capturing terrain, buildings etc. from GIS maps. Suppose a city with 3D buildings, parks, lakes has been created. Now, I need to find all dwelling units from which a particular park/lake is visible.

GIS has something called a viewshed analysis which can be used to find area which will be visible from any given point. But that is the limitation, it just gives the view from a point, not a whole area.

My idea is to create stack dwelling units (apartments in high rises) as white objects having unique Object IDs in Blender and parks/lakes as colored light sources. Upon rendering, it is easy to see what dwelling units are lit up in which color. That is all good for visual analysis.

My question is, is there any way in Blender to get Object IDs of Objects that have non-white colors on their face? Or do I have to take the help of a Gaming Engine for this?

Looking forward to the responses. Cheers!

  • g6d3np81@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    If you’ve just open Blender for the first time and then you’ve tried to… do things.
    Maybe, trying to see how far you can go… without getting help. [laugh]
    You might have discovered… you need help immediately.

    -- some donut guy


    This is janky but will do the best I can. Maybe someone way smarter than me can find a more efficient way to do it.

    I’m doing this demo on some park with Butt in Germany (OSM)
    Blend file
    Layout window
    Node setup

    Limitation
    Line of sight is made from the ‘origin’ of (building) geometry (one-to-many).

    I have tried the same method but in reverse and combine lines of sight (many-to-many) and iterate through them but can not get any result, ‘position node’ output is changed based on whatever you are using with it and two sets of point cloud hurts my head.

    However, with this node setup if you model each room as separated object, it will still work but at room level instead of building level. Wowowee itsa very nice. Just no way to quickly get an ID that I know of.

    Process

    1. Import GIS stuff as usual
    2. You MUST set the origin of each object to its own geometry (orange dot must stay in the geometry) as GIS plugin will set origin as world center 0,0,0 and that will break stuff.
    3. Any object that will potentially obstruct the view must be put inside a flat one-level collection.
      3.1 Buildings to analyze can be put in any collection or not at all.
      3.2 If any potentially obstructing object is also an analyzing target from (3.1), it should be duplicate-link with Alt+D then ESC and put in the obstruction collection.
    4. View target e.g. park, lake, must have face, can not be just curves, edges, vertices.
    5. Add geometry node modifier to any buildings you want analyzed.
      5.1 Browse for a node named ‘visibility’ I already set up.
      5.2 Select target.
      5.3 Set ray length (meter) long enough to reach your target.
      5.4 Select any other buildings you want analyzed, with copy source in yellow, paste target in orange hilight. Ctrl+L to copy geo-node modifier to all of them.
    6. Open spreadsheet window and select a unit to see visibility value.

    EDIT: I forget to expose obstruction selector, you can select it inside geometry node window. I also got an idea for V2 which may solve issue of getting IDs list. Will try again tomorrow.

    HAPPY ACCIDENT: you can also stack the modifier and select another target, spreadsheet will show another line of visibility attribute for each additional target in the stack.

    Be careful though, too much and blender might crash.


    I don’t recommend watching/doing the whole donut series, but you still need some familiarity to get around and understand more complex part of blender that other tutorials may teach you :|

    Maybe you can cobble together something even better from these tutorial channels. Erindale, Chris P

    • DontNoodlesOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Thank you very much. This gives me ample pointers to go out and learn.