2
\$\begingroup\$

Seam carving is an algorithm which allows for resizing images without major distortions. I think it might help to make games which would adapt to different aspect ratios/resolutions much easier. But am I right?

You can watch this presentation to see how seam carving works for videos.

\$\endgroup\$
  • \$\begingroup\$ If it's viable or not isn't a question that suitable for this site. Your question seems to be asking for a discussion about seam carving. If you have a specific question about it, you should ask that instead. This is not the place for discussions. \$\endgroup\$ – MichaelHouse Dec 19 '13 at 23:01
2
\$\begingroup\$

By quickly looking at the algorithm it seems more suited to image/video processing.

The problem with such image processing based techniques is that they are highly analytical, and they are more likely to leave some artifacts that might not be suitable for games due to the dynamic nature of the games, unlike movies or images were the data is previously known. This is even mentioned in the article, which makes it not so suitable for games. Quoting from Wikipedia:

  • The algorithm may need user-provided information to reduce errors. This can consist of painting the regions which are to be preserved.
    With human faces it is possible to use face detection.
  • Sometimes the algorithm, by removing a low energy seam, may end up inadvertently creating a seam of higher energy. The solution to this is to simulate a removal of a seam, and then check the energy delta to see if the energy increases. If it does, prefer other seams instead.

Other reasons not to use such approach is that it's more likely to be expensive performance wise, but this needs to be proved by actually testing it. Keep in mind that games use much different techniques to output for multiple resolutions that usually don't use traditional image processing techniques, as they can usually natively render to a render target (or multiple) with the target resolution. Think of traditional image processing techniques as the ones require analyzing pixels in color domain or frequency domain. I said usually because some Anti Aliasing aliasing techniques do some analysis on the image. Even though I don't know how widely they are used in games.

\$\endgroup\$
0
\$\begingroup\$

No.

  • Seam carving makes no sense for dynamic images. It is for static images, by design. If you blindly apply it to every frame of video, you will get different unrelated results on every frame. Objects on that video will look jittering around and cause nausea.

  • It is useful when altering raster data is cheaper than reproducing image with different composition / angle / whatever. In games, every new frame is rendered at runtime, so reproducing frames with new FOV aspect ratio and GUI layout is not quite an issue. Also adjusting some variables in calculations that will happen anyway is much cheaper than involving new shader pass that requires whole image analyzis.

  • It is based on assumption that pixels are comparable by how much they are interesting / important for perception, and seams of most useless pixels may be thrown out. This approach distorts screen-space distances between objects. It is fine for illustrations, but not acceptable in games, because game wants player to know these distances, otherwise it will be lying about actual game situation.

  • In lot of games, gameplay objects are bound to GUI. For example, figures in chess. Image distortion may not be tolerated, because it will just ruin GUI.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy