1 / 22

Real-Time Stroke Textures

Real-Time Stroke Textures. Bert Freudenberg Institut für Simulation und Graphik Universität Magdeburg. Real-Time Stroke Textures. Overview Pen-and-ink style in CG Texture based real-time approaches Basic stroke-map technique Extensions Conclusion. Pen-and-ink style in CG.

pbradshaw
Download Presentation

Real-Time Stroke Textures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Real-Time Stroke Textures Bert Freudenberg Institut für Simulation und Graphik Universität Magdeburg

  2. Real-Time Stroke Textures • Overview • Pen-and-ink style in CG • Texture based real-time approaches • Basic stroke-map technique • Extensions • Conclusion

  3. Pen-and-ink style in CG Winkenbach and Salesin, 1994

  4. Line based Lines drawn individually To slow for shading Outline only Texture based Multiple lines drawn at once Suited for shading Real-Time Techniques

  5. Texture based approaches • Lake et al., 2000 • 1 texture per triangle • Lit and split by CPU • Flat shading

  6. Texture based approaches • Praun et al., 2001 (presented tomorrow) • 2 textures per vertex = 6 per face • Lit by Vertex Program • Blended by GPU • Gouraud shading

  7. Texture based approaches • Freudenberg, 2001 (presented now) • Multiple layers per pixel • Lit completely by GPU • Per-pixel shading

  8. T I T > I Varying Line-Width Shading • Idea • Create half-toning pattern T • Per-pixel compare to target intensityI • Output black or white pixels

  9. Idea Create half-toning pattern T Per-pixel compare to target intensity I Output black or white pixels Problem Aliasing Solution Scaling instead of thresholding Varying Line-Width Shading

  10. Varying Line-Width Shading • Scaling • T • I • T + I • 1 – (T + I) • 4 (1 – (T + I)) • 1 – 4 (1 – (T + I)) • Anti-aliased result

  11. Varying Line-Width Shading

  12. Stroke Maps • Idea • Strokes are drawn in layers • Encoded into one texture • Expanded at run-time • Selected by reference intensity

  13. Stroke Maps • Layering of Strokes

  14. Stroke Maps • Encoding • Pre-processing step • Encode layers as gray • 1st layer black • 2nd layer 66% gray • 3rd layer 33% gray • Paint last-to-first into texture = Stroke Map

  15. Stroke Maps • Expansion • At run-time • Using per-pixel operations • EXACT same formula as for line-width variation • 1 – 4 (1 – (T + I)) • General combiner: r0 = scale_by_4( sum( invert( t ) , negate( i ) ) ) • Final combiner: out = invert(r0)

  16. I T sum scaled I T sum scaled Stroke Maps Horizontaler Verlauf!

  17. Stroke Maps • NVPARSE code • { • rgb { • discard = unsigned_invert(tex0); // 1-T • discard = -col0; // -I • spare0 = sum(); // 1-T-I • scale_by_four(); // 4(1-T-I) • } • } • out.rgb = unsigned_invert(spare0); // 1-4(1-(T+I))

  18. Extensions • Indication Mapping • Enabled by per-pixel evaluation • Bias intensity by indication • Needs one additional combiner stage

  19. Extensions • Shadows • Combinable with most shadow algorithms • Adds greatly to realism

  20. Conclusion • Shortcomings • Limited accuracy • Layers not strictly separated • Only one-pass shading supported • Multiple passes via render-to-texture

  21. Conclusion • Advantages • Cheap: • no CPU effort • one texture unit • one register combiner • one pass • Even works on “old” GeForce • Well suited for highly interactive environments

  22. Real-Time Stroke Textures • Questions?

More Related