Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

The material definition of a mesh is composed of these three components: Self-Illumunation, Refletcion and Refraction. Each of these components has a Gradient Ramp as a map and the mapping mode is set to spherical environment. I'm searching for a way to reproduce these effects in a shader (the shader language doesn't matter). Is it possible?

My first idea was to save the Gradient Ramp as a texture: you can see the result in the image below (reflection component):

Reflection Gradient Ramp

and using them in the shader through environment spherical mapping, but the result is wrong.

In this image you can see the original rendering (3ds Max, reflection component):

enter image description here

and in this image you can see my rendering:

enter image description here

The underlying idea seems to be correct, in fact there's a correlation between the two images but something goes wrong.

Thanks for any suggestion.

share|improve this question
    
What exactly is it that you're trying to do? Does your gradient ramp map control reflectivity, or provide an environment to be reflected? What kind of material are you using in 3ds max? –  melak47 Aug 18 '12 at 9:35
    
Could you try to create this texture with smaller light part and more of black border? Doesn't it resolve your problem? –  kolenda Sep 18 '12 at 10:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.