sketchucation logo sketchucation
    • Login
    ๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Textures on a dynamic component

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    13 Posts 6 Posters 3.9k 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.
    • M Offline
      meister-mischler
      last edited by

      I created a dynamic component, which calculates the volume of a "paper" box. The size of the unfolded piece of paper is set to 24 by 16 cm. Depending on the height of the box (that can be choosen in the dialogbox), you get a different volume.
      For educational purposes these functions are just great. ๐Ÿ˜

      The texture unfortunatly gets scaled when the box height is altered. Is there a way to avoid that or can somebody help with a workaround?

      Regards
      Kurt


      Schachtel.skp


      Schachtel.PNG

      1 Reply Last reply Reply Quote 0
      • brodieB Offline
        brodie
        last edited by

        I've run into the same issue and I don't believe there's a good fix for this. When you scale an object, the texture scales too and that's all there is to it. If your end goal is rendering some rendering software may be able to help you out, but nothing within SU itself.

        I'd like to see some sort of plugin fix for this perhaps that could go into all groups and reapply the materials to fix the stretching but I don't know of such a plugin

        -Brodie

        steelblue http://www.steelbluellc.com

        1 Reply Last reply Reply Quote 0
        • M Offline
          meister-mischler
          last edited by

          Hi Brodie

          @unknownuser said:

          If your end goal is rendering

          No, that's not my goal. The texture may help the students to understand, how wide, long and deep the box is. Each square is (should be) a square centimeter. ๐Ÿ˜‰

          Regards
          Kurt

          1 Reply Last reply Reply Quote 0
          • brodieB Offline
            brodie
            last edited by

            In that case you may be able to accomplish your goal with geometry rather than textures. Instead of a 1cm x 1cm texture maybe you could use 1cm x 1cm components. You could fix their scale in the DC options to 1cm x 1cm and then have add a COPY option to the component so that when you scale the overall object to, say, 50cm long, it creates 50 of those 1cm components. The only drawback would be that you'd have to limit the scaling options to 1cm increments. Does that make sense?

            -Brodie

            steelblue http://www.steelbluellc.com

            1 Reply Last reply Reply Quote 0
            • M Offline
              meister-mischler
              last edited by

              @unknownuser said:

              Does that make sense?

              Definitly! But as I am a bloody beginner with DC I have gone the way I could handle. ๐Ÿ˜‰ Changing this to geometry is perhaps a challenge when I have got more experience. By now I have no idea how to start.

              Kurt

              1 Reply Last reply Reply Quote 0
              • brodieB Offline
                brodie
                last edited by

                I'd start by downloading something like a fence DC which copies the fence posts as you scale the fence up. That'll show you how to fix the size of the fence posts and how to determine how far apart the posts are from each other. You should be able to then translate that into what you're doing where the 'fence posts' are 1cmx1cm squares and the number of copies is the total length divided by 1cm minus 1.

                So if the total length is 10 cm the equation would be calculated 10/1 - 1 = 9 giving you your 1 original square and 9 copies.

                -Brodie

                steelblue http://www.steelbluellc.com

                1 Reply Last reply Reply Quote 0
                • M Offline
                  meister-mischler
                  last edited by

                  I will try and do my very best. ๐Ÿ˜‰

                  1 Reply Last reply Reply Quote 0
                  • DareDevilD Offline
                    DareDevil
                    last edited by

                    Perhaps something like that :

                    Box.jpg
                    Box.skp
                    The 1cmร—1cm square don't exit, it's only lines on the box faces, so you can't texture them like a checker.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      meister-mischler
                      last edited by

                      It looks good! ๐Ÿ˜„

                      @unknownuser said:

                      texture them like a checker

                      It is not a must. I'am fine with your solution.

                      When I choose "LenZ = 1cm" the copies are not shown. I will figure it out when i going to spend more time to DC. ๐Ÿ˜‰

                      General question: Are DC often used or is that something for Geeks?

                      Regards
                      Kurt

                      1 Reply Last reply Reply Quote 0
                      • DareDevilD Offline
                        DareDevil
                        last edited by

                        @meister-mischler said:

                        It looks good! ๐Ÿ˜„
                        When I choose "LenZ = 1cm" the copies are not shown. I will figure it out when i going to spend more time to DC. ๐Ÿ˜‰

                        Mmmm..... ๐Ÿ˜• I experienced the same error...
                        I think is because SU work in inch, and when I ask values in cm, the real value pass to sub object in inch and re-translate in cm. So, when you enter "1" is probably translate and re-translate to "0.99999999" and the integer is "0".
                        I only think of that error ๐Ÿ˜•
                        I will look for a solution...

                        @unknownuser said:

                        General question: Are DC often used or is that something for Geeks?

                        DCs are very often used by very few rare geeks ๐Ÿ˜„ ๐Ÿ˜„

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          matt.gordon320
                          last edited by

                          I've come across the same issue with the textures in DC's, and I think that's the primary reason I haven't bothered to learn them in depth, despite their usefulness. I'm just brainstorming here, but does anyone (especially the code gurus out there) think there would be any way to add a function/script that would reset or normalize the DC's UVQ coordinates when ever you hit "Apply" to make changes? I'm not experienced with Ruby yet to know if that's nonsense or not ๐Ÿ˜„

                          1 Reply Last reply Reply Quote 0
                          • L Offline
                            LEGOsketcher
                            last edited by

                            Hi,

                            any news on the texture scaling problem? I'm trying to create a DC that is only scalable on the x-axis and that does not stretch the texture, rather repeats it like if I moved the end by hand in a normal operation inside the component...

                            Would the only alternative be to break the inside up into smaller pieces that repeat? (a la "DC fence")

                            Pointers appreciated, cheers LEGOsketcher


                            Illuminated shelf strip.skp

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              goga63
                              last edited by

                              this is the idea of TIG
                              http://sketchucation.com/forums/viewtopic.php?t=49564#p525146
                              video how it works (sorry, in Russian)
                              http://www.youtube.com/watch?v=TWGGfoR5slI

                              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