Jump to content
The Dark Mod Forums

Stereoscopic rendering (red-cyan anaglyph)


MirceaKitsune

Recommended Posts

I was wondering if the engine has any support for stereoscopy, and how to enable it if so. Nothing fancy like the Oculus Rift (yet), just a basic ability to render from two different viewpoints with a given eye separation, in either side-by-side mode / interlaced mode / red-cyan anaglyph / etc. I have a pair of red-cyan glasses, which I love using with games that support anaglyph stereoscopy (like Minecraft)... I can only imagine how TDM's environments would look like with full depth perception added to the mix :)

Link to comment
Share on other sites

TDM has no support for stereoscopic 3D of any kind, Doom 3 BFG on the other end has it, but TDM uses the older Doom 3 engine before BFG. Btw i also have a 3D screen and i play many games in 3D mode, unfortunately, OpenGL games are not supported by Tridef 3D, the software i use.

 

Ahhh... that sucks. I was half expecting the original idTech 4 engine to support this, or TDM to have added it later. Since I assume this isn't on any immediate priority list, I guess the answer is a definite no then.

Link to comment
Share on other sites

Some folks have ported the Occulus stuff to vanilla Doom 3 as I recall, so it's within the realm of possibility...

 

The bigger problem is, can you get the bigger missions to run at 120 FPS needed for the proper VR experience ... ?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Some folks have ported the Occulus stuff to vanilla Doom 3 as I recall, so it's within the realm of possibility...

 

The bigger problem is, can you get the bigger missions to run at 120 FPS needed for the proper VR experience ... ?

There is always the option to get a proper 3d screen without those crappy shutter glasses. ;-)
Link to comment
Share on other sites

I think lower FPS is understandable and acceptable, since you are rendering two different views. We could at worst use this on heavily optimized maps where framerate remains playable.

 

Anyway, stereoscopy is something most engines support these days. The Darkplaces engine even has a lot of modes and options, and I could tweak eye separation and angle to get the best possible effect. So although this is the question every user with a wish might be afraid to ask: Is there a chance that someone might code it?

Link to comment
Share on other sites

I don't think so. It wouldn't work very well without huge changes to the engine.

 

You (or someone) could have a go at a half-fps version without touching the engine. The way the player view gets set up every frame is pretty straightforward, and it's in the game code. You could easily modify it to draw alternate frames from alternate eye positions, if you could then get a 3d monitor to display that in sync with those glasses that block out one eye each frame (showing my ignorance here :) )

Link to comment
Share on other sites

Here's the Occulus thread about Vanilla Doom 3 I found on Reddit:

 

https://forums.oculus.com/viewtopic.php?f=29&t=13130&p=183048#p183048

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

You could easily modify it to draw alternate frames from alternate eye positions, if you could then get a 3d monitor to display that in sync with those glasses that block out one eye each frame (showing my ignorance here :) )

 

Manually syncing in time isn't necessary. The way it's done is to create an OpenGL context with quad buffer support (both front and back buffers for each eye), and then render the two eye perspectives into the left and right buffers as appropriate. The graphics driver is then responsible for displaying the two eye buffers in a manner appropriate for the current hardware (e.g. by syncing them in time with shutter glasses, or providing the two images in whatever format the 3D monitor expects).

Link to comment
Share on other sites

Manually syncing in time isn't necessary. The way it's done is to create an OpenGL context with quad buffer support (both front and back buffers for each eye), and then render the two eye perspectives into the left and right buffers as appropriate. The graphics driver is then responsible for displaying the two eye buffers in a manner appropriate for the current hardware (e.g. by syncing them in time with shutter glasses, or providing the two images in whatever format the 3D monitor expects).

 

I don't know the coding specifics... except when stereoscopy was implemented in the MineTest engine, and this thread was linked as an example of the code. Maybe it can come in handy for us as well?

 

But from what I'm aware, the engine is responsible for creating and displaying the two views, not the driver. Especially since it must decide how to map it: Either side-by-side, interlaced (alternating per pixel line horizontally), or anaglyph (red-cyan). Since most Quake engine forks (<= idTech 3) added this easily, I don't imagine it being problematic... especially if another idTech 4 fork (BFG?) did it and we can simply copy their section of code!

Link to comment
Share on other sites

But from what I'm aware, the engine is responsible for creating and displaying the two views, not the driver. Especially since it must decide how to map it: Either side-by-side, interlaced (alternating per pixel line horizontally), or anaglyph (red-cyan).

 

In theory, the engine should never have to know the capabilities or configuration of the hardware. It just renders the two views into two different buffers and the hardware determines how to display it to the user.

 

In practice, I have only seen this done for shutter-glasses stereo (where manually syncing in the engine would be nearly impossible). Anaglyph and interlaced stereo are handled manually by the application. But there is no reason why this couldn't be done by the graphics drivers just like shutter glasses (it would certainly make application developers' lives a lot easier).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...