Gradients
Author |
Message |
Carey

|
Posted: Fri Jul 04, 2008 3:32 pm Post subject: Gradients |
|
|
Hey everyone. I am working an a 3D model editor and I want to display the model using shading based on lighting. I have all the formulas and infrastructure needed to display the model, but i cant figure out how to make an array of colors that make up a gradient from black to the base color of the model to white. I know that in order to do this I need to make 2 gradients: one from black to the base color and the other from the base color to white. I have tried looking through the Java API, but it seems all there is is the built-in class for painting shapes with a gradient. Does anyone know a formula or segment of code that will accomplish this task? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Carey

|
Posted: Sun Jul 13, 2008 4:34 pm Post subject: RE:Gradients |
|
|
***BUMP***
Wow, Java threads are dead. Anyone? |
|
|
|
|
 |
btiffin

|
|
|
|
 |
DemonWasp
|
Posted: Mon Jul 14, 2008 8:19 am Post subject: RE:Gradients |
|
|
I think you need to be more specific about what existing technology you're using. If you're rolling your own 3d engine, then there's little chance you'll find the help you need here - you'll need to get a book. If you're using an existing 3d engine (for example, http://www.jmonkeyengine.com/ ), then you're probably better off asking on their forums. |
|
|
|
|
 |
|
|