Adventure Game Studio

Community => Adventure Related Talk & Chat => Topic started by: Rui 'Trovatore' Pires on Sat 01/01/2005 14:03:31

Title: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 14:03:31
Ok, this is all theoretical - I'd like to get people's thoughts and discussions about it.

You know REAL 3D? One of the methods to get it - the most popular one - is the anaglyph method. You know, 3d glasses with red and blue/green/cyan lenses?

Well, how about a game with THAT?

Artist-wise, I'd like to know if it is feasible. From what I could gather, the secret is in having red and blue/green/cyan "shadows" to the left and the right of the object. The DISTANCE between them, and whether they ARE in the left or right side, is the key to making depth.

This would mostly be useful for 1st person games... 3rd person would probably have to be more, er, "imaginative" in their scripting, not to mention their entire style would need revising - is the player still mobing down, or is he moving closer? Quite problematic.

Color is an issue. I think. But here, have this link.

http://www.rainbowsymphony.com/3dgallery/

Many of these images are in full color...so it's apparently not an issue. (NOTE that I haven't yet looked at them with 3d glasses MYSELF).

Eye fatigue is also an issue, but I know precious little about it. If someone who knows anything about it could help?

Naturally, this would uncover a new possibilty. Imagine moving the mouse around normally... and using the mousewheel to bring it CLOSER or FARTHER AWAY. Not too hard to script, considering it would probably only require two extra "cursors", one red and one blue, carefully placed.

Imagine an AGS game like this. Imagine Myst like this. Imagine System Shock 2 like this (although being natively 3D, it would probably be hair-risingly hard, slide-show would probably be much better for this). Just... imagine.

...

...all done imagining? Then please share your thoughts. This is all theoretical, and I want to know what people think of it.

EDIT - Forgot to mention this.

http://www.rainbowsymphony.com/teacherlesson3.htm

An explanation of how it works.
Title: Re: 3D. True, pure 3D in AGS.
Post by: .. on Sat 01/01/2005 14:12:11
oooooooohhhhhhh.... i like the idea.

It could be done i suppose with backgrounds, but if you're going to have objects or characters that need to move, how are you going to get the shadows to change or avoid the anti-aliasing monster.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 14:16:26
Blast, shadows... I hadn't thought of that. Although since AGS ITSELF doen't do much for them, it might not be a problem. AGS says "use a character which already has a shadow in its sprite", or "use another character as a shadow". In either case, it's not necessarily a problem, and neither is movement. If they move, they move, and so do the red/blue "shadows". If they move closer/away, the red/blue shadows adjust to take care of it.

Yes, animations would be hell for the artist. I'm not saying thet wouldn't be. (not that anyone asked, but I thought I might as well mention it. ;) )

As for anti-aliasing... well, maybe the only option is to turn it off. At any rate, it's not like scaling would be that big a necessity any more.

EDIT - I tell a lie, scaling would still be necesssary. But all the same, turning off anti-alias isn't that big a deal.
Title: Re: 3D. True, pure 3D in AGS.
Post by: .. on Sat 01/01/2005 14:21:26
I can't see it being done.  It would take forever to make the game, and of course you'd have to have the glasses to play (well to see it porperly) :P

Maybe it could be done but just to make the very close foreground stick out from the background, like in a puppet theatre, that kind of cardboard cut out look. - or to make a gui appear to float off the screen
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 14:24:11
Yes, it would be very time consuming, but let's not dabble too much on "time". Every good game takes time, and a game like this would need extra care. Let's focus on other issues. And at any rate, the glasses are easy to make. Celophane paper (I think it's celophane, at any rate) in a cardboard "frame" would work wonders.

And "partial" 3D, like the one you suggest... hmmm... not a bad idea, but the thing is, if you can go the whole hog, how satisfying is it to just make SOME things 3D?
Title: Re: 3D. True, pure 3D in AGS.
Post by: .. on Sat 01/01/2005 14:30:22
lol.  I'm happy just waiting for a fully 3d version of AGS (as in rendered 3d) .... someone call me when it's been made
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 14:34:19
Set your sights higher, mon! Reach for the stars! The world's at your hand, if you have but the courage to take it! ;)
Title: Re: 3D. True, pure 3D in AGS.
Post by: Snarky on Sat 01/01/2005 15:15:04
Don't many 3D renderers support an option of rendering in this way? If so, just use 3D-generated backgrounds. I also think it wouldn't be that hard (comparatively speaking) to make a Photoshop filter which allowed you to take an image (or a layer) and generate an anaglyph picture for a certain distance. Then you could set different layers at different distances, and you'd get the "cardboard cutout" look Scuthbert is talking about. A slightly more advanced filter would allow you to set a distance gradient, which (with some work) would allow you to create complex 3D scenes.

I don't see why antialiasing would be a problem. However, what would be a problem is walkbehinds. You would have to do it for each channel separately, which means they would have to be stored separately and blended by AGS. Also, AGS would need to know how far the channels were offset, which is the same as knowing the distance to each point. At that point, you're actually doing real 3D, just an impoverished version of it. If you can do without walkbehinds (say use objects for all walkbehind areas) it might work.

I think there's a real risk that all characters that are supposed to stand on the ground will look either like they're floating in front of it, or sunk within it.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 15:21:29
Those are good considerations, Snarky. But I believe that the walkbehind problem and the character problem can be worked around. How, I'm not sure, but I guess it would involve a hell of a LOT of trial and error.

I didn't know 3D rendereds could render like that! Could you please give me an example of one, so I could check it out, maybe get this thing off theoretical ground? I used Blender once, but I don't remember the ability of rendering like that (not that I was even looking, tell the truth...)
Title: Re: 3D. True, pure 3D in AGS.
Post by: HillBilly on Sat 01/01/2005 15:34:40
http://img7.exs.cx/my.php?loc=img7&image=3d6cq.swf


It's pretty easy to do in black n white.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Snarky on Sat 01/01/2005 15:40:49
Quote from: Rui "Puss in Boots" Pires on Sat 01/01/2005 15:21:29
Those are good considerations, Snarky. But I believe that the walkbehind problem and the character problem can be worked around. How, I'm not sure, but I guess it would involve a hell of a LOT of trial and error.

I prefer to work it out in my head first before going off and trying it.  ;D

The walkbehind problem I don't think you'll be able to get around, except as I described. It's a fundamental property of 2D images. However, there's no reason why a workaround of turning all walkbehinds into objects wouldn't work.

Quote from: Rui "Puss in Boots" Pires on Sat 01/01/2005 15:21:29
I didn't know 3D rendereds could render like that! Could you please give me an example of one, so I could check it out, maybe get this thing off theoretical ground? I used Blender once, but I don't remember the ability of rendering like that (not that I was even looking, tell the truth...)

I haven't used it myself, I've just seen people create images like that with 3D renderers.

If it doesn't support it internally, you could just render the image twice from two slightly different points of view (right next to each other), tint one of the images green and the other red, and merge them together.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 16:04:23
Quotethere's no reason why a workaround of turning all walkbehinds into objects wouldn't work.
Ok, I'll be honest - I just didn't understand what you meant by that solution, so I kinda jumped over it. ::) Sorry.

As for the renders... if anyone knows of one, I'd be much obliged. I've been looking and I also found some stuff, but what little info I could get pointed me to Image F/X, which is for amiga AND has no shareware/demo for download (must be afraid of pirates). IF I find nothing else, I might well do what you suggested, Snarky.

EDIT - For testing purposes, this should do well:

http://z-graphix.com/anaglyph/anaglyph.htm

EDIT - I just found ElDorado.

http://web.telia.com/~u31218833/html/docs/012_Download_Edit.html

EDIT - Any and all testing I can do right now is limited, because today all stores are closed, but tomorrow I'll buy some celophane to make me some 3D glasses and test it. But so far it seems quite doable - at least in the artistic sense. Practical senses will only be revealed when I test.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Evil on Sat 01/01/2005 19:14:33
I think it would work great. It would be cool to do a game like m0ds' block man. It'd be simple and the 3D aspect of it would be awesome.
Title: Re: 3D. True, pure 3D in AGS.
Post by: BOYD1981 on Sat 01/01/2005 21:43:40
i think the topic's been wiped now, but i brought this up a while ago with this diagram:
(http://www.btinternet.com/~boyd1981/help.gif)

making the background would be pretty easy, the characters would be the only real problem
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sat 01/01/2005 21:54:17
Yeah, my very RECENT sufring through the net uncovered that sort of explanation. That's a good diagram, thank you very much, it sums it up very nicely. Pity I'm no artist myself, so all the info I'm amnassing is useless in my hands.

As regards characters, it would be harder because I don't think it'd be that "automatic". If the character moves down, it moves down; if it moves up, it moves up. BUT if, as usually happens, it moves down AND closer or up AND farther away, I think we'd need "ghostly" red and blue extra characters, whose position in relation to the character would be constantly changing. Not that it'd be a problem once it was scripted - it seems to be that sort of thing, script-it-once-and-it's-all-done, if you know what I mean.

Only the mouse cursor would have that "extra" dimension of being anywhere at any depth... and only the mouse cursor, therefore, would need special coding. BUT it WOULD be possible therefore to actually select items in depth!

At any rate, I maintain that this would work it's best in a 1st person game... though still amazing in 3rd person.

Funny how no one yet mentioned eye fatigue. Maybe it's not a problem as I feared?
Title: Re: 3D. True, pure 3D in AGS.
Post by: Redwall on Sun 02/01/2005 15:31:55
You're talking to a bunch of geeks who spend most of their time staring at computers. Eye fatigue? What's that? :D
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Sun 02/01/2005 20:25:48
Try wearing 3D glasses for too long. Though I'm not sure, I think the eye gets tired.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Khris on Mon 03/01/2005 02:27:53
Just to clarify: you don't need 1 char + 2 coloured shadows but 1 red & 1 green char.
The brain merges the two 2D pictures of your two eyes into one 3D pic.

It's a cool idea to add depth to mouse movement, but this would only make sense if some objects were completely hidden behind others and thus aren't clickable in a 2d sense. If this is the case, how does the player get to know about these objects?
So if every object is visible, why the trouble of moving the cursor to the object's depth to be able to click it? This would only annoy players.

Back to the chars & objects:
I don't think it's too much trouble to add the right eye-shadow, its distance to the left-eye one is proportional to the scaling factor. You'd have to tint a character red and have a green tinted one following him at the same y-coord and evaluated greater x-coord. Shouldn't be a big deal.
Objects are even simpler, their two views can be combined in the paint prog, so AGS handles only one object as before.

I've just re-read my post and so far everything makes sense, at least to me :)
Title: Re: 3D. True, pure 3D in AGS.
Post by: BOYD1981 on Mon 03/01/2005 04:04:19
it'd probably be possible to just create an anaglyph plugin for use with AGS then just create your backgrounds and characters normally.
hell there are probably programmes you can download that turn everything on your screen into an anaglyph
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Mon 03/01/2005 06:26:18
khrismuc: wouldn't just 2 characters lose... well, color? I know this method makes everyhting look screwed up color wise anyway, but I've seen many anaglyphs with full color. And in all of them there's the main image and the 2 other images.

As for mouse movement... yeah, I wondered when anyone else would spot that. That occurred to me as well, I just kept forgetting to say it... ah well, it was a cool idea. :P

As for characters and objects, yes, I quite agree on your ideas.

BOYD: I don't know any such program, and I've been looking at plenty. Thing is, most anaglyph makers rely on having a "left" and "right" image. If there is no such image... well, you'll be hard pressed to get a GOOD anaglyph out of a single image. ALTHOUGH I am experimenting with a program called "bas-relief" for this.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Khris on Mon 03/01/2005 17:39:59
Quote from: Rui "Puss in Boots" Pires on Mon 03/01/2005 06:26:18
khrismuc: wouldn't just 2 characters lose... well, color? I know this method makes everyhting look screwed up color wise anyway, but I've seen many anaglyphs with full color. And in all of them there's the main image and the 2 other images.

Could you post one of these anaglyphs with 3 images? I still think there are actually only 2 of them, one for each eye.
Take a look at this one:
(http://www.rainbowsymphony.com/3dgallery/Gorilla3D.GIF)

It becomes clear when you look at the top left banana; there appears to be a yellow banana with two 'shadows', but if you look closely, the banana is only yellow where the red&green images overlap. Same for the rest of the image, full color only at red&green overlapping.

I don't think this can be achieved with AGS, even with a decent plugin. I've just noticed that the greens&reds in the above picture are different ones, depending on the color of the object, the green of the big Rs is more turquoise then that of the bananas.
And a plugin would need a map of every bg telling the distance of each pixel to the viewer...
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Mon 03/01/2005 22:28:54
I really don't get your meaning... it still looks to me like three images, and it could probablt be done with transparent images over the character or the object...

...but I'll give it a go. As soon as I find out how to make a 3D image from an non-stereo 2D image with bas-relief. I think it's possible, and this is all only worth it if it IS - it might be unrealistically hard work to really have 2 images of everything, especially when I've so far FAILED to get a good anaglyph maker.
Title: Re: 3D. True, pure 3D in AGS.
Post by: ezra on Tue 04/01/2005 02:17:09
There is software that can convert regular images to anaglyph images. I purchased Edimensional 3d Glasses a while back and it came with this software. When I get back from holidays I'll rummage through my CDs and see if I can find it.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Tue 04/01/2005 06:26:57
You'd do that?! Thank you VERY much! If I could just have the name of the software, I think I'd be able to scrap something up. So far Bas-Relief has turned out to be the most promising, but it still doesn't have that extra quality that manually-made anaglyphs have (of course), although it's main feature IS relying on a depth map. Maybe I'm just not pamming correctly.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Snarky on Tue 04/01/2005 07:47:31
It's really two images (one for each eye). One green and one red. However, where they overlap the colors get added together and come out looking like full-color. Color pictures in newspapers look similar when the color plates haven't been lined up properly.

You probably know that computer graphics are composed of red, green and blue channels. I'm not sure how the anaglyphs deal with the blue, but I suspect that it's added to one or both of the channels. That might explain why the greens are different shades in the picture you posted, krishmuc.
Title: Re: 3D. True, pure 3D in AGS.
Post by: MillsJROSS on Tue 04/01/2005 18:10:41
It's a cool idea. The only thing I'd ever be concerned with, as already mentioned, it eye fatigue. I don't know if I'd be able to play the game without getting a headache. That doesn't mean I'd like to see it tried. Could just be me who gets headaches when looking through those things.

-MillsJROSS
Title: Re: 3D. True, pure 3D in AGS.
Post by: DragonRose on Tue 04/01/2005 19:55:35
MillsJRoss: It isn't just you. I can't even SEE 3D images, because I'm very very minutely wall-eyed. They just look like doubled images to me. Trying to see anything gives me absolutely horrendous headaches.
Title: Re: 3D. True, pure 3D in AGS.
Post by: TerranRich on Wed 05/01/2005 15:37:31
THere's another 3D idea that might be even better, if only it were feasible on computer monitors. Has anyone ever been to the Terminator 3D ride at Universal Studios? They use a 3D projector on a stage and hand out 3D glasses. Except these aren't the red-blue kind, they're the shaded ones. If you take off your glasses, you'll see double-images that are in full color, but with the glasses on, they're still full color, just in full 3D.

If anyone doesn't know how they work, basically the two images are projected using different filtered light. You see, regular sunglasses filter out horizontally-reflected sunlight. If you turn the glasses sideways you'll see different light better than other light. One image is vertically-reflected and the other is horizontally-reflected, and the two lenses of the glasses are different polarized filters. This way, one eye blocks out one image, while the other eye blocks out the other. This way, one eye sees the "left" image, and the other eye sees the "right" image, giving a full color 3D effect. It's quite ingenius and impressed me when I first figured out how it worked.

If only computer monitors could support this, it would be an even better and more feasible method of 3D generation. It could theoretically be possible on a projection-type of TV screen, but it would have to be hard-coded into a chip in the projector. This way, each background, sprite, character, etc. would consist of a "left" sprite and a "right" sprite. There could be some code that would detect the scaling (as well as a "distance from camera" walkable-area setting) and adjust the images accordingly. It would be crude, but effective.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Snarky on Wed 05/01/2005 17:34:11
For an explanation of how these and other methods work, http://en.wikipedia.org/wiki/Stereoscopy is a good resource.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Rui 'Trovatore' Pires on Wed 05/01/2005 23:30:30
TerranRich, the only real drawback in what you say is the fact that THOSE glasses aren't as easy/cheap to come by/make as the usual red/cyan glasses, and a lot less people would be able to benefit from it.

However, my experiments have drawn to a close. I have zero artistic vein, so it's futile for me to keep trying - I believe this has to be done manually by someone who CAN do it. Graphic-wise, I mean. And by THAT I mean "background-wise". Haven't even tried anything else at all yet, cause if I ain't even got the BACKGROUND...
Title: Re: 3D. True, pure 3D in AGS.
Post by: Ashen on Wed 05/01/2005 23:51:17
I don't know if you've seen it, but I just remembered seeing this tutorial a while ago:
http://www.worth1000.com/tutorial.asp?sid=161051

It uses photographs, but I imagine you could adapt it to drawn backgrounds. I haven't been able to try it out though, as I don't have any 3D glasses. I'm also not sure how it'd work with scrolling backgrounds - probably not well if at all.

Might not be of use, but I thought I'd mention it.
Title: Re: 3D. True, pure 3D in AGS.
Post by: Minimi on Thu 06/01/2005 00:18:50
I have here a link to a freeware program that can make anaglyph pictures! I hope this is helpful for you!

http://anabuilder.free.fr/ABDownload.html

I found the link on this website : http://www.webgrid.co.uk/graphics_6.html 
there are alot more links to nifty free tools there!

Goodluck with everything.


ps : "yup I actually posted on the forums again!"