Jump to content
  • Advertisement

SixeliA

Member
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

100 Neutral

About SixeliA

  • Rank
    Member
  1. SixeliA

    landscape

    Hi , I have a landscape generated with a heightmap. I would like to know if it's possible to create some "cave" and how . Thanks, Alexis
  2. SixeliA

    3D stereoscopic + Motion Blur

    Yes I use .txt file in which you can write all the tracks informations (but I am not the one who wrote this part of the software) so you can create as many tracks as you want !
  3. SixeliA

    3D stereoscopic + Motion Blur

    I fixed it! In fact I needed to tell opengl which buffer I wanted to read ... For the right eye : glReadBuffer(GL_BACK_RIGHT); and for the left eye: glReadBuffer(GL_BACK_LEFT); thank you anyway! and good luck for your roller coaster !
  4. SixeliA

    3D stereoscopic + Motion Blur

    I am not a professional opengl user but I am not sure we can do that using the accumulation buffer (or at least I don't know how to do that) ... Edit : OK I'll try that thanks !
  5. SixeliA

    3D stereoscopic + Motion Blur

    No I'm doing it manually : glDrawBuffer( GL_BACK_RIGHT ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(...); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(...); drawEverything(); glAccum(GL_MULT, q); glAccum(GL_ACCUM, 1-q); glAccum(GL_RETURN, 1.0); glDrawBuffer( GL_BACK_LEFT ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(...); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(...); drawEverything(); glAccum(GL_MULT, q); glAccum(GL_ACCUM, 1-q); glAccum(GL_RETURN, 1.0); but it doesn't work at all. Obviously something is missing but I don't know what ... Do you have some screen-shot of your roller coaster ? (just curious )
  6. Hi, My software (a roller coaster simulator) uses 3D stereo. When the speed of the car increases, I would like to add a motion blur effect using the accumulation buffer. When 3D stereo is off it works well. The problem is that I don't know how to do the same thing with the 3D on (I have to display the scene for the right eye and the left eye differently). any help is welcome The code : glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); drawEverything(); glAccum(GL_MULT, q); glAccum(GL_ACCUM, 1-q); glAccum(GL_RETURN, 1.0);
  7. SixeliA

    OpenAL volume

    Hi ! For the sound effect of my software (a roller coaster simulator) , I use openAL. I want to control the volume with the speed of the car. What I do : alListenerf(AL_GAIN, gain); But I think i am changing the volume too fast because the result isn't good ... Is there another way to do the same thing ? (or another library) Thx!
  8. SixeliA

    Texture problem

    My big fail .... I fixed it just a problem of CTRL+C/CTRL+V ... I did : botLocation = glGetUniformLocation(fragshader,"bot"); instead of : botLocation = glGetUniformLocation(program,"bot"); Sorry !
  9. SixeliA

    Texture problem

    Thank you for the answer shader.frag : uniform sampler2D mid; uniform sampler2D bot; uniform sampler2D top; void main() { vec4 mid_color = texture2D(mid, gl_TexCoord[0].st); vec4 top_color = texture2D(top, gl_TexCoord[1].st); vec4 bot_color = texture2D(bot, gl_TexCoord[2].st); //Just to test vec4 final = 0.3*(mid_color+top_color+bot_color); gl_FragColor =final; } shader.vert : void main() { gl_TexCoord[0] = gl_MultiTexCoord0; gl_TexCoord[1] = gl_MultiTexCoord1; gl_TexCoord[2] = gl_MultiTexCoord2; gl_Position = ftransform(); } Locations : GLint topLocation, midLocation, botLocation; topLocation = glGetUniformLocation(fragShader,"top"); midLocation = glGetUniformLocation(fragShader,"mid"); botLocation = glGetUniformLocation(fragShader,"bot");
  10. SixeliA

    Texture problem

    Ok now I am using glsl (with Glee) and I have another problem. I try to load 3 textures but glActiveTexture dosen't seem to work. It only takes the GL_TEXTURE0 ... glActiveTexture(GL_TEXTURE2); glBmpBind(&mid); glActiveTexture(GL_TEXTURE0); glBmpBind(&bot); glActiveTexture(GL_TEXTURE1); glBmpBind(&top); glUseProgram(program); glUniform1i(midLocation,2); glUniform1i(botLocation,0); glUniform1i(topLocation,1); glUseProgram(0); Do you have any Idea ?
  11. SixeliA

    Texture problem

    Ok thank you! I am reading some tutorials about texture splatting !
  12. Hi guys! I am working on a roller coaster simulator. I want to load a landscape from a Height Map. To make it more realistic I would like to add 3 differents texture to the landscape . the problem is that it only takes the first texture ... This is what I am doing glEnable(GL_TEXTURE_2D); glColor3f(1.0f,1.0f,1.0f); glBmpBind(&bot); if(bRender) // What We Want To Render glBegin( GL_QUADS ); // Render Polygons else glBegin( GL_LINES ); // Render Lines Instead for ( X=0; X < MAP_SIZE; X += STEP_SIZE ) for ( Y=0; Y < MAP_SIZE; Y += STEP_SIZE ) { //Selection of the texture if(Height(pHeightMap, X, Y )<step) { glBmpBind(&bot); } else { if(Height(pHeightMap, X, Y )<2*step) { glBmpBind(&mid); } else { glBmpBind(&top); } } // Get The (X, Y, Z) Value For The Bottom Left Vertex x = X; y = Height(pHeightMap, X, Y ); z = Y; glTexCoord2f(0.0,0.0); glVertex3i(x, y, z); // Send This Vertex To OpenGL To Be Rendered (Integer Points Are Faster) // Get The (X, Y, Z) Value For The Top Left Vertex x = X; y = Height(pHeightMap, X, Y + STEP_SIZE ); z = Y + STEP_SIZE ; glTexCoord2f(0.0,1.0); glVertex3i(x, y, z); // Send This Vertex To OpenGL To Be Rendered // Get The (X, Y, Z) Value For The Top Right Vertex x = X + STEP_SIZE; y = Height(pHeightMap, X + STEP_SIZE, Y + STEP_SIZE ); z = Y + STEP_SIZE ; glTexCoord2f(1.0,1.0); glVertex3i(x, y, z); // Send This Vertex To OpenGL To Be Rendered // Get The (X, Y, Z) Value For The Bottom Right Vertex x = X + STEP_SIZE; y = Height(pHeightMap, X + STEP_SIZE, Y ); z = Y; glTexCoord2f(1.0,1.0); glVertex3i(x, y, z); // Send This Vertex To OpenGL To Be Rendered } glEnd(); (sorry for the indents and for my English ...) thx
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!