sketchucation logo sketchucation
    • Login
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Removing unrendered objects

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    15 Posts 6 Posters 844 Views 6 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.
    • A Offline
      agamemnus
      last edited by

      Another question came to mind as I was thinking of using the nXtRender engine for something that took regular Sketchup about two minutes on my machine...

      Is there any way to remove non-rendered objects (or planes, or lines...) based on a scene? (with/without shadows?)

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

        By 'remove' do you mean delete or ignore/move onto an 'off' layer etc ?

        It's relatively easy with Ruby... This line pasted into the Ruby Console will erase all active faces without a material [and you can also look for edges/groups/instances too if required - a or e.class== ::Edge or`` ::Group or`` ::ComponentInstance... You need to test for edges having a face with a material as you loose the face if an edge goes, etc so the face [or group] is the simplest to automate...

        
        Sketchup.active_model.active_entities.to_a.each{|e|if(e.valid? and e.class==Sketchup;;Face)and not e.material;e.erase!;end}
        
        

        The e.valid? test is put in to avoid a crash if say an edge is erase! before one of its faces, because then you can't e.erase! it since it's already gone !
        Instead of erase! you could make a layer, turn it 'off' and move everything onto it [ e.layer=mylayer] ?

        TIG

        1 Reply Last reply Reply Quote 0
        • A Offline
          agamemnus
          last edited by

          It doesn't work.

          So again... I want to remove (not hide) anything that is NOT rendered in my view screen. The script you posted doesn't seem to do that.

          1 Reply Last reply Reply Quote 0
          • E Offline
            Ecuadorian
            last edited by

            Do you mean that there's something you want to see in the SketchUp window but not in the rendered image, without having to hide an object?

            I don't really understand what you want. Could you please post a more graphic explanation, even if it's just scribbled in MS Paint? I'm guessing perhaps you could use layers for this, or perhaps even Martin Rinehart's vismap script.

            -Miguel Lescano
            Subscribe to my house plans YouTube channel! (30K+ subs)

            1 Reply Last reply Reply Quote 0
            • A Offline
              agamemnus
              last edited by

              @ecuadorian said:

              Do you mean that there's something you want to see in the SketchUp window but not in the rendered image, without having to hide an object?

              No.... It seems that when I am using the nXtRender thingo, it will process the whole model and then render the viewport (VERY SLOW!). I want to get rid of (delete) any pieces that don't show up in the viewport, so it (nXt) does not try to process them!

              1 Reply Last reply Reply Quote 0
              • X Offline
                xrok1
                last edited by

                i think you mean off screen right? the things the camera can't see?
                if so i'm not sure you can do that succesfully because everything in the scene effects the light rays bouncing around. imagine a white wall close to your object but off screen it will add alot of light to your scene but if its gone; not included in the render; your render will look totally different.

                “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                http://www.Twilightrender.com try it!

                1 Reply Last reply Reply Quote 0
                • A Offline
                  agamemnus
                  last edited by

                  @xrok1 said:

                  i think you mean off screen right? the things the camera can't see?
                  if so i'm not sure you can do that succesfully because everything in the scene effects the light rays bouncing around. imagine a white wall close to your object but off screen it will add alot of light to your scene but if its gone; not included in the render; your render will look totally different.

                  Actually I don't even have shadows enabled ...

                  1 Reply Last reply Reply Quote 0
                  • E Offline
                    Ecuadorian
                    last edited by

                    Care to post a screenshot of the model?
                    Perhaps you're trying to render a model of Manhattan and expect it to render as fast as a simple Big Apple... 😉

                    -Miguel Lescano
                    Subscribe to my house plans YouTube channel! (30K+ subs)

                    1 Reply Last reply Reply Quote 0
                    • Al HartA Offline
                      Al Hart
                      last edited by

                      @agamemnus said:

                      Another question came to mind as I was thinking of using the nXtRender engine for something that took regular Sketchup about two minutes on my machine...

                      Is there any way to remove non-rendered objects (or planes, or lines...) based on a scene? (with/without shadows?)

                      You can select everything you can see in the current view, use cut to remove it and send it to the clipboard, then use select all to select everything which is left, and the hit delete.

                      Then paste the original geometry back into the drawing.

                      Al Hart

                      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                      IRender nXt from Render Plus

                      1 Reply Last reply Reply Quote 0
                      • X Offline
                        xrok1
                        last edited by

                        you really do need an illustration of what your doing, everyone is playing a guessing game with you. 😕
                        unless you meant to post this on the puns & puzzles thread? 😆

                        “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                        http://www.Twilightrender.com try it!

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          agamemnus
                          last edited by

                          Al, that will also select things I can't see. It will also select pieces in complete groups that I can't see.

                          xrok1.. I dunno, just imagine a model, any model. Imagine I am looking at the model from some angle, any angle. Imagine I don't see the entire model because I'm looking at a closeup. I want to remove the parts of the model that I don't see.

                          1 Reply Last reply Reply Quote 0
                          • mitcorbM Offline
                            mitcorb
                            last edited by

                            call zorro

                            I take the slow, deliberate approach in my aimless wandering.

                            1 Reply Last reply Reply Quote 0
                            • Al HartA Offline
                              Al Hart
                              last edited by

                              You can place 4 to 6 section planes in the drawing, and then use the "cut drawing to section plane" ruby to cut out the unwanted geometry.

                              However, the best plan is probably to use layers to make it easier to turn on and off geometry which will not be visible.

                              We have considered a rendering function to only extract visible geometry. But that gets tricky because some off-screen geometry may effect reflections, shadows, and reflected light calculations.

                              Al Hart

                              http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                              IRender nXt from Render Plus

                              1 Reply Last reply Reply Quote 0
                              • E Offline
                                Ecuadorian
                                last edited by

                                Agamemnus, I hope you're not filling your models with double-curvature stuff such as moldings on round columns. The polygon count goes pretty high with such objects. Also be extra careful with components downloaded from the 3D warehouse, as they often have tiny things with lots of polygons. Switch to wireframe view to spot the most polygon-heavy parts, and clean them up.

                                -Miguel Lescano
                                Subscribe to my house plans YouTube channel! (30K+ subs)

                                1 Reply Last reply Reply Quote 0
                                • X Offline
                                  xrok1
                                  last edited by

                                  i'll let you alone with this, but i have a feeling if you ever accomplish what your attempting you'll discover it doesn't accomplish what you thought it would. 😕

                                  good luck, it is an interesting challenge if nothing else and some good may come from it. 😄

                                  “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                                  http://www.Twilightrender.com try it!

                                  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