sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Question] Ray cast a png

    Scheduled Pinned Locked Moved Developers' Forum
    14 Posts 6 Posters 720 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.
    • CadFatherC Offline
      CadFather
      last edited by

      not sure this has been asked before - would the castray method work on a png?

      i know it doesn't work by casting shadows but i though if you could 'radar hit' a shape at the back of the image, you could perform a simple calculation of the profile, SU still seems to know about alpha channel...there could be a way to tell

      too early to be at work or possible?

      Untitled.png

      1 Reply Last reply Reply Quote 0
      • R Offline
        RickW
        last edited by

        Not sure I understand the question. What do you want to accomplish?

        RickW
        [www.smustard.com](http://www.smustard.com)

        1 Reply Last reply Reply Quote 0
        • CadFatherC Offline
          CadFather
          last edited by

          Hi Rick, after reading about Al Hart's tree generator i was thinking there could be a way to find out a rough profile of the transparent areas so the png can also be cut to simulate proper shadows (i mean without using external software)..

          of course this all proof of concept - i would not know where to begin with the code.

          1 Reply Last reply Reply Quote 0
          • R Offline
            RickW
            last edited by

            You mean similar to ImageProfile, just without the server-side processing?

            RickW
            [www.smustard.com](http://www.smustard.com)

            1 Reply Last reply Reply Quote 0
            • GaieusG Offline
              Gaieus
              last edited by

              @rickw said:

              You mean similar to ImageProfile, just without the server-side processing?

              I guess that's what he means although I'm not sure wether by creating the geometry (which IP currently does).

              Actually, the ultimate solution would be if the GSU Development could achieve that shadow casting also recognises alpha transparency.

              Gai...

              1 Reply Last reply Reply Quote 0
              • CadFatherC Offline
                CadFather
                last edited by

                yes, it would be great if we could find a rough profile and draw it without leaving su
                Al's great plugin only needs this..

                i never used IP before - perhaps it could be made to be a localised process?

                Gaieus, to get alpha shadows you need GSU 23.5 😉 😄

                1 Reply Last reply Reply Quote 0
                • GaieusG Offline
                  Gaieus
                  last edited by

                  @cadfather said:

                  i never used IP before - perhaps it could be made to be a localised process?

                  Well, it is a commercial script and paid per/tree (or any other component). The plugin on your computer only communicates (or whatever) with the server.

                  @unknownuser said:

                  Gaieus, to get alpha shadows you need GSU 23.5 😉 😄

                  🤣

                  I hope I can still se it - it would mean that I am the highlander as well though.

                  Gai...

                  1 Reply Last reply Reply Quote 0
                  • CadFatherC Offline
                    CadFather
                    last edited by

                    if the processing power could be localised i'd buy the script - very often i do not have internet access - with Al's instant tree form creation, profiling is a quick must..

                    to be honest Gaeius, the way some of you are able to post on this forum i'd say you were highlanders!

                    off to work.. may google sketchup opitimus maximus shine on you all with graceful inference 😄

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

                      Hi,
                      Workaround: load your image in PhotoShop or Gimp, make a vector mask with the alpha channel and import it back into SU (you'll get a face). Then texture the face with the image.
                      Not a very process, but it works.
                      Just a though,

                      DB

                      1 Reply Last reply Reply Quote 0
                      • CadFatherC Offline
                        CadFather
                        last edited by

                        sorry Didier not sure i understand.. do you mean to load it from the rightclick 'edit texture image'?

                        1 Reply Last reply Reply Quote 0
                        • AnssiA Offline
                          Anssi
                          last edited by

                          @didier bur said:

                          Hi,
                          Workaround: load your image in PhotoShop or Gimp, make a vector mask with the alpha channel and import it back into SU (you'll get a face). Then texture the face with the image.
                          Not a very process, but it works.
                          Just a though,

                          I don't think either can save the vector path in a format that SU can import - a great idea though. Alan Fraser is using it, I think, but by saving the path as a DWG via Illustrator.

                          Anssi

                          securi adversus homines, securi adversus deos rem difficillimam adsecuti sunt, ut illis ne voto quidem opus esset

                          1 Reply Last reply Reply Quote 0
                          • CadFatherC Offline
                            CadFather
                            last edited by

                            yes, that i know, ..for a minute i thought Didier meant we could do it without the ai-dwg process, which is still too un-sketchup..

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

                              @cadfather said:

                              would the castray method work on a png?

                              No it doesn't work. You can try it with FrontFace script. I won't reverse a face behind alpha textured face, even if the texture is at the position of a cursor transparent.

                              New item on a Ruby API wish list?

                              Tomasz

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

                              1 Reply Last reply Reply Quote 0
                              • CadFatherC Offline
                                CadFather
                                last edited by

                                so although you can see through the transparent area of the image, you cannot access any info or get behind the scenes on how that is achieved..

                                last conceptual gasps before giving up then..

                                1. can ruby recognize image colour? (i think i can answer my own question in the negative)

                                2. could a ruby trace a line stroke (something like Didier's 'strokefield generator' if you know what i mean?)

                                3. lastly, (big chance) could a ruby script recognise/import an ai/svg file?

                                PS already tried the svg plugin but it's buggy (crashes and for some reason it messes up sandbox tools)

                                (promise i give up after this) 😉

                                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