Results 1 to 2 of 2

Thread: making cut faces visible

  1. #1
    Junior Member Newbie hoschie211's Avatar
    Join Date
    Oct 2009

    making cut faces visible

    hello everyone,

    my task is it to render the cut faces of the intersection of two objects.

    the first object is a given, rather complex cad model and from this model i want to cut out a cuboid.

    i have accomplished to cut out everything from the model, that lies in the cuboid, with a simple fragment-shader. but now i am looking at the backside of the cad model. (if the cuboid is not completely in the model).

    so is there a way to draw the cut faces? (without geometry shaders)

    I am thankful for any kind of help.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2006

    Re: making cut faces visible

    yea, the traditional way is to use the stencil buffer.
    when you render your object you make sure that frontfaces set the stencil to 0 and back faces set it to 1.
    Once that is completed you will have a stencil cutout in witch you then render the inside of the cuboid with the faces reversed, that would be your cut faces, add a little "cut metal painted red" texture to it and your good to go.

Similar Threads

  1. Front faces, back faces and edge-on faces
    By sam_hawker in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 02-23-2017, 07:24 AM
  2. Making a glTriangle visible on both sides
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-06-2006, 11:47 PM
  3. Nothing is visible
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-07-2005, 12:31 AM
  4. Normals :: Can't make back faces visible
    By Turbo in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 03-09-2005, 01:51 PM
  5. Select only visible faces (discarding the hidden)
    By mauro in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-11-2000, 03:19 AM

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