Results 1 to 5 of 5

Thread: Clipping of some sort?

  1. #1
    Member Contributor
    Join Date
    Jan 2002
    Location
    Vancouver, Wa, USA
    Posts
    54

    Clipping of some sort?

    First off, look at this image to get a clear idea of what I'm talking about:
    http://home.attbi.com/~snoooper/Image2.gif

    Now. Is there a way to clip off that cap? I want to turn it into a pond, then blit some twirling quads around it for a water effect... could someone give me some pointers / Hints / Ideas / Resources... Anything would help. Thx in advance!
    ==============

  2. #2
    Member Contributor
    Join Date
    Jan 2002
    Location
    Vancouver, Wa, USA
    Posts
    54

    Re: Clipping of some sort?

    Cmon' please... I need help here...
    ==============

  3. #3
    Member Newbie
    Join Date
    Mar 2001
    Location
    New Zealand
    Posts
    39

    Re: Clipping of some sort?

    If I understand right you want to create a pond in the middle of your landscape. You can't just clip that part or your polygon out since OpenGL only works with convex polygons. In other words instead of drawing one large quad and trying to cut a bit out draw lots of smaller ones leaving a hole in the center.

    ________________
    |______/\_______|
    |_____/**\______|
    |_____\**/______|
    |______\/_______|

    My crude ascii drawing might help(__ polygons, *** water part)

    I have a feeling you might have thought of this idea but hoped there was a better way, anyway I hoped that helped.



    [This message has been edited by Brent Fogarty (edited 04-23-2002).]

  4. #4
    Member Contributor
    Join Date
    Jan 2002
    Location
    Vancouver, Wa, USA
    Posts
    54

    Re: Clipping of some sort?

    the problem is that I have a quad over 6000 x 6000 and the lake is about 50 in diameter. I do not want to mess up my textures....
    ==============

  5. #5
    Member Newbie
    Join Date
    Mar 2001
    Location
    New Zealand
    Posts
    39

    Re: Clipping of some sort?

    Texture coord's are no problem that's just a simple calculation to find the new ones.

    To do what you want can actually be done but I didn't mention it before because it will create an even bigger problem. You could I spose disable the colour writes and enable depth writes and draw a circle where the pond should be first then enable colour writes again and draw your quad. Because the circle would be on the same plane as the terrain that part of the terrain wouldn't be drawn because it wouldn't be infront of the circle. This will create more problems than it solves though when it comes to drawing other objects latter on so this is not practical.

    In short split you quad up or draw your pond slightly above your terrain quad.

Similar Threads

  1. how to sort points set by CCW or CW?
    By jdz_simon in forum OpenGL: General
    Replies: 10
    Last Post: 12-13-2016, 10:54 AM
  2. Some sort of blending?
    By Gavin in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 08-18-2006, 05:24 AM
  3. How to sort vertexes?
    By christus in forum OpenGL: General
    Replies: 4
    Last Post: 03-26-2006, 07:32 AM
  4. Replies: 1
    Last Post: 09-02-2003, 01:45 PM
  5. Can you help me sort out a discrepancy?
    By OscarMayer in forum OpenMAX
    Replies: 0
    Last Post: 12-31-1969, 07:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean