We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

drag textures on the model

Home Forums General Questions drag textures on the model

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #80460
    saranjivac
    Customer

    Hi. I want to create something like the sticker tool in this example: https://membersexperience-create.lacoste.com/gb/en/create/

    So need to be able to move the texture around the UV using mouse drag/touch controls.

    I have seen an example of this on the forum a few years back but can not find it anymore or anything similar to it done successfully. I have checked the available plugins as well and even bought one but it has some issues which I could not overcome.

    My main focus is to do it using puzzles but if someone has a working script that I could use, that’s welcome too.

    I am using Blender and the idea is to control the texture using the mapping node, I just need a way to connect the values connected to it with the mouse/touch drag.

    Can anyone point me in the right direction so I don’t stumble in the dark?

    • This topic was modified 1 month ago by saranjivac.
    #80463
    solid
    Customer
    #80464
    saranjivac
    Customer

    I know about that one, but you have to interact with the canvas instead of the 3D model. I also contacted them and asked if that’s something they plan to add in the future and it doesn’t look like it unfortunately.

    There is also one issue which I have run into with that and the other plugin that I bought. When you scale it down for the purpose that I need it for (logos), this happens. The actual logo occupies just a tiny piece of the canvas and gets terribly pixelated. Using larger resolution is not acceptable solution because it makes everything lag horridly.

    So what I am trying to do is have the initial texture occupy a smaller place on the UV and then 1k canvas is enough because it is tiny to start with in relation to the UV.

    • This reply was modified 1 month ago by saranjivac.
    • This reply was modified 1 month ago by saranjivac.
    Attachments:
    You must be logged in to view attached files.
    #80473
    saranjivac
    Customer

    I figured out how to move the entire texture that I previously centered and scaled where I wanted in Blender.

    Few lines of script and some multipliers to control the speed in relation to the pixel moved/screen resolution.

    Moving on to scale and rotation now but wanted to post my progress as I noticed people rarely post their solutions on these forums, which is a shame.

    • This reply was modified 4 weeks, 1 day ago by saranjivac.
    Attachments:
    You must be logged in to view attached files.
    #80485
    saranjivac
    Customer

    Another update: added scaling on both axis.

    The issue: scaling is done towards the 0,0 UV, in other words to the bottom left corner of the texture before it is scaled.

    The goal: to scale on the center of the texture after it is scaled.

    The solution: some clever use of math nodes (attached image).

    Don’t ask me to explain why that exact math. This was the video that prompted me in the right direction (but they could only scale and not adjust the location): https://www.youtube.com/watch?v=ddXGIilaFIc

    • This reply was modified 4 weeks, 1 day ago by saranjivac.
    • This reply was modified 4 weeks, 1 day ago by saranjivac.
    Attachments:
    You must be logged in to view attached files.
    #80554
    saranjivac
    Customer

    Final update (solution):

    Added in the rotation as well. You can download the group node that makes things easy here (for free/tip only): https://saranjivac.gumroad.com/l/advmapnode

    Or you can copy these nodes.

    Attachments:
    You must be logged in to view attached files.
    #80559

    Thank you for sharing your progress and solution! :good:

    Chief 3D Verger | LinkedIn | Twitter

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.