Questions tagged [rasterizing]

Rasterization (or rasterization) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (pixels or dots) for output on a video display or printer, or for storage in a bitmap file format.

In normal usage, the term refers to the popular rendering algorithm for displaying three-dimensional shapes on a computer. Rasterization is currently the most popular technique for producing real-time 3D computer graphics. Real-time applications need to respond immediately to user input, and generally need to produce frame rates of at least 30 frames per second to achieve smooth animation.

Definition

278 questions
57
votes
2 answers

When should I set layer.shouldRasterize to YES

I've seen fixes for some lagyness issues by setting the layer property of the view view.layer.shouldRasterize = YES; I saw a great difference in performance when using a UICollectionView and preparing the cells and setting the propery. Not sure…
Avba
  • 14,822
  • 20
  • 92
  • 192
47
votes
1 answer

Why do we use CPUs for ray tracing instead of GPUs?

After doing some research on rasterisation and ray tracing. I have discovered that there is not much information on how CPUs work for ray-tracing available on the internet. I came across and article about Pixar and how they pre-rendered Cars 2 on…
oodle600
  • 619
  • 1
  • 5
  • 8
33
votes
9 answers

Replacing vector images in a PDF with raster images

Is there any easy (scriptable) way to convert a PDF with vector images into a PDF with raster images? In other words, I want to generate a PDF with the exact same (un-rasterized) text but with each vector image replaced with a rasterized version. I…
31
votes
1 answer

Rasterizing a GDAL layer

Edit Here is the proper way to do it, and the documentation: import random from osgeo import gdal, ogr RASTERIZE_COLOR_FIELD = "__color__" def rasterize(pixel_size=25): # Open the data source orig_data_source = ogr.Open("test.shp") …
Luper Rouch
  • 9,304
  • 7
  • 42
  • 56
17
votes
3 answers

Are there any rendering alternatives to rasterisation or ray tracing?

Rasterisation (triangles) and ray tracing are the only methods I've ever come across to render a 3D scene. Are there any others? Also, I'd love to know of any other really "out there" ways of doing 3D, such as not using polygons.
Jonathan Ford
  • 317
  • 2
  • 5
  • 12
13
votes
0 answers

How to rasterize OpenGL triangle on half-integer pixels centers

OpenGL pixels/fragments are conceptually 1x1 squares centered on half-integer pixels. The OpenGL 4.5 specification states: A fragment is located by its lower left corner, which lies on integer grid coordinates. Rasterization operations also refer…
wcochran
  • 10,089
  • 6
  • 61
  • 69
13
votes
2 answers

What’s the difference between rasterization and rendering?

Can anybody explain how rendering differs from rasterization especially in the context of font rendering (why not font rasterization)? Can rendering be called a special technique (like greyscale rendering and subpixel rendering) before the…
user1706680
  • 1,103
  • 3
  • 15
  • 34
13
votes
1 answer

rasterizing matplotlib axis contents (but not frame, labels)

For an article I am generating plots of deformed finite element meshes, which I visualize using matplotlib's polycollection. The images are saved as pdf. Problems arise for high density meshes, for which the naive approach results in files that are…
gertjan
  • 843
  • 1
  • 8
  • 16
11
votes
2 answers

Controlling DPI of image output using render()

Using phantomjs, is there a way to control the DPI setting used when rasterizing an image of the web content using the page.render(filename) method? I can't find anything that would control this via the interface api, but didn't know if someone has…
Thomas Jones
  • 4,892
  • 26
  • 34
10
votes
5 answers

Rasterizing a 2D polygon

I need to create a binary bitmap from a closed 2D polygon represented as a list of points. Could you please point me to efficient and sufficiently simple algorithms to do that, or, even better, some C++ code? Thanks a lot! PS: I would like to avoid…
static_rtti
  • 53,760
  • 47
  • 136
  • 192
9
votes
3 answers

position: fixed , has a very bad performance on mobile/tablet devices when scrolling

I'm using position: fixed in my site to fix the navigation bar in the view port, just like facebook's blue bar, but when we tried it on mobile/tablet devices (with their low processing powers) this fixed-bar makes a very bad hit on performance,…
AbdelHady
  • 9,334
  • 8
  • 56
  • 83
9
votes
1 answer

Shapefile to raster conversion in R?

I have a shapefile downloaded from the worldwildlife.org for the terrestrial ecoregions of the world. The file can be loaded here: http://worldwildlife.org/publications/terrestrial-ecoregions-of-the-world. It comes as a standard shape file and I…
I Del Toro
  • 913
  • 4
  • 15
  • 36
8
votes
1 answer

General algorithm for rastering vector image

What is the general algorithm of rasterizing vector image? I've found a lot of algorithms of rasterizing primitives such as lines, circles, Bezier curves etc. But for general, what should I do? Simply, go foreach vector figure in vector picture, get…
medvedNick
  • 4,512
  • 4
  • 32
  • 50
8
votes
3 answers

C++ triangle rasterization

I'm trying to fix this triangle rasterizer, but cannot make it work correctly. For some reason it only draws half of the triangles. void DrawTriangle(Point2D p0, Point2D p1, Point2D p2) { Point2D Top, Middle, Bottom; bool MiddleIsLeft; …
akk kur
  • 361
  • 2
  • 5
  • 14
8
votes
3 answers

Perspective correct texture mapping; z distance calculation might be wrong

I'm making a software rasterizer, and I've run into a bit of a snag: I can't seem to get perspective-correct texture mapping to work. My algorithm is to first sort the coordinates to plot by y. This returns a highest, lowest and center point. I then…
knight666
  • 1,599
  • 3
  • 22
  • 38
1
2 3
18 19