• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Re-apply texture / move UVs inside a component

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 776 Views 2 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.
  • E Offline
    esvux
    last edited by 12 Mar 2016, 18:28

    Hello all,

    this is the workflow in sketchup:

    Sample a surface with a projected texture (with eyedropper)
    Move a component across this surface
    Open component group and apply sampled texture
    All component instances texture updates to represent new projected position over surface

    I can only get as far as moving the component around in ruby but these are the 2 main approaches I have been trying to get the correct looking texture effect.

    (I sample the texture first using sketchup then ruby for following)

    move component a set amount up/down/left/right
    apply current material to faces of current component instance

    (I sample the texture first, then paint-bucket it inside the component then ruby for following)

    move component a set amount up/down/left/right
    re-position texture the same amount in the opposite direction

    The different approaches are falling down because of the need to work inside a component and even after all the reading up and thinking it is trivial, I think it would take me many more days to get my head around it. Being a novice any help and snippets are greatly appreciated.

    I have attached the images from my test model to illustrate.

    Thank you.


    proj1.JPG


    proj2.JPG


    proj3.JPG


    proj4.JPG

    1 Reply Last reply Reply Quote 0
    • J Offline
      JQL
      last edited by 13 Mar 2016, 11:21

      Components will always have the same texture applied the same way as they are copies of each other.

      www.casca.pt
      Visit us on facebook!

      1 Reply Last reply Reply Quote 0
      • E Offline
        esvux
        last edited by 13 Mar 2016, 22:07

        Thanks for looking JQL. I am exploiting that property. The problem lies in getting the texture (projected from somewhere else) to reapply / re-project onto the component after it has moved and thus showing where it has moved to on the paired component. This is easily achieved in sketchup as in the images attached. However it needs to be done when nudging the component around via ruby incrementally 1-10mm multiple times for example. It probably doesn't make a lot of sense why this would be necessary from the images posted, its for trying to align intricate patterns across multiple, joined components cut from different areas of stock materials and planning a cut-sheet.

        An analogy would be a cookie cutter, but you get a preview of your cookie somewhere else so you can see it in context. You can see if you're cutting from the right spot on the dough, if not you can nudge it around until happy. As happy as hardcore cookie designing can make you.

        1 Reply Last reply Reply Quote 0
        • E Offline
          esvux
          last edited by 19 Mar 2016, 22:25

          Here it is working by shoving texture opposite way. It breaks when doing any rotations, as the texture moves relative to component axis which is now rotated relative to red/green axis. There are manual workarounds, not very convenient though.

          The inbuilt sketchup eyedropper/bucket works perfectly because it ignores all that and just projects it on, just couldn't simulate it in ruby, so had to go the moving texture opposite direction to component.


          texturemapping.gif

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

          Advertisement