• Content count

  • Joined

  • Last visited

Community Reputation

149 Neutral

About PandaProtector23

  • Rank
  1. PCF Soft Shadow

    Okay i have successfully implemented VSM shadow : [url=""][/url] Now i want to use cascading or parallel split to do bigger map, should i implement that first or multitexturing? (ex: put a brick decal on the wall) thank you
  2. PCF Soft Shadow

    I have try Variance shadow map on the small map (the 5x6 one) here is the result: [url=""][/url] it's kinda weird, i'm probably doing something wrong. and thank you for the cascaded shadow map, i have start reading on it. Just to make sure i understand, i should try to render the small map perfecly with VSM then try to add more block and bigger construction and implemented cascading shadow map?
  3. PCF Soft Shadow

    Hi guys. I'm posting concerning shadow implementation. I have try to implement [font=Arial][size=2]soft shadows with PCF. I have test with 2 "map" size and i haven't got the result that i was expecting.[/size][/font] [font=Arial][size=2] [/size][/font] [font=Arial][size=2]Here its a map of 5X6 cube[/size][/font] [url=""][/url] Here its a map of 10X12 cube [url=""][/url] I haven't change anything except the 3d objects that are create. What should i change to be able to render more objects or bigger objetcs? Thank you. [img][/img]
  4. OpenGL OpenGL lighting

    yes i'm posting again. Now i have improve a bit my shadow again but i really need someone to help me figure 2 or 3 thing. You can see a big part of my source code here: [url=""][/url]. I still have join some screenshot to show where I'm at with my work. okay what i need help with is: 1- find a place and a way to squeeze my texture back in the code. 2- find a way to use multiple light (should i use 1 shadowMap for every light or 1 per light) 3- You can see it on the screenshot 5 and 6, pass a certain point, the shadow just continue align the way it was before he pass the point. ps: i have delete all the screenshot from my other post to keep the post as clean as possible (it's not an album )
  5. OpenGL ProjectionMatrix

    In your opinion, is it whats happening here? (in the screenshot i have join) Am i using a too wide angle light source and that's why shadow near the light look nice but as soon as i get too far, it's acting weird? I'm sorry that this post really start to look like [url=""][/url], but at the beginning it was suppose to be a totally different question.
  6. mmmm..... shadow......
  7. OpenGL OpenGL lighting

    Hi. I'm posting this for those interested. I have understand what my mistake was in the last post (the weird looking shadow effect). I was using wrong projectionMatix and viewMatrix for my light, resulting in a non-sense shadow effect. Right now, it look a lot better than it was, but i still have unusual shadow pattern and the shadow that are far still don't make sense. Someone told me that if i'm using shadow that are too far, i needed to cut my map in section and render shadow separately on every section. Someone know another technique? I have implement a little red square that mark where the light is and key handler to move the light and camera around. I have taken other screenshot to show what i'm trying to explain.
  8. OpenGL ProjectionMatrix

    Oh okay sorry. What i really want to know is: what is needed to calculate a projection matrix and how do you calculate it. I just give my light and camera in example because i though the projection matrix was dependant on the viewMatrix. I'm asking because i'm trying to implement shadow mapping in my engine, and i really see a difference when i play with the projection matrix of the light point of view but i don't quite understand what i actually do. p.s sorry for bad english
  9. OpenGL ProjectionMatrix

    If it's not dependant on position and direction what is it dependant on?Okay but what if i change my value for gluPerspective([color="#ff0000"]90[/color].0f, (float)windowWidth/windowHeight, 1.0f, 100.0f); because in my opinion it should be 90 for the half angle because i want to display a 180degree view right? and say that i do the same for a light. It's the lookAt that doesn't seem right to me: VECTOR3D lightPosition(50.0f,-10.0f,15.0f); glLoadIdentity(); gluPerspective(90.0f, (float)windowWidth/windowHeight, 1.0f, 100.0f); glGetFloatv(GL_MODELVIEW_MATRIX, lightProjectionMatrix); glLoadIdentity(); gluLookAt( lightPosition.x, lightPosition.y, lightPosition.z,lightPosition.x, lightPosition.y, 0, 0.0f, 1.0f, 0.0f); glGetFloatv(GL_MODELVIEW_MATRIX, lightViewMatrix); i want it to be the same, a light that point toward the ground to light up a room.
  10. OpenGL ProjectionMatrix

    Hi guys, i'm trying to figure out the math behind finding a view matrix and a projection matrix. Okay here are my constant int windowWidth = 640, windowHeight = 480; VECTOR3D cameraPosition(50.0f,-10.0f,50.0f); VECTOR3D cameraTarget(50.0f,-10.0f, 0.0f); so simply a camera that look right to the ground (sort of top-down view) i determine is viewMatrix with gluLookAt(cameraPosition.x, cameraPosition.y, cameraPosition.z, cameraTarget.x, cameraTarget.y, cameraTarget.z,0.0f, 1.0f, 0.0f); how am i suppose to determine the camera projection matrix? i use gluPerspective(45.0f, (float)windowWidth/windowHeight, 1.0f, 100.0f); Is it the right way to do it? Thank you [img][/img]
  11. OpenGL OpenGL lighting

    Okay. I have implement a shadow map (well i've try) and the light is acting very weird. I have join a screenshot. What do you think this problem is associate to. Oh and now i don't have texture at all and it's normal because i've decide to try with a textureless version of my map first. Thank you. second screenshot is when i use GLfloat spot[] = {50.0f}; glLightfv(GL_LIGHT1, GL_SPOT_CUTOFF, spot);
  12. OpenGL OpenGL lighting

    Hi again, i've look into shadow mapping and decide to go with it in my project. Do you know a basic OpenGL shadow mapping tutorial or example? I've try to understand the Paul's Project tutorial ([url=""][/url]) but i'm having difficulty to compile is code. He's using the extension [font="Arial"][size="2"]ARB_depth_texture and ARB_shadow[/size][/font][font="sans-serif"] [/font][font="Arial"][size="2"]with GLee [/size][/font][font="sans-serif"] [/font]and my IDE doesn't seem to appreciate it . Maybe someone have already hit the same problem as me or know another tutorial that is similar but not using GLee. Thank you
  13. OpenGL OpenGL lighting

    Okay thank you i'm looking into it right now. If i have some problem i will post again. Thank you
  14. OpenGL OpenGL lighting

    Hi guys, it's my first post here [img][/img]. A month ago i've start developing a game project with c++. I was aiming for 2D graphic and was using the Allegro Library. But, after some research on google, i found a game called Subvein, develop by Ben Johnson. And the graphic were very similar to what i needed for my game. So i've restart my project using OpenGL. Right now i'm working on the graphic engine. I want my game to be a top-down, tile base shooter. Right now, i can generated a map made of cube and apply texture to it. Now come the lighting effect. I've try to implement a basic lignting effect but i'm having some issue. The light just go through the cube i have draw and that make no sense to me. Since i'm new with 3D programming and OpenGL, i though maybe you guys can help me. I have join 1 screenshot showing the actual problem (don't mind the texture i was just too lazy to draw them now) and 1 paint image showing how i want the light to react. The red dot on both image show where the light source is. The light source is low enough so it's not lighting the top of the wall but mysteriously, it go across. If you need more info on what i'm using or what my code looks like, i will edit with all the information needed. thank you ps. sorry for my bad english, i'm a french canadian.