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

Specular highlights on water

12 posts in this topic

Hi,
I am using animated normalmaps and usual specular calculation result looks not that good,
Is there a way to make specular highlights on water look better and natural?

Thanks
0

Share this post


Link to post
Share on other sites
No problem.

Forgot to say; you can use the Photoshop NVIDIA DDS plugin to draw custom data on the mip-levels: [url="http://www.modwiki.net/wiki/Editing_MIP_Maps"]http://www.modwiki.n...diting_MIP_Maps[/url]

Alternatively you can use the GIMP plugin: [url="http://code.google.com/p/gimp-dds/"]http://code.google.c...p-dds/[/url]
0

Share this post


Link to post
Share on other sites
[quote name='Hiyar' timestamp='1320773439' post='4881811']I am using animated normalmaps and usual specular calculation result looks not that good,
Is there a way to make specular highlights on water look better and natural?[/quote]That depends on what is not good-looking about it... Can you post a picture?


If the problem is specular aliasing, then [url="http://www.nvidia.com/object/mipmapping_normal_maps.html"]mipmapping your normal maps[/url] with a toksvig factor, or using [url="http://www.cs.umbc.edu/~olano/papers/lean/"]LEAN mapping[/url], will help.
2

Share this post


Link to post
Share on other sites
I am just trying to create sparkles, little specular highlights on water surface, what I am having looks more like a flat disc with little distortion.
I am using fresnel term to blend refraction and reflection maps, should I use this for specular heighlights too?
0

Share this post


Link to post
Share on other sites
Hi Hiyar, I can see now what needs improvement. You said you wanted more noise, that it's looking "flat" the way it is. What you're missing right now is one major coloring factor: the lighting. All the noise you need is stored in those animated normal-maps; you just need something to [b]compare[/b] them with.

There is a quick and easy way to implement something in this style. I'd like you to do the following:

• Define the sun's vector. This is a constant Float3 value, with a negative Y axis since it's pointing down. Prefer a vector that points in the same direction as the sun in your environment.

• Choose a deep-water color. This is a constant Float4 value. I suggest something in the lines of RGBA (0.0, 0.23, 0.31, 1.0).

• Compute the Dot product of the sun's vector with the current fragment's normal (taken from the animated normal-map), but transfer the result to the '1.0 ~ 0.0' range:
[code]
float lighting = (dot(sunVector, normalSample.rgb) + 1.0) * 0.5 // Transfer the dot result from '1.0 ~ -1.0' to the '1.0 ~ 0.0' range.
[/code]
• Add a small offset to the lighting factor so the water doesn't perfectly reflect the environment - so it doesn't look like a flawless mirror:
[code]
lighting = max(lighting - 0.1, 0.0)
[/code]
• Use that computed lighting factor to Lerp between 'deep-water color' and 'reflection map':
[code]
return lerp(deepWaterColor, reflectionSample, lighting)
[/code]
• Consider that Lerp as your final fragment color.

This doesn't represent what goes on in reality, but it's a good substitute. If this doesn't look good I'll suggest you another method.
If you can, please post a picture of above in action so we can see if it's working.
0

Share this post


Link to post
Share on other sites
I am not sure if I understand you correctly.
What exactly do you mean by deepwater color? I am using height based fog for underwater and I am using refraction map too.
You can not see this in the picture maybe
See [url="http://imageshack.us/photo/my-images/39/waterd.jpg/"]this[/url]

for the lerp blending I am using fresnel term.
I think I am just going to experiment with different normal maps, should I use fresnel for this additional specular highlights too?
0

Share this post


Link to post
Share on other sites
To me it looks fine. It looks like weak waves in a pond. Do you want more ocean shiny specular? You could scale your UV to tile over the water more then to get more detailed specular.
0

Share this post


Link to post
Share on other sites
Ok, since you have refraction and an ocean floor neatly set up I see why you're preferring to use fresnel. I suggest making the ocean floor [i]very dark[/i], so you have enough contrast against the lighter parts of the water or else it'll keep flat the way it is - so far the only part where we see the normal-map noise is at the reflected sun; you need a darker ocean floor so the other parts are visible as well.

You should also make it greener:

- Look at the first [url="http://imageshack.us/photo/my-images/847/waterm.jpg/"]screenshot you posted[/url].
- Then look at this one from real life: [url="http://i39.tinypic.com/348hjs7.jpg"]http://i39.tinypic.com/348hjs7.jpg[/url]. Your ocean floor should look as dark as the part that's shadowed by that boat. Notice how the back of every wavelet is colored by that. 
0

Share this post


Link to post
Share on other sites
My real-life reference is a lagoon-like environment [url="http://www.holidaycheck.de/vollbild-Aitutaki+Aitutaki+Die+Lagune-ch_ub-id_1156180172.html"]click[/url]
But yes I could indeed try to use better colors.
thanks
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