   3D/2.5D brushes - drawing the outline of the brush on the target surface
  Hi Guys,I'm developing 3D editor, and we've got a "3D brush" type system in place, more clearly, it allows the user to use screenspace coordinates to "project" a brush onto a 3D surface. Imagine 3D painting on the surface of an object if you will.What I'm currently trying to figure out, is a good way to actually draw the brush overlay on the target surface.Pic: like the green outline you see in Crytek's Sandbox 2My first instinct is to use a projected texture, pretty simple to do, but for our system it's not "clean" enough - you would have to render the scene (mostly terrain and instanced objects) several times, we already render the scene a few times to help build other more core datasets, so I would really like to avoid this if at all possible.are there any other ways, I feel I should be able to use the stencil buffer in some way, but I don't have enough experience with it to know exactly how?Any suggestions are ofcourse welcome [smile]I have/will continue to [google] the topic, but so far, not much...Thanks,-Danu   
  From what I see I would think that they are solving this in 3D directly by drawing a real 3D circle. Just project the center point from the mouse onto your terrain and then draw a real 3D circle object there.Edit: Maybe disable depth reads to let the circle shine through your terrain and avoid overlapping terrain on your brush visualization.   ;  Yeh, if you want to use the stencil buffer, make a cone or cylinder with an inside and an outside the thickness you want the circle to be, then its a matter of shadow voluming it onto the surface.That way is guaranteed to work.If your not comfortable with using the stencil buffer, did you know you can also accomplish shadow volumes simply with shaders also.So look up a shadow volume tutorial and you should be able to apply it to a cone or cylinder to make the circle.   ;  Thanks for the replies guys, Yea I think stencil buffer is going to be the easiest and most precise method (I was worried a bit about the texture filtering being visible on a projected texture)-Danu   