A New Discussion From Me.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: A New Discussion From Me.
You mention an orthogonal projection, you do know that this is only for directional lights right? Spotlights require a perspective projection with a correct FOV according to the angle your light covers
-
- Posts: 49
- Joined: Tue Jan 18, 2011 12:35 am
Re: A New Discussion From Me.
What about point lights? and why exactly would a spot light 'require' persay, a prospective projection?
Trying to figure all of this out, is killing me, because several books go over the techniques, but don't describe how they came out to use certain values for certain situations.
I'd kill to have a chat just straight about how everything should be handled per a light and per a light type, not considering anything even related to make it none pixelated.
Trying to figure all of this out, is killing me, because several books go over the techniques, but don't describe how they came out to use certain values for certain situations.
I'd kill to have a chat just straight about how everything should be handled per a light and per a light type, not considering anything even related to make it none pixelated.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: A New Discussion From Me.
You have to look at it like this:
A directional light is perceived as being infinitely far away and not having a fixed position but just a direction, hence the name directional light. Because of this all incoming light rays will be parallel. Objects do not seem to get smaller based on their distance from their view point in this kind of projection. You could compare this to sunlight which, because of the large distance from our earth, seems to distribute light in a parallel fashion. This is exactly how an orthographic projection works, since in a orthographic projection all projection lines are parallel to their projection plane
Spot lights however have a known position in space, so your light rays originate from a single point. If you would look at your light as a camera, the light would "see" objects that are far away as smaller compared to objects which are closer, just like human vision does
This is a perspective projection (a 3-point perspective projection to be correct), where alle projection lines converge into a single point called a vanishing point
Point lights can be handled in many ways. Using 6 textures is a possibility and gives good quality, but has large memory requirements and will require you to draw your geometry an additional 6 times. Another popular possibility is dual paraboloid mapping, which only requires 2 textures, but is a bit harder to set up and will generally give less optimal results. The required projection depends on the setup you're using
A directional light is perceived as being infinitely far away and not having a fixed position but just a direction, hence the name directional light. Because of this all incoming light rays will be parallel. Objects do not seem to get smaller based on their distance from their view point in this kind of projection. You could compare this to sunlight which, because of the large distance from our earth, seems to distribute light in a parallel fashion. This is exactly how an orthographic projection works, since in a orthographic projection all projection lines are parallel to their projection plane
Spot lights however have a known position in space, so your light rays originate from a single point. If you would look at your light as a camera, the light would "see" objects that are far away as smaller compared to objects which are closer, just like human vision does
This is a perspective projection (a 3-point perspective projection to be correct), where alle projection lines converge into a single point called a vanishing point
Point lights can be handled in many ways. Using 6 textures is a possibility and gives good quality, but has large memory requirements and will require you to draw your geometry an additional 6 times. Another popular possibility is dual paraboloid mapping, which only requires 2 textures, but is a bit harder to set up and will generally give less optimal results. The required projection depends on the setup you're using
-
- Posts: 49
- Joined: Tue Jan 18, 2011 12:35 am
Re: A New Discussion From Me.
Hmm, I hadn't really thought about it like that.
I owe you one for helping me through my troubles, Radikalizm, thanks.
I owe you one for helping me through my troubles, Radikalizm, thanks.
Re: A New Discussion From Me.
dual paraboloid sucks for deferred as your per-pixel projection will not match up with the sucky rasterization of triangles in non-linear projection (so you must tesselate triangles to get reasonable shadows)
Use geometry shaders and MRT to do all 6 passes for the cubemap AT ONCE
Use hemicube projection
---I have a super-awesome algo which only requires 4 passes
Use geometry shaders and MRT to do all 6 passes for the cubemap AT ONCE
Use hemicube projection
---I have a super-awesome algo which only requires 4 passes
-
- Posts: 49
- Joined: Tue Jan 18, 2011 12:35 am
Re: A New Discussion From Me.
Haha, I'm actually not looking into deferred rendering atm, just basic forward rendering. I'm trying to figure out what Radikalizm means by "Spotlights require a perspective projection with a correct FOV according to the angle your light covers" I haven't been able to find anything on google about setting the FOV according to the spot light's angle.
However, thanks for the tip.
However, thanks for the tip.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: A New Discussion From Me.
It's actually rather simple
A spotlight defines 2 angles, an angle for your inner cone and one for your outer cone.
The ICameraSceneNode interface provided by irrlicht has a method called setFOV(...), this takes a Field-of-view angle in radians
If you know that the outer cone angle represents the angle the light coming from your spot light can reach, and if you know that the camera FOV determines the viewing angle for a certain camera, then how can you get these 2 to work together? (hint: it's really simple)
A spotlight defines 2 angles, an angle for your inner cone and one for your outer cone.
The ICameraSceneNode interface provided by irrlicht has a method called setFOV(...), this takes a Field-of-view angle in radians
If you know that the outer cone angle represents the angle the light coming from your spot light can reach, and if you know that the camera FOV determines the viewing angle for a certain camera, then how can you get these 2 to work together? (hint: it's really simple)
-
- Posts: 49
- Joined: Tue Jan 18, 2011 12:35 am
Re: A New Discussion From Me.
I thought you meant something entirely different from that, hahaha. Now I feel, entirely retarded.
Sorry I didn't respond sooner, I was watching the SOPA debate, praying such a retarded thing doesn't get passed. -sigh-
Sorry I didn't respond sooner, I was watching the SOPA debate, praying such a retarded thing doesn't get passed. -sigh-
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: A New Discussion From Me.
Fingers crossed over here too!LookingForAPath wrote:Sorry I didn't respond sooner, I was watching the SOPA debate, praying such a retarded thing doesn't get passed. -sigh-
-
- Posts: 49
- Joined: Tue Jan 18, 2011 12:35 am
Re: A New Discussion From Me.
Hahah, good to know, very good to know. I think Zoe Lofgren(hope I spelled her last name right) kinda finished it off with the point on DNS' design and how it'll affect the whole structure of society. I mean honestly, the government already has enough control on the internet here in the USA, they just don't use it. I understand they wish to prohibit downloads, but its impossible to completely block us off, however it is possible to track what citizens downloaded such content, target the offenders specifically would take a lot of resources, but at least it wouldn't hinder every US citizen. (Sorry for the rant and getting off topic)