Rove3D for Unity allows developers to use interactive pathtraced rendering in their own applications, as well as render production-quality images and animations with extremely fast results using your own Unity assets.
* Runs in Unity Indie and Pro. * Renders directly to DirectX or OpenGL texture. * Integrates with any existing GUI. * Works with most image effects and post-processing. * Runs on Linux, Windows, and Mac. * Supports fully dynamic lights and geometry. * Built-in dynamic physical sky environment. * Multi-layered materials supporting isotropic/anistropic roughness. * Uses OpenCL, running on AMD and Nvidia cards.
@arapps3d - What GPU are you using? The only other dependency apart from the VC redistributables is OpenCL, which should come with the latest version of your GPU drivers.
@rove3d I had the dllnotfoundexception on the 003 package so I updated my drivers. I now have the error : “Rove: Failed setup; check ‘rove.log’ for details”. Any idea what’s going on ? Here is the content of the log file.
Rove v.0.0.3
CPU threads: 8.
D3D11: 1157 x 801
Setting up scene.
Platforms found: 1.
— Platform: 0.
Vendor: NVIDIA Corporation.
Name: NVIDIA CUDA.
Version: OpenCL 1.2 CUDA 8.0.0.
Devices found: 1.
Using NV-specific D3D11 extensions.
Display device index: 0.
Creating D3D sharing display device context.
Setting up with a single device.
— Device: 0.
Vendor: NVIDIA Corporation.
Name: GeForce GTX 460.
Version: OpenCL 1.1 CUDA.
Compute units: 7.
Global memory: 1024 MB.
Local memory: 48 KB.
Max image size: 16384 x 16384.
Max image buffer size: 134217728.
Creating command queues.
Creating image program.
** Error: CL error code: -30 : ........\src\compute\compute.cpp : 394
This error code is :
-30 / CL_INVALID_VALUE / clGetDeviceIDs, clCreateContext / This depends on the function: two or more coupled parameters had errors.
@Berenger - Rove3D requires OpenCL 1.2, and currently nVidia has added support for this on their 6-series and newer cards (GTX 680 and up). We are adding CUDA support soon (within the next month) which will allow older nVidia cards to run this, so stay tuned for that update. Twitter is the best way to keep up with updates: x.com
@rove3d I’m on a different computer and good to go now.
How can I create materials at runtime ? I’m downloading them as asset bundles and would like to convert them at runtime but no luck so far. I’ve tried to mimic the process used by the API’s inspector, but without success.
@Berenger - Materials are represented in two places, in the editor inspector window, and internally for the plugin. Do you want to load your materials at runtime in the editor and present them in the inspector, or do you you just want to load them at runtime and control them entirely by script? Let me know and I will write a script for you as an example to show how to do what you need it to do.
v.0.0.5 released: 5% performance improvement, animation frame capturing with interface, improved API, +more. As always, use the download link from the original email to get newest version.
@Berenger - You can use the same link in the original e-mail you were sent to download the latest version, v.0.0.5. In this version, we have improved the way materials are handled at runtime. There is a new file, ‘Rove/ExampleScripts/RuntimeMaterial.cs’ that is a functional example of creating a new material at runtime and assigning it to a mesh. Here are the guts of it:
RoveAPI.RoveMaterial new_material = new RoveAPI.RoveMaterial();
new_material.name = "New Material " + rove_api.materials.Length;
new_material.type = RoveAPI.TYPE_DIFFUSE; // Types defined in 'RoveAPI.cs'.
new_material.double_sided = false;
new_material.flip_normals = false;
new_material.coating_color = Color.white;
new_material.coating_roughness = new Vector2(0.0f, 0.0f);
new_material.coating_ior = 1.5f;
new_material.coating_thickness = 1.0f;
new_material.color = new Color(Random.Range(0.0f, 1.0f),
Random.Range(0.0f, 1.0f),
Random.Range(0.0f, 1.0f), 1.0f);
new_material.color_alpha = 1.0f;
new_material.roughness = new Vector2(0.0f, 0.0f);
new_material.map_flags = 0x0; // Always initialize to 0x0.
// (No textures with this material, so no need to set texture properties.)
//////////////////////////////////////////
// Create new material using API function.
uint new_material_id =
rove_api.AddMaterial(new_material,
null, // Coating color Texture2D.
null, // Coating roughness Texture2D.
null, // Base color Texture2D.
null, // Base normals Texture2D.
null, // Base roughness Texture2D.
true); // Indicate we are creating at runtime.
// Assign new material to every sub-mesh of this RoveObject.
if (new_material_id != RoveAPI.ERROR) {
if (rove_object.mesh_id != RoveAPI.ERROR) {
for (uint m = 0; m < rove_object.sub_mesh_materials.Length; ++m) {
rove_object.sub_mesh_materials[m] = new_material_id;
rove_api.ChangeSubMeshMaterial(rove_object.mesh_id, m,
new_material_id);
}
}
}
I would find it more consistent to have a RoveCamera component attached to the camera with the fov / aperture / focal parameters, a separate material editor and the RoveAPI component containing only the settings, capture and whatever you’ll add later.
It can get difficult to edit the materials once you have many of them, I’d prefer a different method (I’m thinking about 3DSMax materials editor, that’s the only one I know)
It’s hard to tell when the calcul is done. Should I wait 1 second, 10, 100 ? Some callback would help.
I’m really eager to see the documentation so I’ll understand all the parameters, the material types, how to tweek the environment etc.
Having the ability to easily switch rove3D on and off at runtime. It can be done by script already, but I need to edit the RoveXXX scripts (RoveSun specifically, as the light is destroyed). My changes will be lost if I’m not carefull at the next version though.
Thanks for the feedback, I agree there is some workflow stuff to improve. I will also replace the code that removes Unity’s components with disables, and write a runtime enable/disable function into the API so that it’s easier to switch back and forth.
For those wondering, our current roadmap for the next month or so:
1.) A few rendering features (portals, HDR environment maps, sub-surface scattering material)
2.) Multi-GPU support
3.) Noise-reduction filter
4.) VR integration (starting with Vive)
I’m testing Rove3D but I didn’t find anything in the API regarding dynamic lights aside from the sun and sky. Is there any plan to support point and spotlights ?
Rove fails to init in ‘linear’ color space mode but works fine in ‘gamma’. Maybe you want to test that upon start to provide a specific error message
@unisip - Lights are represented by emissive meshes, like the headlights of the car in the example scene. To create one, you need to assign a material with ‘Type: Emissive’ to a mesh.
Thanks for the heads up, I will look into the linear color space issue.
Edit: The next version supports linear color space, but gamma color space is still recommended for Rove3D (we handle color spaces internally).
Could you point to any litterature on the web about the material model (coating, dielectric, conductive, etc) ? I’m not very familiar with that model and would like to figure out how to translate PBR materials to your model as close as possible. I do have the required math and programming background to figure it out with the right papers to lead me on the way I believe. Tried just to play around with settings but it’s very much trial and error and a bit of scientific background about what the different parts refer to would help.
@unisip - We are working on some documentation that will use more familiar terms to describe the materials, but here are the basics:
Coating: clear reflective/specular layer on top of the base material. Can be used to give a specular component to less-specular base materials, like diffuse or rough metals (conductors).
Diffuse: Rubber, plastic, cloth, wood, etc. Reflects light equally in all directions, so has no reflective or specular aspect. Along with a coating (with various roughness) pretty much accounts for any non-metallic, non-glass materials.
Conductor: Metals/mirrors. Use one-dimensional roughness to create something like brushed metal (anistropic), or equal X and Y roughness for regular metals (isotropic).
The “roughness” maps are greyscale maps that are used to indicate scratches, blemishes, reflectivity. This may be similar to ‘metalness’ maps, only we map from black (smooth, reflective, shiny) to white (rough, dull, un-reflective). These roughness maps are what give the scratched appearance to the 3 last images in the original post (red(diffse)/gold(conductor)/glass(dielectic)).
We recently added the ‘ExampleScripts/RuntimeMaterial.cs’ which is a good starting point if you are trying to convert materials from PRB properties at runtime.
Good work so far, this is easily the fastest path tracer I have ever seen. I think noise removal filter is the thing you need to give the most attention. Even as low as 10 samples per pixel this seems to give a pretty good image and yet if you increase the sample rate to 1000 per pixel the noise hasn’t been totally removed. That would suggest to me that brute force path tracing will never be feasible for a game or interactive experience on its own without noise.
Have you thought about combining this path tracers rendering path with a classical ray tracer to remove the noise ? You could for example render the scene with a 2 bounce high resolution raytrace so that you get noiseless direct lighting, hard first bounce reflections and hard shadows. Then you could render the scene at a quarter of the resolution with your pathtracer but only recording the samples after the first bounce so that only the raytrace would contribute to the direct lighting. If you blurred this low res path trace and then combined it with the high res raytrace you would get a noiseless image that could be used at interactive speeds for a game I would have thought. While the path trace image would be blurred and low res I would have thought it might actually help to soften the shadows and most second bounce reflections and global illumination would usually be blurry anyway.
You could also perhaps provide the option to use your render to bake a lightmap or just the global ilumination from the path tracer for systems that couldn’t handle it at realtime speeds or VR where I don’t think any high frequency noise would be good for the user so you would be better off having it baked.