Aditya

04-22-2013, 05:29 AM

Hello

I am new to OpenGL. I managed to work with Texture. What I am trying is to make a texture representing the magnitude of pressure over a domain and then apply it on to the domain when rendering. I have the normalized pressure values[0,1] all over my 2d domain which essentially is a rectangular Cartesian grid.

I am doing some thing like take the value(normalized) and multiply it to (0.3, 0.58, 0.68) [a random vector] to generate RGB values for that point in the texture. But the result I see is very bad. Also it does not actually represent the pressure intensities on the domain but produces some random colors. Is there a better or simple way to do this? I see this nice red to blue color plots in softwares like paraview. How to generate such color plots in opengl.

Regards

Aditya

I am new to OpenGL. I managed to work with Texture. What I am trying is to make a texture representing the magnitude of pressure over a domain and then apply it on to the domain when rendering. I have the normalized pressure values[0,1] all over my 2d domain which essentially is a rectangular Cartesian grid.

I am doing some thing like take the value(normalized) and multiply it to (0.3, 0.58, 0.68) [a random vector] to generate RGB values for that point in the texture. But the result I see is very bad. Also it does not actually represent the pressure intensities on the domain but produces some random colors. Is there a better or simple way to do this? I see this nice red to blue color plots in softwares like paraview. How to generate such color plots in opengl.

Regards

Aditya