sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Ruby 'Bug'] Ray stops on a hidden object

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 519 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tomasz
      last edited by

      As the title says. I have discovered this when testing 'Front Face 1.1' Plugin.
      It can be valid from a programmer point of view, but isn't right from pure logic point of view.
      There could be an option for model.raytest ray option.
      The option would be by default true - ray would behave like a ray of light. False - would mean that ray will stop on a hidden geometry.

      I have attached a test scene. It can be tested with the FrontFace plugin 1.1 as it uses rays.

      Tomasz


      Ray stops on a hidden face

      Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

      1 Reply Last reply Reply Quote 0
      • Didier BurD Offline
        Didier Bur
        last edited by

        Hi,
        I second that !

        @unknownuser said:

        There could be an option for model.raytest ray option.

        I've encountered numerous problems when developing the compo spray tool which extensively uses the raytest method.
        Let's hope the GSU staff hears us...

        DB

        1 Reply Last reply Reply Quote 0
        • TIGT Offline
          TIG Moderator
          last edited by

          A new method could be written... e.g. "model.raytest.visible"

          You'd start with a standard model.raytest...
          If it finds something to intersect it returns a point and the thing that it's found to intersect with as an array [if the thing is part of nested entities it's an array of the 'containers' of each in turn]
          Now we check what's returned is 'hidden' - we might have to go through the whole array to check if something is visible...
          If it's not hidden we return the point and the array.
          If it is hidden then we use the point we just got returned and our original vector to do another raytest to find the next intersecting thing etc... until an object is found that's NOT hidden... this point and it's array is returned as usual...

          .

          TIG

          1 Reply Last reply Reply Quote 0
          • T Offline
            tomasz
            last edited by

            You are right TIG. It is a workaround, but Imagine a high poly tree standing in a front of a house, although it is hidden the rays will have to dig through all leaves. It in not really 'a bug', but I was really surprised when I had a ground plane turned off and I couldn't reverse back faces of a building looking from below. I was sure that my script cannot be that 'smart' to recognise that I am looking at the interior of the building therefore it doesn't reverse back faces. I was shocked ๐Ÿ˜ฒ ๐Ÿ˜ฎ ๐Ÿ˜†

            Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              If the tree is put on it's own layer that's then switched off is that a fix ?

              TIG

              1 Reply Last reply Reply Quote 0
              • T Offline
                tomasz
                last edited by

                No it doesn't work. In a model above the face is not hidden. It is on a layer that is turned off.

                Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement