IP Library Granted Patent US 10,140,763
Granted Patent B2
US 10,140,763 · App. 15/896,298 · Granted Nov 27, 2018

Rendering a computer generated image using a stencil buffer

Inventor: Simon Fenney (Hertfordshire, GB)
Assignee: Imagination Technologies Limited
G06T17/20G06T15/005
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,140,763
App. No.
15/896,298
Granted
Nov 27, 2018
Kind
B2
Abstract

A method and apparatus for rendering a computer-generated image using a stencil buffer is described. The method divides an arbitrary closed polygonal contour into first and higher level primitives, where first level primitives correspond to contiguous vertices in the arbitrary closed polygonal contour and higher level primitives correspond to the end vertices of consecutive primitives of the immediately preceding primitive level. The method reduces the level of overdraw when rendering the arbitrary polygonal contour using a stencil buffer compared to other image space methods. A method of producing the primitives in an interleaved order, with second and higher level primitives being produced before the final first level primitives of the contour, is described which improves cache hit rate by reusing more vertices between primitives as they are produced.

Claims (37)

1. A method for rendering a computer generated image using a stencil buffer, comprising:

receiving an arbitrary closed polygonal contour, the contour having N vertices;

dividing the arbitrary closed polygonal contour into primitives, each primitive being a polygon having at least 3 and at most P vertices where 2<P<N;

setting up a stencil buffer using the primitives; and

using the stencil buffer to render the primitives to produce a computer generated image by comparing a winding order of each primitive to an overall winding order of the arbitrary closed polygonal contour and rendering only within areas of an image that are covered by primitives whose winding order is the same as the overall winding order.

2. The method according to claim 1 , wherein rendering comprises performing one or more of colour and texturing processes.

3. The method according to claim 1 , wherein an offset is added modulo N to all vertex indices in the arbitrary closed polygonal contour prior to dividing the contour into primitives.

4. The method according to claim 1 , wherein dividing comprises:

i) selecting a vertex of the arbitrary closed polygonal contour as a first index vertex and setting a source contour as the arbitrary closed polygonal contour;

ii) outputting a primitive of Q vertices using the index vertex and (Q-1) contiguous vertices of the source contour;

iii) forming a reduced source contour by removing from the source contour the (Q-2) vertices between the index vertex and an end vertex of the outputted primitive;

iv) setting the end vertex of the outputted primitive as the index vertex;

v) repeating steps (ii) to (iv) until all vertices of the source contour have been included in at least one of the outputted primitives;

vi) selecting a vertex of the reduced source contour as an index vertex and setting the source contour as the reduced source contour;

vii) repeating steps (ii) to (v) until either the reduced source contour is outputted as a primitive or until the reduced source contour has trivially zero area.

5. The method according to claim 1 , wherein substantially all primitives are triangles.

6. The method according to claim 1 , wherein the primitives are not triangles.

7. Apparatus for rendering a computer generated image comprising:

an input for receiving an N-vertex arbitrary closed polygonal contour;

a state machine controller for controlling dividing of the N-vertex arbitrary closed polygonal contour into primitives, each primitive being a polygon having at least 3 and at most P vertices where 2<P<N, and outputting the primitives; and

a stencil buffer configured to be set up using the primitives and to render the primitives to produce a computer generated image by comparing a winding order of each primitive to an overall winding order of the arbitrary closed polygonal contour and using, in the rendering process, only those primitives whose winding order is the same as the overall winding order.

8. Apparatus according to claim 7 , wherein rendering comprises performing one or more of colour and texturing processes.

9. Apparatus according to claim 7 , wherein the dividing the arbitrary closed polygonal contour into primitives is performed using:

a vertex stack comprising first and second portions, the first portion containing P stack entries, the vertex stack configured to allow pushing and popping of stack data between the first and second portions;

a primitive output, coupled to the first portion of the vertex stack means and to the state machine controller, for outputting primitives from the data on the first portion of the vertex stack;

wherein the state machine controller, is coupled to the vertex stack, and is configured to manage the data on the first and second portions of the vertex stack to provide interleaving of primitive levels in the output of the primitive output.

10. Apparatus according to claim 7 , wherein the state machine controller is configured to control the dividing to:

i) select a vertex of the arbitrary closed polygonal contour as a first index vertex and setting a source contour as the arbitrary closed polygonal contour,

ii) output a primitive of Q vertices using the index vertex and (Q-1) contiguous vertices of the source contour,

iii) form a reduced source contour by removing from the source contour the (Q-2) vertices between the index vertex and an end vertex of the outputted primitive,

iv) set the end vertex of the outputted primitive as the index vertex,

v) repeat steps (ii) to (iv) until all vertices of the source contour have been included in at least one of the outputted primitives,

vi) select a vertex of the reduced source contour as an index vertex and setting the source contour as the reduced source contour, and

repeat steps (ii) to (v) until either the reduced source contour is outputted as a primitive or until the reduced source contour has trivially zero area.

11. Apparatus according to claim 7 , wherein an offset is added modulo N to all vertex indices in the arbitrary closed polygonal contour prior to dividing the contour into primitives.

12. Apparatus according to claim 7 , wherein substantially all primitives are triangles.

13. Apparatus according to claim 7 , wherein the primitives are not triangles.

Assignments (1)
SECURITY INTEREST Recorded Jul 31, 2024
From: IMAGINATION TECHNOLOGIES LIMITED
To: FORTRESS INVESTMENT GROUP (UK) LTD
Reel/Frame 068221/0001 →
Priority Claims (2)
GB 0908506.9 · May 18, 2009 · national
GB 1004977.3 · Mar 24, 2010 · national
Continuity (3)
Continuation 13720318 · Dec 19, 2012
Division 12800540 · May 17, 2010
Related Publication 20180174361A1 · Jun 21, 2018