RefWarp addon

Next
 From:  krass
12097.1 
Dear friends!
I missed this functionality so much in MOI3D... I couldn't resist writing this addon myself (forgive me, Mike!!) – with AI, of course! )))
I submit it for your judgment and criticism.

In a nutshell, it's an add-on to the standard "Image" mechanics that allows you to modify a reference image according to geometry.
You can watch a video of the process here: https://youtu.be/o2xeNbtIfTA?si=rCAc2DcuCPD1l0B5

The script itself is attached in the archive; criticism is welcome.
If anyone can improve this script, I'd be delighted.

So, welcome!

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.2 
you are lucky to success with ai!

I had no success with this paticular problem!
"Select rectangles automatically on the screen"! :)
https://moi3d.com/forum/index.php?webtag=MOI&msg=9689.124

Michael wins the match! ;)

About your script... I have that !
it's the same ? Curves Order

---
Pilou
Is beautiful that please without concept!
My Moi French Site
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  krass
12097.3 In reply to 12097.2 
Hi, Pilou!
I'm afraid I'll disappoint you, but my script was written overnight last night in collaboration with Claude.
It didn't work out exactly as I wanted, but it seems to be working as expected.
Which script of yours are you referring to? Please clarify – unfortunately, I'm not familiar with it.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zooen
12097.4 In reply to 12097.1 
Hi Krass,
I’m going to try out your script. I often work with background images.

Often, the images I use, even those with very high resolution, aren’t scaled correctly in the X and Y axes, which is a real problem for me.

EDITED: 1 Sep by ZOOEN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zooen
12097.5 In reply to 12097.1 
Hi again, Krass,

I’ve got Python 3.13.15 as an executable, so that’s easy.
As for numPy and pillow, they’re .zip files – I know that, but how do I run them or use them with Python?

Best regards

- Zooen

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.6 In reply to 12097.3 
Ok all is normal ! I made a false confusing process with folders ! :)

About your script.
It's not like for an image say : 1024 * 716 pixel so 36.12 x 25.56 cm

Draw a rectangle 32.12 x 25.56 cm

With this rectangle and the Edit Frame give it any homothetic measures wanted! Make any adjustments...

Then Menu View / Image / Add in this new rectangle with 2 clicks:)

But maybe I I didn't understand everything of your plugin!

EDITED: 1 Sep by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zooen
12097.7 In reply to 12097.6 
Hi,
Pilou, have you watched the video on YouTube ?
Have you read Krass’s post and the instructions for installing the plugin properly ?

- Zooen

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.8 
Seems i must arrive to the same result than the video with my process without plugin ! :)
Draw a rectangle of the proportions of the originale image...
Then Orient Line Line must make the trick ;)
Say we know here the leader size... on the blue axis...
You can repeat the process with Stretch enable on other axes if needing!

EDITED: 1 Sep by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  krass
12097.9 
Hello everyone! I really hope Google Translate gets my point across without distorting it too much. So, I'll try to explain again what the addon does.

With it, you can transform a distorted reference image into a more or less correct one.
Yes, something similar can be done in Photoshop. But Photoshop doesn't allow you to set precise dimensions and references.

In the attached images, I've tried to demonstrate the principle of how you can modify an image.

Naturally, I assume that you should know at least some of the parameters—for example, the width or height of an object. You draw a rectangle in MOI3D (for example) and then "pin" the image to the places where it "should be."
Click on the image—click on the corner of the geometry; click on the image—click on the corner.
Placed... Then click Update—the image will be positioned at the designated corners. But your middle section is curved, which should be vertically straight.

Great – click on the points that shouldn't change with the control (they'll turn blue) – they'll "freeze."
And then point to the curved line where it should be vertical – that part of the image will move in the desired direction. Basically, it's like a mix of Distort and Warp in Photoshop.
Image Attachments:
Size: 38.5 KB, Downloaded: 6 times, Dimensions: 734x831px
Size: 19.7 KB, Downloaded: 3 times, Dimensions: 1155x666px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.10 
Yep you right no defomation even Maintain proportion disabled in the Edit Frame Menu Image! :(
Only rotation...


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  krass
12097.11 In reply to 12097.10 
Hi, Frenchy Pilou!
I have a question: were you able to install the addon?
(All files from the archive are placed in the Commands directory, and then you can assign a hotkey as usual, just like any other script.)
If so, were you able to try it out?
What difficulties, if any, did you encounter? Thank you!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.12 In reply to 12097.11 
I will install your plugin :)
I believe that now understand! :)

But no Python 3 installed so... :)

EDITED: 1 Sep by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  krass
12097.13 In reply to 12097.12 
Between you and me, I don't know anything about Python and Boa constrictors.
But I asked my AI Claude, and he told me step-by-step what to do to install Python: literally, a couple of console commands.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zooen
12097.14 
Hi Krass and Pilou,

For Python, it’s the executable file that needs to be downloaded. However, installing NumPy and Pillow seems a bit less straightforward to me.

EDITED: 2 Sep 0:35 by ZOOEN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.15 
Yep same for me and not more many free place on my little computer! :)

And Michael confirms that the Edit Frame of the Menu Image will stay in state and will be not transformed!
Better to use a specific Image prog except for a "Style excercie"! (inside Moi! ;)

A process without plugin can be also
Vectorize the image, import it to Moi then use Flow function! ;)
---
Pilou
Is beautiful that please without concept!
My Moi French Site
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zooen
12097.16 
Hi everyone,

Well, I’ve found the best solution for me: I’ve installed GIMP (free and open-source software).
GIMP has transformation tools (13 in total), including the ‘Handle’ tool. Using this tool, I was able to correct the X and Y misalignment in my image, then reshape it into a square (based on the outlines of the objects within my image), and do so with great precision.

I have twenty images that I want to work on. I’m relieved to have found a solution.

I hope my English translation makes sense!

- Zooen

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
12097.17 
...or the free Online Photopea so no need install and no place used! ;)
https://www.photopea.com/
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zooen
12097.18 In reply to 12097.17 
...

- Zooen

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  blowlamp
12097.19 
This looks useful to me, but I'm getting this error message:




I loaded Python, Numpy and Pillow, but I don't know how to get around the error.
Any help would be appreciated.
Thank you.

Martin.

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All