Skip to content

A compute shader that generates a height map from 2D vector contours. This can be used to generate three-dimensional geometry out of two-dimensional polygons.

License

Notifications You must be signed in to change notification settings

happy-turtle/Contours2HeightMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contours2HeightMap

A Compute shader that generates a height map from 2D vector contours. In combination with a tesselation shader this can be used to generate three-dimensional geometry out of two-dimensional polygons. We extracted contours out of a video with OpenCV and used these contours as input for the compute shader. Using the height map with a tesselation shader you get a three-dimensional geometry out of a simple video. Changing the mapping function 1.0 - rcp(1.0 + smallestDistance * curviness) at the end of the shader will result in different shaping of the geometry.

This shader was written as part of the research publication Real-Time Relighting of Video Streams for Augmented Virtuality Scenes and a corresponding master's thesis at the Virtual Sets and Virtual Environments Laboratory of the University of Applied Sciences Düsseldorf.

Contours Height Map Rendered geometry
contour height_map wald

About

A compute shader that generates a height map from 2D vector contours. This can be used to generate three-dimensional geometry out of two-dimensional polygons.

Topics

Resources

License

Stars

Watchers

Forks

Languages