{"id":2290,"date":"2019-02-28T02:43:34","date_gmt":"2019-02-28T02:43:34","guid":{"rendered":"https:\/\/www.migenius.com\/?p=2290"},"modified":"2019-02-28T02:43:34","modified_gmt":"2019-02-28T02:43:34","slug":"whats-new-in-realityserver-5-2-update-259","status":"publish","type":"post","link":"https:\/\/www.migenius.com\/articles\/whats-new-in-realityserver-5-2-update-259","title":{"rendered":"What’s New in RealityServer 5.2 Update 259"},"content":{"rendered":"
Our first update for RealityServer 5.2 is here. It includes an Iray version bump and some nice convenience features. The most significant feature however is support for queuing renders with Iray Server<\/a>. This will be of interest to those building internal rendering automation tools with RealityServer.<\/p>\n <\/p>\n\n RealityServer is great for rendering automation. If you want to take a bunch of 3D data, geometry, lighting, materials, textures and throw them together into a scene based on some input data, then RealityServer makes this easy to do with some basic JavaScript (server-side V8 in particular is really useful for this).<\/p>\n What kind of data would drive the rendering? A common example from our customers would be a floor plan. This might have information about where furniture is positioned, the dimensions of the walls, locations of windows, materials assigned to the walls, floor and ceiling and position of light sources.<\/p>\n Using RealityServer APIs you can easily create tools that automatically assemble your scenes from this type of data. This probably warrants its own article, for now though we just want to use this as context for talking about our new Iray Server integration.<\/p>\n<\/div><\/div> <\/p>\n<\/div><\/div><\/div>\n Many of our customers are moving to RealityServer from manual processes where a human would literally change a scene setting, like a material colour and then re-render the scene and save the image, totally manually. This is fine for half a dozen changes but many of our customers deal in change numbers on the order of tens of thousands or more.<\/p>\n Iray Server is an end-user product available from the Iray Plugins Store<\/a> or migenius directly. Unlike RealityServer it is not customisable and is not a development platform. You connect to it from an Iray enabled application (for example plugins like Iray for Rhino<\/a>, Iray for 3ds max<\/a> and Iray for Maya<\/a>) using the Iray Bridge<\/em> API. You can then submit jobs to a render queue which is managed by Iray Server. It has a nice web interface for managing your queue and getting your results.<\/p>\n\n Just a quick note on licensing. RealityServer is explicitly licensed for running as a service where you provide 3rd parties access to your applications. Iray Server however is licensed for use within your own business and not for external access. So it is primarily useful for offline rendering for your business.<\/p>\n So, automation is great, however how about queuing up a bunch of renders. You can of course program such a system in RealityServer if you want something specific, however since Iray Server provides an off the shelf queuing system why not utilise it?<\/p>\n In this update we are adding new commands to let you queue up jobs on Iray Server directly from RealityServer. Iray Server works with the concept of snapshots<\/em> which represent the state of a given scene at any time. So the usual process for submitting a job is to first create a snapshot, then queue the job. We provide the following commands to facilitate working with Iray Server.<\/p>\n The first three are internal commands which allow fine grain control over the process where as the queue_to_iray_server<\/em> command is implemented as a V8 server-side command which wraps the whole process up in a single command so you don’t need to worry about snapshots. If you’re curious about the exact process you can have a snoop at the source in your v8\/commands<\/em> folder.<\/p>\n Before using the Iray Server commands you need to configure your servers in realityserver.conf<\/em>. You can add multiple named servers and then pass these names into the commands.<\/p>\n The configuration will look something like that shown in the right. For security reasons you can’t configure servers with commands but you can setup multiple servers and switch freely between them.<\/p>\n<\/div><\/div> Here is a quick JSON-RPC command sequence that loads a scene and then submits a job to Iray Server for rendering two buffers (the normal result buffer and a Light Path Expression representing the indirect illumination).<\/p>\n This is using the V8 convenience command so no need to manage snapshots. If you want to do more advanced things such as rendering animations then you’ll need to use the individual commands mentioned earlier. See the command documentation for full information.<\/p>\n migenius offers Iray Server as a preconfigured application on the Nimbix<\/a> JARVICE platform. So if you need to extend your internal rendering resources for Iray Server you can sign up for Nimbix and run Iray Server on the range of modern GPUs available there. Get in touch<\/a> with us to obtain a sign up link or more information if you’re interested.<\/p>\n A relatively small version bump in Iray is included. This is mostly for bug fixes and a few small features. Here are some quick highlights but refer to neurayrelnotes.pdf<\/em> with your release for full details.<\/p>\n After doing a lot of deployments recently for our customers we realised that having to explicitly include each configuration file can be tedious. So you can now do things like this in realityserver.conf<\/em> (or other included configuration files).<\/p>\n Where conf.d<\/em> is a directory instead of a file. This will include each file inside the conf.d directory in alphabetical order (non-recursively). In this case we have a relative path so it expects to find a conf.d directory in the same directory as the configuration file.<\/p>\n This pattern of including configuration files is very common on Linux. Since the directory can be empty, it is a good way to conditionally configure things or add configurations specific to a given group of functions.<\/p>\n Once we put in conf.d style configuration we realised we were very close to being able to have the default RealityServer directory installed somewhere and be able to configure it without making changes to the directory. This is great for users who switch RealityServer version often but want to be able to change the configuration.<\/p>\n To allow that easily we have now introduced conditional configuration directives using guarded blocks, similar to the way it is done in C\/C++. So you can now do something like this in realityserver.conf<\/em>.<\/p>\n This will only add the configuration directives inside the guarded ifdef\/endif block if the MY_FANCY_ENV_VAR<\/em> environment variable is defined. To make this more useful, we include two default guarded blocks in the shipping realityserver.conf<\/em>.<\/p>\n So if you define the RS_USER_PRE_CONFIG<\/em> environment variable as a configuration file prior to starting RealityServer, this file will get included at the start of the configuration (and so will take precedence over defaults). You also have the RS_USER_POST_CONFIG<\/em> environment variable to include configuration files after the normal configuration. With the conf.d functionality you can also set these to point to directories full of configuration files.<\/p>\n As you can imagine, here at migenius we are constantly switching back and forth between different RealityServer versions and this new functionality makes it so much easier to do. It also reduces the chance of losing some local change we made to a specific RealityServer installation since we can keep everything in a separate location. This is more of a DevOps convenience but we think you’ll like it too.<\/p>\n The RealityServer Command Documentation is probably one of the most important and most referred to pieces of documentation when developing with RealityServer. Personally I would frequently have the all<\/em> category open and just use the browser search to find the commands I wanted.<\/p>\n This is fine except you need to jump around and scroll a lot. To streamline this we dropped in a search filter at the top of the command lists which you can see in action on the right. This lets you list all of the commands containing the search term and no others, making just a little faster to find the command you want.<\/p>\n The results update live as you type and it is all done client side so there is no lag. With this new feature I now bookmark the all<\/em> category and use the search instead of the sub-categories.<\/p>\n<\/div><\/div> <\/p>\n<\/div><\/div><\/div>\n If you don’t have your release notification yet reach out and we will make sure you get the details for downloading the new version. As usual, the release notes and Iray releases notes contain a lot of helpful information in terms of finding out everything that has changed and checking on whether a bug you were interested in has been fixed. As always get in touch<\/a> if you want to learn more.<\/p>\n","protected":false},"excerpt":{"rendered":" Our first update for RealityServer 5.2 is here. It includes an Iray version bump and some nice convenience features. The most significant feature however is support for queuing renders with Iray Server. This will be of interest to those building internal rendering automation tools with RealityServer.<\/p>\n","protected":false},"author":2,"featured_media":2294,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"spay_email":"","jetpack_publicize_message":"See What's New in RealityServer 5.2 Update 259","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[15],"tags":[16,14],"jetpack_featured_media_url":"https:\/\/www.migenius.com\/migenius\/wp-content\/uploads\/2019\/02\/realityserver_52_update_feature.jpg","_links":{"self":[{"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/posts\/2290"}],"collection":[{"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/comments?post=2290"}],"version-history":[{"count":7,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/posts\/2290\/revisions"}],"predecessor-version":[{"id":2301,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/posts\/2290\/revisions\/2301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/media\/2294"}],"wp:attachment":[{"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/media?parent=2290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/categories?post=2290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.migenius.com\/wp-json\/wp\/v2\/tags?post=2290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Data-Driven Rendering Automation<\/h3>\n
What Is (And Isn’t) Iray Server<\/h3>\n
Iray Server Queuing<\/h3>\n
Commands<\/h4>\n
\n
Configuration<\/h4>\n
\n<user iray_server>\n <user server>\n name bigbox\n address ws:\/\/bigbox:9090\n username bender\n password unbreakable\n <\/user>\n <user server>\n name biggerbox\n address ws:\/\/biggerbox:9090\n username flexo\n password unguessable\n <\/user>\n<\/user>\n<\/pre>\n<\/div><\/div><\/div>\n
Submitting Jobs<\/h4>\n
\n[\n {"jsonrpc": "2.0", "method": "create_scope", "params": {\n "scope_name": "ex_scope"\n }, "id": 1},\n {"jsonrpc": "2.0", "method": "use_scope", "params": {\n "scope_name": "ex_scope"\n }, "id": 2},\n {"jsonrpc": "2.0", "method": "import_scene", "params": {\n "scene_name": "ex_scene",\n "filename": "scenes\/meyemII.mi"\n }, "id": 3},\n {"jsonrpc": "2.0", "method": "queue_to_iray_server", "params": {\n "format": "exr",\n "iray_server_name": "bigbox",\n "job_name": "ex_job",\n "priority": 100,\n "render_targets": [\n {\n "name": "result",\n "pixel_type": "Rgba",\n "output_name": "beauty"\n },\n {\n "name": "lpexpr=L.{2,}E",\n "pixel_type": "Color",\n "output_name": "indirect"\n }\n ],\n "renderer": "iray",\n "result_name": "ex_job_%B",\n "scene_name": "ex_scene",\n "stereo_mode": "none"\n }, "id": 4}\n]\n<\/pre>\n
Iray Server Cloud Services<\/h4>\n
Smaller Changes<\/h3>\n
Iray 2018.1.2<\/h4>\n
\n
conf.d Style Configuration<\/h4>\n
\ninclude conf.d\n<\/pre>\n
Conditional Configuration<\/h4>\n
\nifdef MY_FANCY_ENV_VAR\n<directory \/secret\/>\ndeny from all\n<\/directory>\nendif\n<\/pre>\n
\nifdef RS_USER_PRE_CONFIG\ninclude ${RS_USER_PRE_CONFIG}\nendif\n\n...\n\nifdef RS_USER_POST_CONFIG\ninclude ${RS_USER_POST_CONFIG}\nendif\n<\/pre>\n
Searching in Command Documentation<\/h4>\n
Start Using RealityServer Today<\/h3>\n