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

Lots of reflections- how?

9 posts in this topic

A rather vague question about reflections. I hope someone can enlighten me.

I've got no problems with simple mirrors and reflecting water etc but how do you go about creating an environment with lots of reflections (I'm working in XNA)?

I'm thinking of games like Mass Effect 2/3 where nearly every other surface reflects its environment. It seems clear that not ever reflection can be calculated each frame so I'm assuming some kind of pre-calculated approach like environment mapping with cubemaps. Hope someone can fill me in.

Thanks Edited by gchewood
0

Share this post


Link to post
Share on other sites
I would guess they place cube maps around the scene to do reflections. There is also a screen space reflection technique I heard crytek uses, but it is not very accurate and can get problems, so I don't like it too much.
0

Share this post


Link to post
Share on other sites
Yeah the common approach is to place reflection probes in the scene, and then pre-render environment maps at the probe locations. When you do this you can also filter the mip levels such that they somewhat match the specular response for different roughness values (specular powers).
1

Share this post


Link to post
Share on other sites
What MJP said. I can personally confirm ME2/3 both use regular boring cubemaps, but BioWare's art department did a pretty good job hiding this by way of careful region selection. I can't think of any glaring examples where the infinite projection was obvious.

If you want to slap them over things more aggressively, techniques like [url="http://seblagarde.wordpress.com/2012/08/11/siggraph-2012-talk/"]parallax-corrected cubemaps[/url] and other enhanced-projection approaches work really, really well for a large percentage of scenes. They typically aren't much more expensive than the traditional stuff but for mostly-planar surfaces you can get results approaching stencil-masked mirrors.
0

Share this post


Link to post
Share on other sites
[quote name='TheChubu' timestamp='1350365229' post='4990630']
The even more common approach is not to do reflections at all [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]
[/quote]

Erm, yeah.....thanks. Very helpful.

[quote name='MJP' timestamp='1350323414' post='4990451']
Yeah the common approach is to place reflection probes in the scene, and then pre-render environment maps at the probe locations. When you do this you can also filter the mip levels such that they somewhat match the specular response for different roughness values (specular powers).
[/quote]

Well I'm glad I was on the right lines. Is it best to do this programmatically in the engine (and if so, does anyone have the algorithm?) or in something like 3ds max?
0

Share this post


Link to post
Share on other sites
[quote]
[quote name='MJP' timestamp='1350323414' post='4990451']
Yeah the common approach is to place reflection probes in the scene, and then pre-render environment maps at the probe locations. When you do this you can also filter the mip levels such that they somewhat match the specular response for different roughness values (specular powers).
[/quote]

Well I'm glad I was on the right lines. Is it best to do this programmatically in the engine (and if so, does anyone have the algorithm?) or in something like 3ds max?
[/quote]

MJP,

In addition to gchewood's question, I would like to add a question regarding the probe locations. Do you then just setup an orthographic view in all directions (ex. straight up, down, left, right, forward, back) to a single cubemap texture?

Thanks,
Jeff.
0

Share this post


Link to post
Share on other sites
[quote name='gchewood' timestamp='1350379284' post='4990662']
[quote name='TheChubu' timestamp='1350365229' post='4990630']
The even more common approach is not to do reflections at all [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]
[/quote]

Erm, yeah.....thanks. Very helpful.

[quote name='MJP' timestamp='1350323414' post='4990451']
Yeah the common approach is to place reflection probes in the scene, and then pre-render environment maps at the probe locations. When you do this you can also filter the mip levels such that they somewhat match the specular response for different roughness values (specular powers).
[/quote]

Well I'm glad I was on the right lines. Is it best to do this programmatically in the engine (and if so, does anyone have the algorithm?) or in something like 3ds max?
[/quote]
The consistency is nice, but you'll likely need to add extra shaders, etc. for things to go smoothly. Rendering programs have the advantage of accuracy and sampling flexibility. If one is a win, go with it.

Re: implementation: Render six views along each of the six major axes with 90-degree horizontal and vertical FOV, save into the appropriate face of a cubemap, done. With MAX you can probably accomplish something similar using render-to-texture and MAXScript though it's not something I've ever attempted.

[quote name='jeffkingdev' timestamp='1350392495' post='4990703']
[quote]
[quote name='MJP' timestamp='1350323414' post='4990451']
Yeah the common approach is to place reflection probes in the scene, and then pre-render environment maps at the probe locations. When you do this you can also filter the mip levels such that they somewhat match the specular response for different roughness values (specular powers).
[/quote]

Well I'm glad I was on the right lines. Is it best to do this programmatically in the engine (and if so, does anyone have the algorithm?) or in something like 3ds max?
[/quote]

MJP,

In addition to gchewood's question, I would like to add a question regarding the probe locations. Do you then just setup an orthographic view in all directions (ex. straight up, down, left, right, forward, back) to a single cubemap texture?

Thanks,
Jeff.
[/quote]
You probably want to be using projection cameras, but I guess ortho could work too. Likely would look a bit weird, but maybe there's some 'artistic effect' floating around in there someplace :)
0

Share this post


Link to post
Share on other sites
You'll probably want to capture your probes with the same renderer that you use at runtime. This ensure that you support all of the same shaders/materials/effects/etc. when capturing probes. We do render the probes inside of Maya, using a custom plugin that uses our engine to do the rendering.

To render to a cubemap you'll want use use 6 perspective projections. The easiest way to do it is to line up each cubemap face with a world-space axis, so that you can sample from the probe using a world-space reflection vector. For the projection you'll want to use a FOV of Pi / 2, and an aspect ratio of 1.0.
0

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1350454299' post='4991023']
For the projection you'll want to use a FOV of Pi / 2, and an aspect ratio of 1.0.
[/quote]

[quote name='InvalidPointer' timestamp='1350396581' post='4990719']
: Render six views along each of the six major axes with 90-degree horizontal and vertical FOV
[/quote]

Cool, I didn't realise it was that simple. Sounds like the only difficulty lies in dividing up the scenes so the reflections fit nicely. Thanks a lot people, glad to this forum is so reliable.
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