Tools used for LDR/HDR environment map (IBL) handling and IO.
envmap.EnvironmentMap Environment map class. Converts easily between those formats:
- latlong (equirectangular)
- angular
- sphere
- cube
- skyangular
- skylatlong
Available methods:
.copy(): Deepcopy the instance..solidAngles(): Computes the per-pixel solid angles of the current representation..convertTo(targetFormat): Convert to thetargetFormat..rotate(format, rotation): Rotate the environment map using format DCM. Soon will support Euler Angles, Euler Vector and Quaternions..resize(targetSize): Resize the environment map. Be cautious, this function does not ensure energy is preserved!.toIntensity(): Convert to grayscale..getMeanLightVectors(normals): Compute the mean light vector of the environment map for the given normals.
Internal functions:
.imageCoordinates(): returns the (u, v) coordinates at teach pixel center..worldCoordinates(): returns the (x, y, z) world coordinates for each pixel center..interpolate(u, v, valid, method='linear'): interpolates
imread and imwrite/imsave supporting the folloring formats:
- exr (ezexr)
- cr2, nef, raw (dcraw)
- hdr, pic (custom, beta)
- tiff (tifffile or scipy)
- All the formats supported by
scipy.io
Internal exr reader and writer.
getMaskDerivatives(mask): creates the dx+dy from a binarymask.NfromZ: derivates the normals from a depth mapsurf.ZfromN: Integrates a depth map from a normal mapnormals.display.plotDepth: Creates a 3-subplot figure that shows the depth mapZand two side views.spharm.FSHTFash Spherical Harmonic Transformspharm.iFSHTinverse Fash Spherical Harmonic Transformspharm.sphericalHarmonicTransformSpherical Harmonic Transformspharm.inverseSphericalHarmonicTransforminverse Spherical Harmonic Transform
Tonemapping using pfstools.
- Improved display for environment maps (change intensity with keystroke/button)
- Standalone
ezexron all platforms - add
worldCoordinates()output in spherical coordinates instead of (x, y, z) - Add assert that data is float32 in convertTo/resize (internal bugs in scipy interpolation)
- bugfix:
.rotate()not working on grayscale (2D) data - bugfix:
.convertTo()not working on grayscale (2D) data