PDA

View Full Version : Visualizing of same colored surface



diego2k
08-22-2012, 02:38 PM
Hey,
I have an terrain thats completely red or blue or something(the GL_COLOR_ARRAY)
and I want to draw this that way that you can see the surface ...

I have tried different light positions e.g. the camera position or directed light to the camera view direction, I have tried
different materials etc. but every time something did not fit correctly, sometimes parts of the surface are to bright or to
dark ...
is there a way to go, for something like that
or how can I do that?
thanks!

Carmine
08-22-2012, 04:18 PM
Post some pictures. That will help us to help you.

diego2k
08-23-2012, 11:53 AM
857

it's still hard to see every detail, but this is my best attempt so far ...

Carmine
08-23-2012, 02:52 PM
That's not all that bad. Seems like you've got the lighting and surface normals set up correctly.

Some ideas:

1) Looks like the light source is coincident with the camera. Try putting it to the side.

2) I'm not seeing specular highlights? Why not? Have you suppressed them?
Highlights would provide more visual cues about the shape of the surface.

3) It might help if you posted the code where you define the red material and the lighting.

4) If you made the ambient red color darker, it might show surface features more clearly too.


Good luck.

Rosario Leonardi
08-23-2012, 04:20 PM
You must understand what you want to achieve.
Point light have a decay that you can set. Using decay to simulate a physics correct behavior it's not easy. You'll need tonemapping and gamma corrected buffers. Otherwise you have to fine tune your light parameter using non physics decay until you are happy with them. Same problem with spot light.
Direct light are easier to manage, it's only direction x normal lighting without any decay, they are supposed to be used to simulate the sun (LOL). Again, If you want a physics correct behavior it's pretty hard. If you want to tune the parameter use some GUI, it will speed up the work a lot giving you more satisfying results.

You are using fixed pipeline function of shaders? With shader you can compute the lighting on the pixel with the normal correctly interpolated, this usually give better visual appeal.

diego2k
08-25-2012, 03:14 AM
tanks!

1) Looks like the light source is coincident with the camera. Try putting it to the side.

2) I'm not seeing specular highlights? Why not? Have you suppressed them?
Highlights would provide more visual cues about the shape of the surface.
the program can load every possible terrain, so I can't place the light to a fix point.
I use specular highlights, in the right angel you can see it.


Using decay to simulate a physics correct behavior it's not easy.
I think this would be overkill, it's not necessary that the mesh look physically correct.

so I'll try to tune the parameters