Jump to content
• Advertisement

#### Archived

This topic is now archived and is closed to further replies.

# 3D pipeline question

This topic is 6156 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

I know hardly anybody does this anymore, but I was thinking about software implementations of the 3D pipeline. One thing I was wondering about is what is the popular method of drawing your triangles after they have been clipped to the view frustrum? I mean, let''s say you have created a function that will draw and texture triangles to the screen. But, after you clip the edges of a triangle to the frustrum you are left with as many as 9 points and obviously not a triangle any more. So, what method do people use after this? Do they retriangulate the convex polygon that is left (say by fanning) and then just draw those triangles as usual? Or, is there a better way? I suppose you could write a function to draw arbitray convex polygons to the screen (where the triangle is a special case). That is probably the method I would use since creating a fanning triangulation would mean I would need the points of the clipped polygon in boundary traversal order... unless I kept track of that in the clipping maybe. Anyway, I''m just thinking out loud here. Any thoughts? I will dig through my Watt text in the mean time (not like I''m going to implement this in software any time soon). Abs www.freestandingentertainment.com

#### Share this post

##### Share on other sites
Advertisement
I believe that Jim Blinn''s "Dirty Little Pixel" or "A Trip Down the Graphical Pipeline" discuss'' how to do this.

#### Share this post

##### Share on other sites
All depends on the implementation of your rasterisation. At least one edge of your new n-gon is a straight edge which can be utilised for optimisation, however its likely to be a special case and you''ll probably want to eliminate as much conditional branching as possible from the rasteriser.

You should also consider what you''re going to do with things like perspective correct texture mapping and Gouraud shading (think over your interpolation) - you might find only dealing with triangles keeps life easy.

There isn''t really a "right" answer. I''d probably personally triangulate and avoid special cases.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

#### Share this post

##### Share on other sites

• Advertisement

### Announcements

• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12
• Advertisement

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633661
• Total Posts
3013219
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!