Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as off-topic by Anko, Josh Petrie Dec 17 '14 at 18:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Anko, Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the 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