Hi,
I was experimenting with the anaglyph stereo rendering capabilities in GEM. Since GEM only supports red-green rendering i was trying to extend the source code, so red-blue glasses are supported (since they are much more commonly found for cheap prices on ebay).
I noticed however that the Sourceforge code does not compile on my Ubuntu box, while the Github version does. It could be useful to put a notice on the overview page that points to the Github repository.
Anyways, I have some feature Ideas about anaglyph rendering (banging [stereo 2( into [gemwin]). The idea is to extend the current functionality with support for red-cyan glasses. Another feature that may be handy is being able to dynamically change the distance between the two "eyes" at runtime. Right now I'm not sure how to implement these features the best way without breaking compatibility with old code. A simple solution would be to add another case (i.e. "stereo 4"). However this would lead to code duplication. Another idea is to add new setup messages to be banged into gemwin. These could look like this: [stereocolor RED CYAN(
This solution however would pollute the message namespace of [gemwin] and may be much more complicated to implement.
The adjustable eye width could be implemented like that: [stereowidth 0.5(
Since it would be nice if my code will be included into the official GEM repository I thought it would be better to ask in advance to prevent rewriting the code ;)
Best, Kilian F.
Hi,
Well actually when I compile the code from the Github repository the anaglyph stereo c++ code does not seem to be used. After some confusion why my changes in the source (Manager.cpp) seemed to have no impact, I noticed that [gemwin] is no longer a native object as it is with the GEM shipped by Ubuntu. The source in Manager.cpp does not seem to be called at all, as it seems to be exchanged with a pd-native [gemwin] implementation. The abstraction [gemwin] however renders the anaglyph 3d erratically.
I have attached an image that demonstrates this problem. To me it looks like the green channel is opaque while above the red channel whereas the red channel is transparent when above the green one. The green channel should be blending with the red channel, but it blocks the red image information.
There is a pull request I have opened on Github with a fix for this problem (https://github.com/umlaeute/Gem/pull/187).
Best, Kilian