• 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
gSharq

BF3 Lens flares

9 posts in this topic

I'm trying to add a similar effect to my engine, but my attempts so far didn't look nearly as good!
I'm able to have a sun occlusion value (0->1) using occlusion queries, my question is how to use that value to drive the effect.

Thanks.
0

Share this post


Link to post
Share on other sites
Looking at the screenshot, there's probably at least 3 different effects there.
1) The sun's glowing starburst.
2) The octagonal lens flare to the bottom right of the starburst.
3) The 'dirty lens' effect along the bottom of the screen.

For (1), plug your occlusion value into the scale and brightness of the starburst overlay. N.B. there might be multiple overlapping sprites involved here, possibly rotating in different directions.
For (2), it's an overlay placed somewhere along a line that goes through the sun's location and the centre of the screen. It can use the same effect of being scaled/dimmed with occlusion.
For (3), the "specks of dust" are a static (non-moving) overlay which probably isn't directly tied to the sun's occlusion -- instead it's probably driven by the bloom results.
0

Share this post


Link to post
Share on other sites
[quote name='gSharq' timestamp='1329869630' post='4915333']Thanks!
for (3), do you mean just scale it with average scene luminance?[/quote]Yeah that would be a good starting point. I'm not sure exactly how they do it, so another thing I'd try is to use a blurred version of the scene's lumincance (e.g. like an intermediate bloom result), and I'd also try flipping this bloom-result up-side-down and left-to-right -- so that if the top right of the screen is very bright, then the 'dirt' in the bottom left becomes visible.
0

Share this post


Link to post
Share on other sites
[quote name='gSharq' timestamp='1329869630' post='4915333']
Thanks!
for (3), do you mean just scale it with average scene luminance?
[/quote]
No, the actual bloom buffer. Looks like it's also flipped/scaled to not occupy the entire screen. As to how it's actually composited, that's an interesting question. It *looks* like it may be alpha-blended (color possibly modulated by bloom color?) with the alpha coming from bloom brightness somehow.

EDIT: I think there's also some extra magic going on with the sun, almost as if they render a lens flare into that buffer somehow.
0

Share this post


Link to post
Share on other sites
[b] @johnchapman[/b]

Your results look really good.[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] Is the test scene from screenshot 2 and 4 available to download somewhere?
0

Share this post


Link to post
Share on other sites
@TiagoCosta: the geometry for the buddha statuette and the column are available from [url="http://archive3d.net/"]archive3d.net[/url]. The walls of the cornell box I knocked together in 3ds max. I've put the 3DS file up [url="http://www.john-chapman.net/blog/envmap_gi1/tier_wall.max"]here[/url].

This thread got me thinking about the 'psuedo lens flare' agan and how it might be improved, possibly by modulating it radially by a 1D texture; offsets into the texture are controlled by the camera's rotation. Stylistic, of course, but it might look cool...
0

Share this post


Link to post
Share on other sites
Sorry for bumping this old thread, but I'm really interested how they made this beautiful starburst.
It don't think it's just static texture blended to the sun's position.
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