Jump to content

  • Log In with Google      Sign In   
  • Create Account


REF_Cracker

Member Since 22 Feb 2000
Offline Last Active Today, 04:30 PM
-----

Posts I've Made

In Topic: Reconstructing Position From Depth Buffer

28 July 2014 - 07:28 PM

Hi BlueSpud,

 

It's actually quite simple to understand if you think of it this way to retrieve a viewspace coordinate.

 

- the screen coordinate comes in as 0 to 1 in x and y
- you remap that to -1 to 1 like so.... screencoord.xy * 2 - 1 (migth have to flip the sign of the results depending on API)
- you now have an xy value you can picture as laying on the near plane of your camera....so the z coordinate of the vector is whatever your near plane value is.
- you now have to figure out how to scale the -1 to 1 xy values properly to represent the dimensions of the near plane "quad" in view space... this is easy
- you just use some trig to figure out the width and height of the "quad" at the near plane.... basically it's .... tan(FOV * 0.5) * near
- also you'll have to multiply that by the aspect ratio for x probably.

- now after you do all this you will have calculated a vector from the eye to the near plane.
- you just have to now scale this vector by whatever the depth of that pixel is..... you'll have to account for the ratio of how close your near plane is

basically that's how you think of it... if you draw some pictures you should be able to get it..
in order to recover in another space... it's basically the same... but you move along the axis directions in x/y/z then add the eye position.


In Topic: Ideas for rendering huge vegetation (foliage)

02 June 2014 - 05:22 PM

You may find this recent series of devblog's by Casey Muratori interesting. He goes into detail about his grass planting system. Less about the rendering side of things and more about proper placement of the ground cover itself to get the best coverage with the least amount of geometry. I don't think he goes into anything about LOD.. but it does get you thinking about how to provide the best coverage.

 

Starts in "Working On The Witness, Part 5" and continues on through his reasoning into part 8 where he has some code for optimal placement.

 

http://mollyrocket.com/casey/index.html


In Topic: Doing local fog (again)

25 May 2014 - 12:02 PM

Hey there. This came out a week ago.. May be of interest to you. There's some good videos on the site so you can see if the effect is to your liking before even reading the paper. It's essentially a ray marching post process. I believe he's working on a demo to come as well which will be nice.

http://bglatzel.movingblocks.net/publications/


In Topic: Image Based Reflections - DX11

08 October 2013 - 09:10 PM

Okay so it's been a few weeks but I'm back on this task.

Trying to implement an area light to begin with as per Hodgman's advice.

I was wondering ... for the area light's diffuse calculation it seems people are using the vector from the point being shaded to the closest point on the area light quad.

This results in a dot product of zero when the area light quad is at a right angle and close to the surface being shaded. And thus results in a diffuse term of 0.

Are there ways around this?


In Topic: Specular light color (float vs float3)

16 July 2013 - 04:16 PM

Hi Cozzie,

Read some articles on Physically Based Shading and you'll get a good idea of how all this works.

These two blog posts are a great starting point

http://seblagarde.wordpress.com/2011/08/17/hello-world/
http://seblagarde.wordpress.com/2011/08/17/feeding-a-physical-based-lighting-mode/
 

As well as

 

Crafting Physically Motivated Shading Models for Game Development (Naty Hoffman)

http://renderwonk.com/publications/s2010-shading-course/

There's a fair amount of information about this out there. It'll take a bit of reading but once you grind through it you'll understand a lot more about how it all fits together.

Greyscale specular was used mostly in light prepass renderers to cut down on bandwidth by storing only diffuse in rgb and specular in the alpha channel of the accumulation buffer.

 


PARTNERS