{"id":2860,"date":"2019-08-28T04:36:49","date_gmt":"2019-08-28T04:36:49","guid":{"rendered":"https:\/\/www.migenius.com\/?p=2860"},"modified":"2019-08-30T03:49:36","modified_gmt":"2019-08-30T03:49:36","slug":"environment-lighting-with-server-side-v8","status":"publish","type":"post","link":"https:\/\/www.migenius.com\/articles\/environment-lighting-with-server-side-v8","title":{"rendered":"Environment Lighting with Server-Side V8"},"content":{"rendered":"\n

In a previous post<\/a> we covered creating an empty scene by writing a server-side V8 command in JavaScript. Now let’s turn on some light by adding an environment lighting setup to our empty scene. We’ll create two new commands, one to add lighting based on a spherical HDRI image and another using the built in physically based sun and sky system.<\/p>\n\n\n\n\n\n\n\n

\"\"<\/figure>\n\n\n\n

Introduction<\/h3>\n\n\n\n

Before starting, if you haven’t already read our post on Creating an Empty Scene with Server-side V8<\/a> please head over there and read it now as this post assumes you are familiar with what is covered there.<\/p>\n\n\n\n

In this post we will create two new commands, tutorial_add_hdri.js<\/em> and tutorial_add_sunsky.js<\/em>. If you’re following along you can create these files and save them in the v8\/examples<\/em> directory of your RealityServer installation. In RealityServer you can illuminate your scene in three ways.<\/p>\n\n\n\n