Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

ZBethel

Member Since 10 Jan 2011
Offline Last Active Yesterday, 02:48 PM
*****

Topics I've Started

Shared stencil buffer between framebuffers?

17 March 2013 - 07:53 PM

I'm writing a game where I need to apply a gaussian blur to parts of the scene. I've created an FBO with a depth-stencil buffer attached, and I'm rendering my scene to that buffer. I would like to set the stencil buffer to 1 for any fragment that requires blur, so my rendering queue has logic to set/unset that based on the requirements of the renderable. There are only a few sprites that are being blurred.

 

I'm trying to wrap my head around how OpenGL handles frame buffers with attached render buffers and all that. Is there a way I can share the stencil buffer across a couple frame buffer objects as well as my back buffer? Ideally, I would like to render everything into one scratch FBO (while doing stencil writes), and then render a first gaussian pass into the second FBO ignoring fragments not flagged by the stencil buffer. Finally, I'd like to render the second pass into the main framebuffer (also with stencil testing enabled).

 

Is this possible? I'm not quite understanding how OpenGL interprets which stencil buffer to use. I assume anytime I'm calling glStencilFunc, it's acting on the currently bound framebuffer object. In that case, do I need to somehow grab the default stencil buffer and attach it to my scratch FBOs?

 

Thanks!


Project Sandbox

16 August 2012 - 08:48 PM

For a few months now, I've been working on a project in my spare time that I hope will become a game by next summer. The engine is being built from the ground up in C++ with DirectX 11 and Bullet Physics integration. This was the third major milestone on the project, focused entirely on improving the graphics side. Features for this milestone include:
  • High Dynamic Range Lighting
  • Improved Deferred Rendering with FXAA
  • Cook-Torrance lighting with normal and specular/roughness map support
  • Cascade Shadow Mapping with PCF filtering
At this point, the project is more of a sandbox tech demo than a game (hence the random globes and sparse level design), but gameplay elements are slowing making it in. Much of those details are still in the works, but the vision is to have multiplayer tank battles! The tank itself is a simulated constraint vehicle, and a lot of my energy has gone into making it fun to drive rather than realistic. It's not quite there yet, but I'm liking what I have so far. Currently, I am the sole developer on the project, although a friend of mine created the tank model.  I am still investigating other graphics features I'd like to add, such as motion blur, baked radiosity with irradiance volumes, ambient occlusion, depth of field, etc. I'm holding off on those until a later milestone, as they're more of "gravy" items.

The next milestone will focus on developing the camera system and turret movement for the tank, as well as making it actually shoot!

Last but not least, credit goes to MJP for the shadow mapping algorithm and HDR research. You can find out more about it on his blog: http://mynameismjp.wordpress.com/

Click here to view the iotd

Academic Licensing

13 August 2012 - 05:12 PM

So as an undergraduate student, I thought of an interesting legal issue. Most of the software that I currently use for development is academically licensed. I have an MSDN academic version of Windows and Visual C++. I've been messing around with the academic version of Maya, etc.

I'm currently working on a game that is just a personal hobby project, nothing for profit. Just today I was reading through some of the licensing info for Maya, and it sounds like anything you've ever made with their education software is ineligible to sell. As a hobbyist developer, I have aspirations to make stuff that's good enough to sell, but it sounds like I have to invest in commercial versions of stuff BEFORE I even start working on a project in order for me to be able to eventually sell it.

Moving over to the for-profit domain is scary...

Unexpected behavior with ALT-TAB in Fullscreen Mode (DXGI)

22 July 2012 - 01:17 PM

I am setting my DirectX11 application to run in fullscreen mode when I create the swap chain. This works fine until I ALT-TAB to minimize. All it does is undo the fullscreen mode and place the window in the background (i.e. not minimized, just a background window). Maximizing the window or refocusing the window doesn't cause it to switch back to fullscreen mode. Does DXGI expect me to do something that I'm not? I've read the MSDN documentation online and it doesn't explain how to handle this case.

Thanks.

Simulating tank treads...without the treads

01 July 2012 - 05:40 PM

I'm playing around with Bullet Physics, but I think my question is probably physics engine agnostic. Basically, I'm looking to simulate an arcade/style tank. I want to use a constraint based system rather than a raycast system to make it a bit more physically based. I've basically set up a constraint that limits the rotation to one degree of freedom (the axis angle), and one translational degree of freedom with a spring (the shock absorber). I don't want to actually simulate the treads, but I'd like for the wheels to behave as if they have treads, i.e. a force applied to one wheel affects all wheels. More than that, some of the wheels are bigger than others, so I have to take in to account their size differences.

I guess what I'm asking is, do I need to do some heavy gear differential related math to apply forces to each wheel, or does bullet (or any other engine) have constraints designed to accommodate this kind of scenario?

Thanks!
Zach.

PARTNERS