{"id":1395,"date":"2016-06-03T04:02:07","date_gmt":"2016-06-03T04:02:07","guid":{"rendered":"http:\/\/www.migenius.com\/?p=1395"},"modified":"2016-06-03T04:02:07","modified_gmt":"2016-06-03T04:02:07","slug":"realityserver-4-4-update-40","status":"publish","type":"post","link":"https:\/\/www.migenius.com\/articles\/realityserver-4-4-update-40","title":{"rendered":"What’s New in RealityServer 4.4 Update 40"},"content":{"rendered":"
Today we released RealityServer 4.4 build 1527.40. This incremental update focuses on features to help make development with RealityServer easier. It includes many elements which enable RealityServer to do more out of the box without having to write your own plugins. When new customers get their first look at RealityServer we often get many of the same questions about how to do certain things. We hope with this release and future releases to start covering many of these with off the shelf functionality. Most of the information here is also contained in the RealityServer release notes and documentation but if you don’t have RealityServer yet you can read about some of these new features below.<\/p>\n
<\/p>\n
Starting with this release we will be making available, along side each RealityServer release a set of extras plugins<\/em>. At migenius we often help customers build and deploy their RealityServer applications and in doing we often make new plugins using the C++ Plugin API. While many of these plugins are not yet polished enough to be a standard part of RealityServer, we have decided to bundle several of these together and release them as an optional set of add in tools you can use. These plugins solve many problems we get asked about frequently by customers. In some cases the error handling and documentation may not be complete or fully implemented but they are all quite usable. Here is what is included in the extras plugins for this release.<\/p>\n Adjusts responses Content-Disposition<\/em> header to cause the browser to download rather than view the response file. Useful for triggering save dialogs for images. To configure add the following to your RealityServer configuration:<\/p>\n You can then trigger the functionality by appending the named url argument to the query string of your url. For example:<\/p>\n This will cause the browser to pop up a dialog asking the user where to save the file or trigger the browsers download behavior rather than viewing the result. Note that the handling of this header differs between browsers.<\/p>\n Allows you to output images in the mental images .zt depth format. Useful to use with compositing applications that support this format when you need to write out depth data. The .zt format is binary but quite trivial if you wish to write your own tools to read it or use a tool that can read raw bytes from an image file. From the mental ray manual:<\/p>\n All mental ray native file formats, like ct or st, are following a simple layout. They contain a header followed by the image data, where header consists of a magic number byte identifying the format (8 in the case of the ZT depth format), a null byte, width and height as unsigned shorts, as well as a version number as unsigned short ; and image data are simply uncompressed values written pixel by pixel (with increasing horizontal x coordinate) and line by line (with increasing vertical y coordinate), beginning in the lower left corner (x = y = 0). The pixel data consists of one 32-bit component value. All shorts, integers, and floats are big-endian (most significant byte first).<\/em><\/p>\n<\/div><\/div> <\/p>\n<\/div><\/div><\/div>\n A state handler plugin that automatically uses a specified scope for a request and if the scope does not exist it creates it. This can be useful in removing the constant use of use_scope<\/em> and create_scope<\/em> commands. You can simply set a HTTP header and if present it will generate the scopes. Configure as follows:<\/p>\n RealityServer will then look for the header rs-scope<\/em> and if found will use it to set the current scope for commands or create it if it doesn’t exist. To use this you will naturally need to be using a client that allows you to control the headers of your request (most clients should allow this).<\/p>\n False color tonemapper which outputs a heatmap style image using a specific colour gradient based on minimum and maximum values specified. Requires mif_min<\/em> and mif_max<\/em> attributes (Float32) to be set on the camera and the cameras mip_tonemapper<\/em> attribute to be set to falsecolor_tonemapper<\/em>.<\/p>\n Please note, in order for the false color tonemapper to work correctly you must<\/strong> disable the Iray Firefly Filter by setting the iray_firefly_filter<\/em> attribute on your scenes options to false<\/em>. If this is not done the values provided to the tonemapper by Iray will be incorrect. Currently no legend or scale it output so you will need to add your own.<\/p>\n<\/div><\/div>Save Response<\/h4>\n
\r\n<user save_response>\r\nurl_argument save_image\r\n<\/user>\r\n<\/pre>\n
\r\nhttp:\/\/127.0.0.1:8080\/?json_rpc_request=[..json_commands..]&save_image=image.jpg\r\n<\/pre>\n
ZT Depth Image Support<\/h4>\n
Auto Scope<\/h4>\n
\r\n<url .*>\r\nstate auto_scope\r\n<\/url>\r\n\r\n<user auto_scope>\r\nheader rs-scope\r\n<\/user>\r\n<\/pre>\n
False Color Tonemapper<\/h4>\n