60001899 New SkyImage SkyFront SkyTwist and SkyImageType properties added to vdRay

Article 60001899
Type Wish
Product vdRay
Version 6024
Date Added 1/29/2013
Fixed (1/29/2013)
Submitted by Sotiris Kakavoulis


New properties to set an image as background to a drawing rendered by vdRay.


SkyImage property works as background image when rendering documents using vdRay. To understand how SkyImage works, imagine a big sphere that contains all your drawing and has as center the position of the camera (note: SkyImage should only be used with perspective mode on). The bitmap set by the user, is mapped on the inside of this sphere. The way this sphere can be mapped is defined by the SkyImage Type property. Currently two SkyImage Types are supported, Spherical Single and Spherical Tiles. Sperical Single, applies the whole bitmap around this sphere from start to end. Keep in mind that if the bitmap is too small, it will be stretched until it covers the whole sphere. The result would be something like the image below.

Pulpit rock

As you can see the SkyImage covers the whole area around the cube, over and UNDER the horizon. Spherical Tiles applies the bitmap on the same sphere, but does not stretch the image in order to cover the whole surface. Instead, it uses mutliple copies of the same bitmap to fill the background sphere. Check an example in the image below.

Pulpit rock

When you have set the SkyImage and you need to manipulate how it will be placed, you can do that using two properties. SkyFront and SkyTwist. SkyFront is a Vector that specifies where the middle of the bitmap will be placed. If, for example you set a bitmap with a red dot at the center of the bitmap, when applied as SkyImage, this dot will be located at where this vector instructs in WCS coordinations. So if you set your view vector like wise, the red dot will be at the center of your view. Keep in mind that this applies only to the SphericalSingle property of SkyImageTypeEnum. SkyTwist on the other hand rotates the bitmap of SkyImage as many degrees as are set in it, having as rotation axis the SkyFront vector property.

Pulpit rockThe image used in SkyImage.
Pulpit rockPrevious image as SkyImage with SkyFront and View direction both set as 0,1,0.
Pulpit rockSame SkyFront and View direction with a SkyTwist of 45.

To use Sky, simply set a bitmap to the SkyImage property and when you render your drawing, the bitmap will be set as background. To disable it, set SkyImage as null. If not SkyImage bitmap is set, the rest of the three properties of Sky, have absolutely no effect on the rendered drawing.

Send comments on this topic.