Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Visualizing of same colored surface

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    4

    Visualizing of same colored surface

    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!

  2. #2
    Intern Contributor
    Join Date
    Apr 2012
    Posts
    98
    Post some pictures. That will help us to help you.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    4
    Click image for larger version. 

Name:	okay.jpg 
Views:	42 
Size:	9.7 KB 
ID:	857

    it's still hard to see every detail, but this is my best attempt so far ...
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2.jpg 
Views:	28 
Size:	7.5 KB 
ID:	856  

  4. #4
    Intern Contributor
    Join Date
    Apr 2012
    Posts
    98
    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.

  5. #5
    Member Regular Contributor Rosario Leonardi's Avatar
    Join Date
    Aug 2008
    Location
    Italy
    Posts
    352
    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.
    ~ ~ I tell you, realtime 3D is made of blood, sweat and screams! ~ ~

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •