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

Gaussian filter confusion

5 posts in this topic

I'm a little confused about the gaussian filter function which can be found on several sources.

What's confusing to me is that I've found at least 3 different equations for the same thing...

I've marked the differences in red color.

 

Wikipedia lists it as: (http://en.wikipedia.org/wiki/Gaussian_filter)

 

g(x) = (1 / (sqrt(2 * PI) * rho)) * exp(-(x*x) / (2 * (rho * rho)))

 

While the one found in Real-Time-Rendering, Third Edition defines it as:

 

g(x) = (1 / (sqrt(2 * PI) * rho * rho)) * exp(-(x*x) / (2 * (rho * rho)))

 

And finally the code that I've got from one of MJP's samples:

 

g(x) = (1 / (sqrt(2 * PI * rho * rho))) * exp(-(x*x) / (2 * (rho * rho)))

 

 

What am I missing here ?

Edited by lipsryme
0

Share this post


Link to post
Share on other sites

Assuming that you meant to divide by rho instead of multiplying by rho at all places, as indicated by the Wikipedia link, the first and third are identical, and the second is different only by a scale factor. I'd say the first and third ones are the "correct" ones as they have unit scaling, but if you disregard the scaling then the second one is no less correct than the other two.

1

Share this post


Link to post
Share on other sites

Not sure what you mean by "Assuming that you meant to divide by rho instead of multiplying by rho at all places". What scaling are you talking about ?

 

RTR defines it as: http://d.pr/i/3Dsg

 

Where is this squared rho coming from ?

Edited by lipsryme
0

Share this post


Link to post
Share on other sites

Hmm, I'd imagine the RTR is a typo because typically you don't want to scale and you want to be normalized to 1 when you integrate over the domain -\inf to \inf. That's what the term out in the front is for. I don't have the book on me at the moment to see in context what they are talking about.

 

-= Dave

0

Share this post


Link to post
Share on other sites

The σ symbol in that equation is sigma, not rho, but never mind that. If you look at the equation, σ2 is in the denominator so you need to divide by σ, not multiply by σ (or rho; ρ) as you have in your original posts. Basically, your original post stated 1/sqrt(2π)*σ, where the correct equation in 1/(sqrt(2π)*σ). Likewise in the exponent, the correct equation is exp(-x*x/(2*σ*σ)). Note the parentheses to get the factors, dividends and the divisors correct.

 

Scaling refers to the linear scaling perform by the filter. If the filter has a scaling by for example 2, it means that the values of the signal is filtered but also scaled by 2 in amplitude. Your first and third equations does not have any additional scaling as the second equation has. Your second filter is scaled by 1/σ, which means that if σ=0.25, then the filtered signal is four times larger than the input signal apart from the actual filtering.

0

Share this post


Link to post
Share on other sites

Ah yes sorry I keep confusing these symbols names smile.png  (maybe I should just call it the standard deviation rolleyes.gif ) and yes it seems I've made some mistakes in the parentheses (fixed it now) but that scaling factor is basically what I'm confused about the reason why it's in there.

Edited by lipsryme
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