Blender and stereograms/SIRDS

I hope this is the right forum for this… as it is sort of a ‘test’ and ‘experiment’. It’s also hopefully going to give me an okay grade in college too.

While I’m still having trouble, for a recent project in computer graphics I had to make a texture generator. The fellow was done in c++ and needed to also have one fancy addon. I chose SIRDS (Single Image Random Dot Stereogram) which I guess departs from the strict definition since I use textures and tiling instead of truly random junk.

So far, it pretty much works, and I use blender for generating the disparity maps. I’ve mostly just had trouble getting the nodes system to generate depth maps appropriately. Oh well. I think if I had more help I might be able to get it to work. All I want is a gray-scale representation of distance, where black is the furthest distance and white is closest. Sadly, I haven’t been able to do that, though I think it just is going to take some tweaking of the ‘max’ and ‘min’ math function nodes. We’ll see.

Anyways, I’ve attached results so far (the first is the disparity mapping I used from blender and the second is the disparity). I made a gif animation, but it’s 9 meg. Sheesh.

I can provide the C++ code if anyone wants it. My license is the following:
Don’t be a jerk

That’s it. Do that, and you can do whatever you like with the code. Of course, I’m usually a total jerk, but since I made the license, you can’t point fingers. Hah.

I’m just kidding. Just don’t be too much of a punk. That’s the real license.

Also, I use libPicio for the project, and I hate it. PLEASE! if anyone has any better ideas, let me know. And if enough people like this, I could provide blender with some sort of python plugin or something that renders SIRDS or uses base textures to render them. Either way, the code is very basic.

The source texture comes from boring3d, by the way. For those with the sharp eyes, that guy’s grass is unmistakable. I’m sure maybe one person here will notice that as soon as I mention it.

I wish I could post the blend file so someone could tell me what I’m doing wrong with the nodes.

Attachments



i love these things. I see the triangle clearly. Good job!!! There used to be a plugin, but it has been lost over the years. This would be a cool Texture Plugin!!!

This thread has several different ways to for you to generate good depth maps The second post tells you how to do it with nodes.

BTW: the old stereogram plugin has been broken since 2.41 or 2.42… It hasn’t been updated to use the new float zbuffer or image buffers…

the sad part is it isn’t supposed to be a triangle, but the corner of a cube. But the other fellow here just gave me a good resource for getting depth maps. Perhaps I can fix the problem now

what about just inverting the alpha

Hey,
I have never, ever, ever, been able to see these things until now!! Great job!
Unfortunately, I can not really help you since the only “3D” work I have done with the nodes are anaglyphs, not stereograms. So again, sorry for my uselessness.


Kevin

Anaglyphs…
Actually, i would like to know if it is possible to use a polarized 3d set-up while modeling in blender. :confused:

I created a Patch with a compositor node to create SIRDS for anyone looking ;D