• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
alkisbkn

Deferred Rendering and Transparent Objects

7 posts in this topic

Hello everybody,

I am researching about deferred rendering and especially the handling of transparent objects. I know the "easy" way to do it by rendering them in a separate pass using forward lighting, however could it be possible to integrate them in the deferred pass using an order independent transparency technique such as depth peeling or stochastic transparency?

I would like your views on this :)
Cheers
0

Share this post


Link to post
Share on other sites
I wouldn't say it was the "easy" way, but rather the only way. At least the only way that makes any practical sense.

There is inferred rendering and plain old screen door transparency (filtering optional), but those techniques obviously have many problems. Namely quality and the number of transparent layers. Then there is the deep gbuffer approach, which suffers from a limited number of transparent layers and also a high memory consumption and bandwidth usage.

Stochastic transparency is a nice concept, but I don't think its close to being practical. If my understanding is correct, it would require a lot of memory and most likely several render passes for noiseless images. My guess is that you would never see playable frame rates on current hardware.
0

Share this post


Link to post
Share on other sites
but if you use order independent transparency, why not shade them forward? then you just store the color (and sometimes depth) per layer, if you want to shade transparent objects the deferred way, you have to write out a gbuffer for every layer, this could be quite expensive.

In my opinion, for transparent passes, one of the techs described [url=http://www.gamedev.net/topic/619525-light-index-buffer/]here[/url] is the way to go :)
0

Share this post


Link to post
Share on other sites
Light indexing is probably the most interesting.
Rendering using OIT could be possible in forward rendering, but that defeats the purpose of the OIT, doesn't it? I wanted to use it to integrate it in the deferred pass somehow.
0

Share this post


Link to post
Share on other sites
I put together a [url="http://www.john-chapman.net/content.php?id=13"]hybrid method[/url], rendering transparent/alpha blended materials in a separate pass(es) using deferred shading. It's a bit more flexible than a using forward rendering and has the bonus of unifying the lighting between the opaque and transparent steps. As for order-independance...ShaderX7 describes an interlacing method for deferred rendering transparency; it could be used to do OIT but is very limiting on the number of per-pixel transparent layers.
1

Share this post


Link to post
Share on other sites
[quote name='alkisbkn' timestamp='1330019673' post='4915918']
Rendering using OIT could be possible in forward rendering, but that defeats the purpose of the OIT, doesn't it?
[/quote]

Not really. OIT has nothing to do with deferred shading. They are completely orthogonal concepts.
0

Share this post


Link to post
Share on other sites
In my implementation (seen in my journals) I was able to implement very simple transparency accidentily though basic alpha channels. But i have multiple layer draws due to having to draw a tilemap and overlaying sprites. Shading doesnt apply fully (i.e., the underlying material will not be shaded) since the material is overwritten with the transparent sprite and thus its material now defines the area of the color/normal buffer. Though, if adding the two color channels when the alpha channel is detected to be "transparent" when defining the normal buffer, the shading buffer should still be correctly applied for the "occluded" material since the normal buffer took transparency into account. That would require per-pixel rasterization when defining the normal buffer, but i think it would be doable. (there is probably a technique name for this, i just dont know it)
0

Share this post


Link to post
Share on other sites
[quote name='alkisbkn' timestamp='1330019673' post='4915918']
Rendering using OIT could be possible in forward rendering, but that defeats the purpose of the OIT, doesn't it?.
[/quote]not really, OIT solves the problem of the proper order of alpha fragments/pixels. it's needed for proper transparency even without any lighting. check out
http://www.youtube.com/watch?v=j_I1fTG-sSo
I think the only shading comes from a fresnel term for the blend intensity.

the solution you want to choose is very dependant on what you're actually rendering. having just one layer of glass (e.g. window) might work with simple MSAA and a custom sample mask where you writ every second pixel in case of transparency. it's simple to implement, fits naturally into the deferred shading pipeline with all the other effects. particles on the other side won't work with satisfying results with this solution. but particles can be shaded per vertex (or at least you can select like the 4 most contributing light sources per particle/vertex and use those in the usually forward rendering fashion (but that won't work for big windows that might be affected by several tiny lightsources. For tiny objects (e.g. a bottle), you might get away with cubemaps only that have lighting backed in etc.

And lighting + transparent objects are not the only issues you might have, you also want fog (even fog areas?) to work fine, mirrors (e.g. a water plane)? you might want to have shadows + projectors, decals?

and on top, you need to be very careful regarding performance, while you have an exact limit of solid pixels on the screen (-> your resolution), transparent objects can easily add 10x the cost. you might become limited to e.g. the fillrate, which isn't that common in solid deferred rendering. you might also process a lot of fully transparent or overwritten pixel. that's the main reason why most games nowadays have very few transparent objects.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0