Results 1 to 5 of 5

Thread: OpenGL help

  1. #1
    Pajo's Avatar
    Join Date
    08 Apr 06
    Posts
    35,934
    Thanked
    20,800 times
    Fav. Player
    Sergio Aguero!

    Macedonia

    10 years of FIF

    OpenGL help

    So, anyone knows this shit? This is the real graphics in computer science

    Im asking since i need help.. :/
    "This wonderful night will give us the colours for our crest: black and blue against a backdrop of gold stars. It will be called Internazionale, because we are brothers of the world."

    Derby d'Italia, why the rivalry?
    My message to JuBe cunts

  2. #2
    Somebody stop me! Devious's Avatar
    Join Date
    01 Oct 06
    Posts
    11,470
    Thanked
    22,811 times
    Fav. Player
    Javier Zanetti

    Egypt

    Nicest Poster
    What do you need?

    Shit doesnt happen

  3. #3
    Wallace
    Join Date
    18 Jun 05
    Posts
    11,214
    Thanked
    10,241 times
    Fav. Player
    Wallace
    Old name
    Wallace

    Brazil

    88 Forum Supporter 10 years of FIF
    Post the problem and your code, and the problem you are having with your code.

  4. #4
    Pajo's Avatar
    Join Date
    08 Apr 06
    Posts
    35,934
    Thanked
    20,800 times
    Fav. Player
    Sergio Aguero!

    Macedonia

    10 years of FIF
    I've done what i needed

    If i need something later, i'll just post. The code is HUGE, 2k lines, no point of posting it. Maybe just the part that need fixing.

    I needed to draw house, with walls, doors, windows and all.. Around it to have a path, that leads to the front door, and a parking space. And also, grass, and fence. Everything covered with textures.

    I needed to make the ambient low, so it looks like evening, but not completely dark, so that i can see the textures well. I needed spotlight, stationed over the house, and illuminate around it. I also needed to put shadows, for the house and the fence.

    I did all of that. What i had problems to do, is to make the spotlight rotate around the scene. Ok, that was easy, but what i couldnt do is to direct it towards the house all the time. It needed to illuminate the house all the time, no matter where it's position is. That was the hard part. I couldnt make it, so i asked my prof if i could just enlarge the radius, and he said it's fine, till it illuminates the house. So i got 100 points of 100
    "This wonderful night will give us the colours for our crest: black and blue against a backdrop of gold stars. It will be called Internazionale, because we are brothers of the world."

    Derby d'Italia, why the rivalry?
    My message to JuBe cunts

  5. #5
    Wallace
    Join Date
    18 Jun 05
    Posts
    11,214
    Thanked
    10,241 times
    Fav. Player
    Wallace
    Old name
    Wallace

    Brazil

    88 Forum Supporter 10 years of FIF
    If you set GL_POSITION with w=0, the spot light will be treated as a directional light, so the shading would not take the actual position of the light source into account.

    If you are taking the position of the spot light into account, and if the radius of the rotation is small, then the house's front face won't be lit, but instead it would the back facing polygons would be lid. So you did the right thing there.

    What approach did u do the shadows? Shadow mapping or stencil volume?

Posting Permissions

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