Anaglyph - 3D effect (not real 3D)

Moderator: Kathy_9

Post Reply
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Anaglyph - 3D effect (not real 3D)

Post by LeviFiction »

So, i was asked back in 2015 if I knew of a good procedure to create an anaglyph (Red/Cyan 3D) effect similar to the one in this tutorial: http://www.howtogeek.com/69368/how-to-m ... any-image/

So I made this script, but then I saw Corel is selling a new Anaglyph script for $10. Couldn't let that stand, so while I know nothing of how they've done their effect. I've decided to update this script with some more options and to do the effect slightly differently.

When you run the script it asks you for the color combo you want to use (red/cyan, green/magenta, blue/yellow), and then asks for the shift value (changes based on the size of your image) and then does all of the hard work for you. The result is a new layer with the effect applied, you can use this on any layer in your image, or on the image as a whole. This allows you to follow the tutorial listed above and give different shift values to the foreground and background.

Here's the link to the script on my Google Drive:
https://drive.google.com/file/d/0B8FlFLNbvRNecmdkMzVhWlZReEk/view?usp=sharing

Example:
Simba-edit.jpg
Last edited by LeviFiction on Sat Jul 15, 2023 6:45 pm, edited 2 times in total.
https://levifiction.wordpress.com/
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Anaglyph - Red/Cyan 3D effect

Post by JoeB »

Interesting. I downloaded the script but will wait until I have some 3D glasses to test it. :-)
Regards,

JoeB
Using PSP 2019 64bit
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Anaglyph - Red/Cyan 3D effect

Post by LeviFiction »

I kept my glasses from when I was a child. At best it creates a slight parallax effect but not much else. xD
https://levifiction.wordpress.com/
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Anaglyph - Red/Cyan 3D effect

Post by JoeB »

LeviFiction wrote:I kept my glasses from when I was a child. At best it creates a slight parallax effect but not much else. xD
Then I don't think I'll be rushing out to get a pair anytime soon. :-)
Regards,

JoeB
Using PSP 2019 64bit
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Anaglyph - 3D effect (not real 3D)

Post by LeviFiction »

I've updated the script above. This was more or less in direct response to seeing Corel's Anaglyph script being sold for $10 by offering a cheaper alternative (free). I've improved the script in the following ways:
1) You can now choose from multiple color combinations)
2) The Shift value is calculated from the size of your image (roughly 20 pixels per 1000 pixels wide)
3) The effect is all done in image, no more splitting and combining images.
4) You can now perform the effect on an individual layer, or on the entire merged document if you have multiple layers.
5) Just like before, the result is a new layer so it's non-destructive.
https://levifiction.wordpress.com/
Radim
Posts: 712
Joined: Mon Nov 01, 2010 5:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 4GB
Monitor/Display Make & Model: 27 inch

Re: Anaglyph - 3D effect (not real 3D)

Post by Radim »

I compared those two scripts.
But I lost my glasses.. so can't say difference.

https://www.upload.ee/files/15559688/co ... n.zip.html
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Anaglyph - 3D effect (not real 3D)

Post by LeviFiction »

As noted with JoeB perviously, since you're using a flat image, you can't actually create a 3D effect (not without something to invent data that doesn't exist anyway). So 3D glasses won't do much, though occasionally you can get a neat parallax effect, making it look like a cardboard cut-out. But the main point of this effect is the final look, not it's usefulness for 3D.

Thank you for posting the comparisons, this shows that my script and the official one are essentially doing the exact same thing. The biggest differences I can see are: 1) I'm merging the result, 2) I'm using the 'Screen' blend mode and they're using 'Lighten', 3) They also crop the the image after moving the layer to get rid of that hideous sidebar that's created. I leave that to the user to do.

When I get home I'll add the option to turn off merging the resulting group. That way people can play with the result and to get something they like better.
https://levifiction.wordpress.com/
Post Reply