It is currently 19 May 2022, 02:33
| ||||
| ||||
|
|

Magic-Eye Plug-in

- tim
-
1st Place
- 5822 Post(s)
- View:
|Posts
- Topic Posts: 0/15 | Posts: 5822
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 86,484.96 GLP
- Bank: 5,956,482,061.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3357
- x 1369
- Contact:
Magic-Eye Plug-in
This is for creating stereograph/cross-eye images from an existing texture.
Spawned from https://www.gimp-forum.net/Thread-sterograph which asked for a GIMP 2.10 version.
There is a link above post to some c-code magic-eye that generates it so what I did was translated it to a python plug-in.
Options are pretty much the same.
Here it is: Plug-in Menu Location: Python-Fu/AAA Magic Eye...
Instructions:
0. have 2 images (gray-scale image and texture image) of same height.
1. Open a gray-scale (height-map) image.
2. Open an image to use as texture for the stereo image.
3. On the gray-scale, run plug-in. Select texture for texture image, choose stripe-width (the width of texture to repeat horizontally) default of 80 seems to work great. choose depth 15 seems to work great too for me...that's it and then select From Left/Middle and select Cross-Eye(YES) or Stereo(NO). Hit OK to run.
4. That's it..wait and let it finish, you'll see progress bar moving.
5. Enjoy.
Spawned from https://www.gimp-forum.net/Thread-sterograph which asked for a GIMP 2.10 version.
There is a link above post to some c-code magic-eye that generates it so what I did was translated it to a python plug-in.
Options are pretty much the same.
Here it is: Plug-in Menu Location: Python-Fu/AAA Magic Eye...
Instructions:
0. have 2 images (gray-scale image and texture image) of same height.
1. Open a gray-scale (height-map) image.
2. Open an image to use as texture for the stereo image.
3. On the gray-scale, run plug-in. Select texture for texture image, choose stripe-width (the width of texture to repeat horizontally) default of 80 seems to work great. choose depth 15 seems to work great too for me...that's it and then select From Left/Middle and select Cross-Eye(YES) or Stereo(NO). Hit OK to run.
4. That's it..wait and let it finish, you'll see progress bar moving.
5. Enjoy.
-
Krikor
-
14th Place
- 1015 Post(s)
Tim,
Will any gray-scale image do?
Is it enough to convert to gray-scale?
What does the "From Left-Middle (yes/no)" function do?
Unfortunately the plugin did not work on my win10 Gimp 2.10.21 Samj's Portable. Traceback (most recent call last):
File "C:\Users\...\Gimp-2.10.21_Portable-32-64bit-Win\lib\gimp\2.0\python/gimpfu.py", line 741, in response
dialog.res = run_script(params)
File "C:\Users\...\Gimp-2.10.21_Portable-32-64bit-Win\lib\gimp\2.0\python/gimpfu.py", line 362, in run_script
return apply(function, params)
File "C:\Users\...\magic-eye.py", line 118, in python_tt_magic_eye
hoehe = hoehe_pixel[0] * depth / 255;
IndexError: array index out of range
Will any gray-scale image do?
Is it enough to convert to gray-scale?
What does the "From Left-Middle (yes/no)" function do?
Unfortunately the plugin did not work on my win10 Gimp 2.10.21 Samj's Portable. Traceback (most recent call last):
File "C:\Users\...\Gimp-2.10.21_Portable-32-64bit-Win\lib\gimp\2.0\python/gimpfu.py", line 741, in response
dialog.res = run_script(params)
File "C:\Users\...\Gimp-2.10.21_Portable-32-64bit-Win\lib\gimp\2.0\python/gimpfu.py", line 362, in run_script
return apply(function, params)
File "C:\Users\...\magic-eye.py", line 118, in python_tt_magic_eye
hoehe = hoehe_pixel[0] * depth / 255;
IndexError: array index out of range
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston
- tim
-
1st Place
- 5822 Post(s)
- View:
|Posts
- Topic Posts: 0/15 | Posts: 5822
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 86,484.96 GLP
- Bank: 5,956,482,061.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3357
- x 1369
- Contact:
Try Gray Scale Image but in RGB mode but make sure the Gray Scale Image and the Texture Image are of the same height.
According to the code I translated, if you choose from Left (YES) the it maps from the left hand side, and if you chose NO then it maps from the middle and maps to the left then from middle to the right. I think it might have to do with perspective.
Your error shown looks like it's failing to pick up pixel value at index [0] so I think it might bugging out because of the fact the image is not in RGB mode I don't think it's GIMP version related.
According to the code I translated, if you choose from Left (YES) the it maps from the left hand side, and if you chose NO then it maps from the middle and maps to the left then from middle to the right. I think it might have to do with perspective.
Your error shown looks like it's failing to pick up pixel value at index [0] so I think it might bugging out because of the fact the image is not in RGB mode I don't think it's GIMP version related.
-
Krikor
-
14th Place
- 1015 Post(s)
Okay, now it worked.tim wrote: ↑25 May 2021, 19:34Try Gray Scale Image but in RGB mode but make sure the Gray Scale Image and the Texture Image are of the same height.
According to the code I translated, if you choose from Left (YES) the it maps from the left hand side, and if you chose NO then it maps from the middle and maps to the left then from middle to the right. I think it might have to do with perspective.
Your error shown looks like it's failing to pick up pixel value at index [0] so I think it might bugging out because of the fact the image is not in RGB mode I don't think it's GIMP version related.
I was using the gray-scale image in gray-scale mode and not in RGB mode.
Now that I know that the plugin runs, I need to know if it actually allows me to view the omitted image.
Thanks Tim!
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston
- tim
-
1st Place
- 5822 Post(s)
- View:
|Posts
- Topic Posts: 0/15 | Posts: 5822
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 86,484.96 GLP
- Bank: 5,956,482,061.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3357
- x 1369
- Contact:
-
Krikor
-
14th Place
- 1015 Post(s)
omitted image = the gray-scale image hidden by the texture image.
The reverse view.
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston
- tim
-
1st Place
- 5822 Post(s)
- View:
|Posts
- Topic Posts: 0/15 | Posts: 5822
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 86,484.96 GLP
- Bank: 5,956,482,061.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3357
- x 1369
- Contact:
Ah you mean the effect...gotcha.
- tim
-
1st Place
- 5822 Post(s)
- View:
|Posts
- Topic Posts: 0/15 | Posts: 5822
- Joined: 26 Sep 2016, 00:16
- Cash on hand: 86,484.96 GLP
- Bank: 5,956,482,061.00 GLP
- Gender: Guy
- Location: Canada
- GIMP Version: 2.10.X
- Paint Blotches blog
- Play them songs blog
- Personal Blog
- x 3357
- x 1369
- Contact:
It's meant to be viewed as stereo image where the viewer must focus beyond the screen.
When I view it using cross-eye method (It's not a true cross-eye) just slightly cross them like focus closer like if you're looking at the space above the screen (in front of screen instead of the behind the screen)...
I have an easier time viewing the cross-eye (slightly cross-eye).. as I am unable to focus behind the screen.
When I view it using cross-eye method (It's not a true cross-eye) just slightly cross them like focus closer like if you're looking at the space above the screen (in front of screen instead of the behind the screen)...
I have an easier time viewing the cross-eye (slightly cross-eye).. as I am unable to focus behind the screen.
-
Krikor
-
14th Place
- 1015 Post(s)
Until today only one image I could visualize. One posted by Nidhogg on GC.
I just reviewed the image there and again was able to see the effect very quickly.
But this one in the post and the one I tried to create... nothing yet.
I just reviewed the image there and again was able to see the effect very quickly.
But this one in the post and the one I tried to create... nothing yet.
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston
-
Krikor
-
14th Place
- 1015 Post(s)
Tim, I did it!
The plugin really works as expected!
After creating a lagoon of tears, I was successful in viewing two images created by the plugin.
There must be a way to create a better contrast image (height-map). I will check it out.
Thanks Tim!
The plugin really works as expected!
After creating a lagoon of tears, I was successful in viewing two images created by the plugin.

There must be a way to create a better contrast image (height-map). I will check it out.
Thanks Tim!
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston
| ||||
| ||||
|
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Krikor Color Cast Reduction plug-in
by tim » 30 Jun 2021, 19:14 » in GIMP Python Fu Scripts/Plug-ins - 2 Replies
- 1627 Views
-
Last post by Pat625
01 Jul 2021, 00:05
-
-
-
Create Squares & Match Squares Plug-in
by tim » 07 Jul 2021, 09:27 » in GIMP Python Fu Scripts/Plug-ins - 3 Replies
- 1936 Views
-
Last post by tim
07 Jul 2021, 22:03
-
-
- 0 Replies
- 1467 Views
-
Last post by tim
22 Jul 2021, 18:42
-
-
Updated Luminosity & Saturation mask plug-ins
by david » 14 Sep 2021, 16:01 » in GIMP Python Fu Scripts/Plug-ins - 7 Replies
- 2161 Views
-
Last post by david
07 Nov 2021, 10:29
-
-
- 2 Replies
- 931 Views
-
Last post by david
17 Sep 2021, 09:46
-
- 6 Replies
- 1569 Views
-
Last post by david
17 Oct 2021, 13:40
-
-
High, Medium, & Low Saturation Area Plug-in
by david » 26 Oct 2021, 10:46 » in GIMP Python Fu Scripts/Plug-ins - 10 Replies
- 1113 Views
-
Last post by david
04 Nov 2021, 10:58
-
Who is online
Users browsing this forum: No registered users and 20 guests