Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stereoscopic Geometry Windows
11-09-2012, 04:48 AM (This post was last modified: 06-18-2017 05:05 AM by oort.)
Post: #1
Stereoscopic Geometry Windows
This is a modification of freynz's patch (Link to subject in old forum) to add Stereoscopic Geometry Windows. It works with Wings3d 1.4.1 only at this time. In the future I may try to convert this into a plug-in.

The files are available on my Wings3d page... Stereoscopic Hack

Edit: If you want to play with the Stereoscopic Hack, you will need to rename your current preferences.txt file so that a new file will be created. You can also try adding the following two lines to the beginning of your preferences.txt file:


To open Stereoscopic Geometry Windows go to... Window > Stereoscopic Geometry Windows. If you exit Wings3D, you will have to close existing Stereoscopic Geometry Windows and open them again. If you do not do this, movement in the windows is not synchronized.

You will first have to render the left and right images separately. Next use Anaglyph Maker to combine the two images. Then use Red/Cyan 3D glasses to view the image created by Anaglyph Maker.

Anaglyph Maker is available at the following site... Anaglyph Maker

Edit: You can also use StereoPhoto Maker, which is available at the following site...
StereoPhoto Maker

Some people are able to cross their eyes in just the right way to avoid having to use Anaglyph Maker and 3D glasses...

For some history of my work on this, see the following thread in the old forum... My Anaglyph hacking

Here are some more recent images I have created... 3D Anaglyphs

02-18-2017, 05:11 PM
Post: #2
RE: Stereoscopic Geometry Windows
I edited my first post in order to add information regarding an issue with two lines that need to be present at the top of your preferences.txt file.

03-03-2017, 04:24 PM (This post was last modified: 07-16-2017 12:24 AM by micheus.)
Post: #3
RE: Stereoscopic Geometry Windows
An off topic...
When checking your old posts at the old forum I saw that Hobbit anaglyph you found and I played with it by converting it (by hand) to a crossed-eyes image - with improvements. Smile

* use the full size image and keep your eyes around 50cm (1.6ft)

My Wings3D Collection at G+
03-04-2017, 03:13 AM (This post was last modified: 03-04-2017 04:14 AM by oort.)
Post: #4
RE: Stereoscopic Geometry Windows
I consider your post on topic... Smile

I will have to see if I can get my eyes to work correctly to see what you improved. Will try it later when I have more time...

I took the easy way out and used StereoPhoto Maker to convert your image...
File > Open Stereo Image > Specify "Side-by-Side" in the "Stereo Format" section > Choose the image. Swap Left and Right images > Convert to Anaglyph image. You may want to use Auto Alignment on the image.

The image does look better after your improvements... Smile

03-04-2017, 05:17 AM
Post: #5
RE: Stereoscopic Geometry Windows
(03-04-2017 03:13 AM)oort Wrote:  The image does look better after your improvements... Smile
After extract the cyan and red images (in grayscale), I balanced the contrast to make both get similar colors, then I added layers: one to balance the sharpness, one I painted and a emboss one to increase the 3d effect. Smile

My Wings3D Collection at G+
03-26-2017, 05:23 AM
Post: #6
RE: Stereoscopic Geometry Windows
I am still struggling with getting this converted to a plugin. I do get the two geometry windows to appear and I can zoom and pan in each window without any problems but the two window views do not update as a pair. They are just two separate windows. I think it is because, in the patch, the View command is modified to check for a stereo pair. That way if there is another window linked to the current window they both update together.

I am hoping there is some code I can add to the plugin that will do this some how. Right now I have a function that checks for these things but I don't think it is getting executed. Maybe all I need to do is add a "View check or reset" command at the end of the code that creates the two windows??? See code below... But it has to happen every time the camera moves so there must be more I need to do.

Any ideas on how to fix this?


Quote:new_viewer_stereo(St) ->
{Pos,{W,H}} = wings_wm:win_rect(desktop),
Size = {W div 2-40,H div 2-40},
N = free_viewer_num(2),
Active = this(),
Props = get_props(Active),
ToolbarHidden = wings_wm:is_hidden({toolbar,Active}),
Name = {geom,N},
io:format("First export Name(1)GEOM 2 is ~w\n",[Name]),
new_viewer(Name, Pos, Size, Props, ToolbarHidden, St),
% second window
N2 = free_viewer_num(2),
Name2 = {geom,N2},
io:format("First export Name2 GEOM 3 is ~w\n",[Name2]),
{X2,Y2} = Pos,
new_viewer(Name2, {X2+element(1,Size),Y2}, Size, Props, ToolbarHidden, St),
% now link
03-27-2017, 05:13 AM
Post: #7
RE: Stereoscopic Geometry Windows
By adding the patch code, from the wings_view.erl section, to the wings_view.erl module I am able to get the plugin to work. Now I just have to find out how to get the code to work in the stereoscopic.erl file, instead of modifying the wings_view.erl file.

Hopefully it is possible to do...

06-17-2017, 03:30 PM (This post was last modified: 06-22-2017 01:26 AM by oort.)
Post: #8
RE: Stereoscopic Geometry Windows
I haven't worked on getting the plugin to work without having to modify the wings_view.erl file. Instead, I have been working on adding a dialog box for choosing between cross-eyed mode and regular mode.

It took me a very very long time but I finally got it working today. I hope to post the files sometime this weekend. It will only work with Wings 1.4.1 at this time and I need to remove lots of code that is not needed. When I post the files it will be necessary to replace your wings.beam and wings_view.beam files in addition to adding the stereoscopic.beam file. More details later.

Yes, I hope to make it work with the newest version of Wings3D before I am finished.

I decided to go ahead and post the files. Click the link below to download the zip file. You will need to copy the wings.beam and wings_view.beam files to the "wings3d_1.4.1/lib/wings-1.4.1/ebin" folder. Be sure to backup your original files. Put the stereoscopic.beam file in the "wings3d_1.4.1/lib/wings-1.4.1/plugins/commands" folder. The .erl files are not needed. The .erl files are the source files. The beam files will only work with Wings 1.4.1.

The "Stereoscopic Windows" command is under the Windows pull down menu. The default setting is cross-eyed mode. I hope someone can test cross-eyed mode since I have never been able to get my eyes to work for that... Smile

Stereoscopic Windows Plugin files

Again, the files will only work with Wings 1.4.1.

Edit: No changes... just removed code that is not needed. The zip file has been updated.

06-26-2017, 07:26 PM
Post: #9
RE: Stereoscopic Geometry Windows
I tested it.
When running the command from the window menu, two geometry windows opened.
The geometry view was been different display intendly slight right and left.
it seem that these are working well Wings3D 1.4.1 in OSX as well.

To makes stereoscopic viewing well, eye-focusing on the icons of each geometry windows and the root of the xyz axis is a hint.

There was a point I was concerned about when I tried stereoscopic viewing.
If you move the camera in small increments from the viewpoint looking down from the Y axis direction, two Y axis may be seen for a moment.
It was solved by turning off "cross eye viewing". Smile

Since concentration of stereoscopic vision disappears when opening the RMB menu, so it will become the style that use by hotkey operation mainly.
06-27-2017, 03:24 PM
Post: #10
RE: Stereoscopic Geometry Windows
Thank you very much for testing and the detailed report.

Interesting that when looking down on the object you had to switch "Cross eyed viewing" off.


Forum Jump:

User(s) browsing this thread: 1 Guest(s)