-
Notifications
You must be signed in to change notification settings - Fork 1
Defining custom perspectives
If the standard, predefined perspectives are not suitable for a user's needs, custom perspectives can be defined. With custom perspectives, a user is free to utilize the full flexibility and capabilities of the rendering engine.
At present, only one class of perspective is supported: the IsoHDPerspective class. This class defines an isometric viewpoint, with full control of the direction of view, angle of view, and scale of view. The definition of a perspective is structured as follows:
perspectives:
- class: org.dynmap.hdmap.IsoHDPerspective
name: my_custom_perspective
azimuth: 124
inclination: 55
scale: 16
The required parameters for the isometric perspectives include the following:
-
name : the unique name for the perspective. If a custom perspective has the same name as an existing standard perspective, it will replace it.
-
azimuth : the angle, in degrees clockwise from north, of the viewpoint for the map : 0 = north, 90 = east, 180 = south, 270 = west. Any angle value is allowed.
-
inclination : the angle, in degrees below horizontal, of the viewpoint for the map: 90 = top view, 0 = horizontal (not allowed). Permitted values are any value from 20 to 90 degrees.
-
scale : the scale or resolution used for rendering the scene, in pixels per block edge. Values from 1 to 64 are supported, although 64 would correspond to a HUGE map - 16 yields a very high quality map (corresponding to hires in the standard perspectives), 8 yields a good quality map (corresponding to medres), and 4 yields a good quality map (corresponding to lowres) if a shader other than a texture pack shader is used (cave, biome, colorschemes).
In addition to these core required parameters, additional optional parameters are supported to modify the processing of the perspective:
-
maximumheight : if set, this sets a maximum height value (Y coordinate, in the Minecraft map) of blocks to be rendered. If it is set below 127, all blocks above this height will be invisible - logically slicing the top off of the world as a selected height. This can be used to show underground views.
-
minimumheight : if set, this set a minimum height value (Y coordinate, in the Minecraft map) of the blocks to be rendered. If it is set above 0, all blocks below this height will be invisible - logically slicing the bottom off of the world at a selected height. This can be used to show underground views.