• Create Account

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

6 replies to this topic

### #1JohnnyCode  Members   -  Reputation: 236

Like
0Likes
Like

Posted 01 October 2013 - 03:32 PM

I tried to google this topic, and nothing comes out. I would like to know wheather some of you know about this topic anything, and could explain the principels of this shading technique. This technique primises to create shadows on a geometry without a light being present. I cannot imagine how though.

### #2unbird  Crossbones+   -  Reputation: 3467

Like
0Likes
Like

Posted 01 October 2013 - 04:43 PM

Yeah, like about only 60000 hits.

Looks like using the view normal to lookup into a spherical texture.

### #3cowsarenotevil  Crossbones+   -  Reputation: 1718

Like
1Likes
Like

Posted 01 October 2013 - 05:38 PM

Yeah, like about only 60000 hits.

Looks like using the view normal to lookup into a spherical texture.

Yeah, I'm pretty sure it's ultimately identical to any other kind of environment mapping (cube mapping, sphere mapping, etc.) in that it's ultimately just a function that maps angle to color. The only advantage I see is that it represents the function in a fairly intuitive way (and it's easy to capture from paintings, photographs, etc. of a spherical object) and that it stores the most resolution for angles that point toward the camera. The disadvantage is that it's actually only half of an environment map.

-~-The Cow of Darkness-~-

### #4JohnnyCode  Members   -  Reputation: 236

Like
0Likes
Like

Posted 03 October 2013 - 09:03 AM

is it not just a single view space normal dot product over a view space constant vector? Where is cube map involved?

### #5WarAmp  Members   -  Reputation: 575

Like
1Likes
Like

Posted 03 October 2013 - 11:35 AM

You may also try searching the term "MatCap" or "Material Capture" as this is very similar (if not the same) as that. Render your lights and material to a sphere, then use that resulting image as your lighting environment. Essentially you are precomputing light+material interaction for lights fixed to the viewpoint.

Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.

### #6JohnnyCode  Members   -  Reputation: 236

Like
0Likes
Like

Posted 03 October 2013 - 01:11 PM

this seems extremly limiting though. I thought lit sphere is some sort of universal lightless geometry shading without texture resources involved.

### #7unbird  Crossbones+   -  Reputation: 3467

Like
1Likes
Like

Posted 03 October 2013 - 01:50 PM

I guess so. And no, it's texture based (not a cubemap, but, erm, dunno, hemisphere map probably). I had to play with this. Here I found the texture I used. There's also a link to a paper. The shader is a bit weird, I think it has to be wired up for that tool Fusion.

Anyway. Using the view space normal on a sphere (here visualized)

yields the hemisphere map itself.

Using a better model

Hmmm, nice:

The shader is quite simple. Ignore z of the view space normal and bring it into texture space.
float2 tex = float2(normal.x, -normal.y) * 0.5 + 0.5;
return LookupTexture.Sample(Sampler, tex);
Doesn't work that great for a moving camera. The light moves with you. Also this texture has bumps which produces very noticable artifacts. Yeah, limiting, but also very cheap. Could be useful for a fixed camera e.g. some 2.5-D setup I guess.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS