help: local fog + semisphere surface

Hello, I just started using opengl, maybe the title is a little confusing. I have some questions here:

  1. I read the fog chapter in NeHe’s tutorial (lesson 16), is there a way to have fog effects in a small region rather than on the whole screen?

  2. How can I plot a surface (wire or fill) of a semisphere?

Thanks a lot for your answer!

Hi Ho

for your fog question I don’t know, read the redbook, it’s the reference :slight_smile:

to construct a semisphere you can use GLUT, in the redbook too…

About fog, you can enable/disable it to fog just the geometry you want, but it will not look like a fog in a fixed place.
You may find some demos with cases likes layered fog, fog in a cubic shape and such, but in the general case it is complex, and needs some raycasting and/or advanced computations in shaders.

Thanks for the replies.

I think the fog is beyond my reach. But I figured out how to draw a wireframe of a semisphere–just manually plot every point I want…