Dynamic scale for vector graphic rendering
Various implementations disclosed herein include devices, systems, and methods for providing a view of a three-dimensional (3D) environment by rasterizing vector graphics (e.g., text) on separated two-dimensional (2D) assets within the 3D environment. For example, a process may include obtaining drawing commands corresponding to a vector graphic to be displayed. The process may further include obtaining fall-off data corresponding to changes in perception of resolution for different portions of a display and obtaining viewer position data corresponding to a viewpoint position for the view. The process may further include determining a scale factor for the rasterizing the vector graphic and providing a texture (e.g., image) on a surface of the asset within the 3D environment by rasterizing the vector graphic using the drawing commands and the scale factor. The process may further include rendering a view of the 3D environment based on the viewpoint position.
1 . A method comprising:
at a device having a processor:
obtaining one or more drawing commands corresponding to a vector graphic to be displayed on an asset within a 3D environment;
obtaining fall-off data corresponding to changes in perception of resolution for different portions of a display, wherein the fall-off data is based on a gaze direction;
obtaining viewer position data corresponding to a viewpoint position for a view of the 3D environment;
projecting a two-dimensional (2D) mapping that identifies zones into the 3D environment based on the fall-off data and the gaze direction;
identifying a zone of the zones that corresponds to the asset in the 3D environment;
determining a scale factor for rasterizing the vector graphic based on the identified zone, the fall-off data, and the viewpoint position;
providing a texture on a surface of the asset within the 3D environment by rasterizing the vector graphic using the drawing commands and the scale factor; and
rendering the view of the 3D environment based on the viewpoint position.
2 . The method of claim 1 , wherein the asset corresponds to a spatially-separated layer of multiple spatially-separated layers of virtual content of the 3D environment, and the scale factor is a single scale factor that is applied to rasterize all vector graphics within the spatially-separated layer.
3 . The method of claim 2 , wherein the spatially-separated layer is a free floating window in the 3D environment.
4 . The method of claim 2 , wherein the asset corresponds to multiple perceptual resolution zones and the scale factor is selected to correspond to a highest resolution of the multiple perceptual resolution zones.
5 . The method of claim 1 , wherein the 2D mapping identifies the zones around a center position, wherein the center position is determined based on the gaze direction.
6 . The method of claim 1 , wherein selecting the scale factor is further based on:
determining a target resolution for each spatially-separated layer of multiple spatially-separated layers; and
determining a ratio between point units of a selected spatially-separated layer and a corresponding target resolution of the selected spatially-separated layer.
7 . The method of claim 1 , wherein the scale factor is selected based on the identified zone and a distance of the asset from the viewpoint position.
8 . The method of claim 7 , wherein the scale factor is determined to be a relatively higher scale factor when the distance is less than a threshold and determined to be a relatively lower scale factor when the distance is greater than the threshold.
9 . The method of claim 1 , wherein the method is performed via a process separate from an application that provides the drawing commands, wherein the fall-off data is not provided to the application.
10 . The method of claim 1 , wherein the viewer position data corresponding to the viewpoint position comprises a pose of the device or a head of a user wearing the device.
11 . The method of claim 1 , wherein the viewer position data corresponding to the viewpoint position comprises six degrees of freedom (6DOF) position data.
12 . The method of claim 1 , wherein the fall-off data comprises a variable rate rasterization (VRR) map.
13 . The method of claim 1 , wherein the 3D environment comprises an extended reality (XR) environment.
14 . The method of claim 13 , wherein the device is a head mounted device (HMD).
15 . A device comprising:
one or more sensors;
a non-transitory computer-readable storage medium; and
one or more processors coupled to the non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium comprises program instructions that, when executed on the one or more processors, cause the one or more processors to perform operations comprising:
obtaining one or more drawing commands corresponding to a vector graphic to be displayed on an asset within a 3D environment;
obtaining fall-off data corresponding to changes in perception of resolution for different portions of a display, wherein the fall-off data is based on a gaze direction;
obtaining viewer position data corresponding to a viewpoint position for a view of the 3D environment;
projecting a two-dimensional (2D) mapping that identifies zones into the 3D environment based on the fall-off data and the gaze direction;
identifying a zone of the zones that corresponds to the asset in the 3D environment;
determining a scale factor for rasterizing the vector graphic based on the identified zone, the fall-off data, and the viewpoint position;
providing a texture on a surface of the asset within the 3D environment by rasterizing the vector graphic using the drawing commands and the scale factor; and
rendering the view of the 3D environment based on the viewpoint position.
16 . The device of claim 15 , wherein the asset corresponds to a spatially-separated layer of multiple spatially-separated layers of virtual content of the 3D environment, and the scale factor is a single scale factor that is applied to rasterize all vector graphics within the spatially-separated layer.
17 . The device of claim 16 , wherein the spatially-separated layer is a free floating window in the 3D environment.
18 . The device of claim 16 , wherein the asset corresponds to multiple perceptual resolution zones and the scale factor is selected to correspond to a highest resolution of the multiple perceptual resolution zones.
19 . A non-transitory computer-readable storage medium, storing program instructions executable on a device comprising one or more processors to perform operations comprising:
obtaining one or more drawing commands corresponding to a vector graphic to be displayed on an asset within a 3D environment;
obtaining fall-off data corresponding to changes in perception of resolution for different portions of a display, wherein the fall-off data is based on a gaze direction;
obtaining viewer position data corresponding to a viewpoint position for a view of the 3D environment;
projecting a two-dimensional (2D) mapping that identifies zones into the 3D environment based on the fall-off data and the gaze direction;
identifying a zone of the zones that corresponds to the asset in the 3D environment;
determining a scale factor for rasterizing the vector graphic based on the identified zone, the fall-off data, and the viewpoint position;
providing a texture on a surface of the asset within the 3D environment by rasterizing the vector graphic using the drawing commands and the scale factor; and
rendering the view of the 3D environment based on the viewpoint position.