Forum Discussion

strattonbrazil's avatar
strattonbrazil
Binge Watcher
10 years ago

scaling scene graph components for different resolutions

How is scene scaling handled in the roku scene graph components? I can set the size in the component like the poster height and width, but when I change the ui_resolutions in the manifest file, I don't see it "automatically scale" the images. Am I supposed to make a component for each resolution and add those components dynamically? Or should I just set the ui_resolutions to "hd" for 720p and use that sizing in my components?

5 Replies

  • Theoretically at least, 9patch images should automatically scale to the correct size.

    - Joel
  • What's a 9patch image? And the question applies to any transformation or dimension. If the components are laid out at X resolution, how are they scaled to Y?
  • If you only specify a single ui_resolution of "hd" or "fhd" in the manifest, it will scale automatically between the two. Specifying both "hd,fhd" tells the renderer that your layout/code includes images and coordinates for both. For SD, there is no auto-scaling.
    There's built-in support for specifying different resolution images via the uri_resolution_autosub manifest setting, but I haven't yet figured out the best way to deal with multiple resolution coordinates aside from explicitly modifying all of the applicable locations and sizes in code, which is a pain.
  • Okay, so it sounds like I always need sd in there since HD dimensions will never scale down to 480 for me. So my choices are sd,hd or sd,fhd with the distinction of what dimensions I was to design my hd components at (720p vs 1080p). I just tested it and as you said adding sd on the front doesn't change the display on the 720p machine. Thanks.