🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
drawing only outlines
lets say we have a particle system of circles that can pass through each other. each circle is colored green, with a bright red outline around it.
ok, when two of the circles overlap, i want them to still be colored green, but only their combined outlines colored red. and if you had a bunch of them overlapping then only the outline of the combined balls would be colored.
if that doesnt make sense, just let me know, and i''ll try and draw a picture of what i mean and post it here.
- jeremiah
http://fakemind.com
Render the outlines first, and then the circles will cover up any that aren''t around the edges^^
-Deku-chan
DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)
-Deku-chan
DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)
yeah but then the outline of one circle will 'cut' through the other circle.
the way I have done this kind of thing in the past is to create a new outline for the shape by using line intersection algorithms to find where the outlines intersect each other.
add points to the new outline where the intersections occur and discard any information that lies 'within' the new shape.
Make sure each shape is clockwise oriented (or anti-clockwise) so that as you follow the shapes round point by point you are always going round in the same direction.
Edited by - JY on December 5, 2001 2:53:13 PM
the way I have done this kind of thing in the past is to create a new outline for the shape by using line intersection algorithms to find where the outlines intersect each other.
add points to the new outline where the intersections occur and discard any information that lies 'within' the new shape.
Make sure each shape is clockwise oriented (or anti-clockwise) so that as you follow the shapes round point by point you are always going round in the same direction.
Edited by - JY on December 5, 2001 2:53:13 PM
quote: Original post by JY
yeah but then the outline of one circle will ''cut'' through the other circle.
NO!
Read it again.
Bad ASCII art follows:
-Snork
"Get busy livin, or get busy dyin."
Edited by - Snork on December 5, 2001 4:08:21 PM
Draw the outline of the first circle #### # ## # # # ####Draw the outline of the second circle (causing overlap) ######## # ## ## # # # # ## # ########Draw the fill for the first circle ######## #****# ##******# # #****# # ########Draw the fill for the second circle ######## #********##**********# #********# ########
-Snork
"Get busy livin, or get busy dyin."
Edited by - Snork on December 5, 2001 4:08:21 PM
It''s from one the best movies ever made, Shawshank Redemption.
Always remember, you''''re unique. Just like everyone else.
Always remember, you''''re unique. Just like everyone else.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement