Update: The exporter is not being actively developed while I am busy with projects. Development should pick back up at a later date.

Corona Renderer is a new renderer developed by Ondra Karlik. It’s available as a 3DS Max plugin or as a standalone renderer. While the standalone renderer doesn’t support as many features as the Max plugin, it’s still very fast, very powerful, and can produce very high quality images using a number of different biased and unbiased rendering algorithms.

In the Corona Render user preferences, set the path to the Corona Standalone directory containing Corona.exe

Select Corona as the renderer from the render engine dropdown.

Set the export path.

Render. Large scenes may take a while to export and load in Corona, so be patient.

Exporter To do list:

Camera shift

Warnings:

Only UV-mapped image textures of formats PNG, EXR, BMP, JPEG, TGA, TIFF, GIF are supported. Other projections and texture types are not supported.

Some non-manifold and loose geometry (vertices, edges) will break rendering. Geometry should to be clean. Check the console for errors if rendering fails; Corona will report which .obj files are giving it trouble.

Thanks to Franz Beaune and Esteban Tovagliari for the original Appleseed export code and their continued help with that, much of which was used for this exporter.

Salut Joel,
J’ai bien aimé ton addon Xnormal et ton site google+. I see today you are crazy of python too.
To reply to your question: personally I perfer using a mostly generic and familiar BI UI.
And Corona renderer’s web site tell us “Corona is easy to use” : Amazing, the blender exporter must be simple then! No?
If I observe the corona/doc, you have a lot of job!
Good luck!
Bye
Spirou4D

Hi Joel,
Thanks for your commitment. The Luxexporter is a good example I think. Having a button to convert BI Materials and also a PyNodes node system. The Mitsuba exporter is based on it. Maybe you can do the same (start to modify their exporter for corona) ? It would be faster than writing from scratch and :

Having a Node System like in Cycles and Lux now (soon mitsuba ?) would be better for people not too learn different UI type for every renderer.

People stick to a renderer because they don’t want to relearn x time to build materials and to loose all their assets. Being able to just click on “convert materials” on a already configured BI blend file and having it render correctly in Corona would give that renderer a really big library of assets with blendswap also. The importers (obj, collada, …) also imports materials as BI materials, so if your script can convert that to corona materials transparently, it would spare a lot of time to the artist.

Hi Joel,
Thanks for your commitment. The Luxexporter is a good example I think. Having a button to convert BI Materials and also a PyNodes node system. The Mitsuba exporter is based on it. Maybe you can do the same (start to modify their exporter for corona) ? It would be faster than writing from scratch and :

Having a Node System like in Cycles and Lux now (soon mitsuba ?) would be better for people not too learn different UI type for every renderer.

People stick to a renderer because they don’t want to relearn x time to build materials and to loose all their assets. Being able to just click on “convert materials” on a already configured BI blend file and having it render correctly in Corona would give that renderer a really big library of assets with blendswap also. The importers (obj, collada, …) also imports materials as BI materials, so if your script can convert that to corona materials transparently, it would spare a lot of time to the artist.

Hi matali, thanks for the input. I initially thought about using that as a template, because it’s a very nice UI. I might just design a UI that looks a lot like that.

But Mitsuba and Luxrender have a lot of similarities in terms of what they’re exporting. Corona is pretty different. Corona Standalone reads .obj files and .mtl files, so one could basically just export a basic BI scene as a triangulated .obj + .mtl, and Corona should be able to read it (with a few tweaks to the .mtl file, like texture paths). So in some sense, materials don’t even need to be ‘converted’ to anything.

Corona has material parameters like ‘refractFresnel’, ‘reflectFresnel’, etc., that don’t exist in an .mtl file unless I explicitly export them in the exporter. These are the kinds of things that I’m curious whether people want exposed in the UI - do you want to see things like ‘Fresnel Refraction’ in the UI, or just use the BI material system and have parameters like ‘refractFresnel’ calculated behind the scenes?

If they’re exposed, I can definitely add an operator to convert materials to Corona materials, no problem.

About PyNodes - that’s gonna take some serious research for me. I haven’t dug into that at all yet. Though I do believe Atom has!

@Atom - yeah, but I think that’s gonna be a while. It’s been free for a long time, and I imagine it’ll stay that way for a while. I could be wrong. Also I thought that he said that there will be free versions alongside commercial versions in the future? Don’t quote me on that though…

But even if it goes completely commercial, it’ll still need an exporter (like Octane, V-Ray, Maxwell, etc.).

Salut Joel,
J’ai bien aimé ton addon Xnormal et ton site google+. I see today you are crazy of python too.
To reply to your question: personally I perfer using a mostly generic and familiar BI UI.
And Corona renderer’s web site tell us “Corona is easy to use” : Amazing, the blender exporter must be simple then! No?
If I observe the corona/doc, you have a lot of job!
Good luck!
Bye
Spirou4D

Haha, yes, “simple.” Of course. At this point I think I’m leaning toward not using BI’s generic panels, but exposing specific Corona parameters to the UI.

ohsnapitsjoel, here’s a blend file with the corona export script I mentioned in the other thread. I’ve included a readme text explaining how everything works in detail but I’ll run down the basics here.

My script iterates through the scene objects and looks for “Camera” and “Target”, which should be an empty the camera is ‘trackto’ constrained. The Target is there so I don’t have to figure out all that matrix stuff you were having trouble with. After that it will go through and export all mesh items using blenders export_object operator but with parameters that corona needs (triangles).

After that it creates the material. Here’s where most of my work came in. I created a node group called Corona Group, its an ubershader that works similar to how 3dsmax corona material works. To export properly every object needs this material group. I’ve tried to make it so that you can setup a scene with cycles and get similar results in corona.

I don’t have any of the configuration part of the render exposed in blender and not sure what would be the best direction, I guess that’s what you’re trying to figure out here. So I guess what I have is the skeleton of a material converter, it sounds like you are interested in creating the UI for the render settings? Perhaps we should join forces?

Some notes about the exporter, first please read the Readme in the blend file, but basically have a Camera and Target, all materials must use corona group node tree, and make sure the node group is named “Corona Group”. Set your directory at the top of the script. If you’ve exported a scene but changed only material settings there’s a second script that excludes the object export, this could save a lot of time if the meshes are heavy.

All of these steps I hope to implement in a more friendly fashion, I just wanted to get this out there as a sort of proof of concept, use cycles as a fast GPU preview then send it over to the fast CPU render.

Some examples below (5 min on 480gtx for cycles, 5 min on i7 950 for corona, neither render optimized for speed just using default settings).

Wow, very impressive matching of Cycles and Corona materials. I’ll take a look at the .blend later tonight.

Yes, I was planning to implement panels for all the render properties, render passes, and camera properties (or at least, all the ones I could figure out anyway. There are a few that I don’t understand anything about, since I can’t find an obvious parallel in the interactive docs).

I like the idea of a node group, since that’s a pretty nice workflow now that people are getting used to Cycles. I think there should be a default material that gets exported, though, instead of requiring every object to have the node group - does export or rendering fail if an object doesn’t have the node group? Are you using PyNodes, by the way?

Maybe better than iterating through the scene and looking for objects with very specific names (since a user is apt to change those), you can use a prop_search property or an EnumProperty (with a function to find only ‘Empty’ objects in the scene) in the UI to select the ‘Target’ empty. That’s a good workaround, though, for the time being! Very clever.

nope, no pynodes, I don’t quite grasp those yet but I don’t think they are neccessary…at least from the point of view of converting cycles materials to corona

The node group is basically an ubershader and the script will fail if an object doesn’t have one, but couldn’t the same be said of any external renderer and the internal program, ie in 3dsmax if an object doesn’t have a corona material it will render a red emission shader… actually thats a good idea I’ll add that, if the script can’t find the proper materials it defaults to a bright pink or something.

nope, no pynodes, I don’t quite grasp those yet but I don’t think they are neccessary…at least from the point of view of converting cycles materials to corona

The node group is basically an ubershader and the script will fail if an object doesn’t have one, but couldn’t the same be said of any external renderer and the internal program, ie in 3dsmax if an object doesn’t have a corona material it will render a red emission shader… actually thats a good idea I’ll add that, if the script can’t find the proper materials it defaults to a bright pink or something.

I think we definitely should combine our efforts. I’ve just added panels and properties for every render setting I could figure out. I think my layout might be a little cluttered and maybe a little claustrophobia-inducing, but it works for now.

I have an idea; I really like your idea of using Cycles nodes. I’ll PM you about it.

Hi Joel,
I can’t get the exporter to render. Your exporter seems to work well (the scn and obj… are created). I tried to render with the command line, i get the error that wx…vc_custom.dll is missing. I tried to copy the dll from WxWidget in the corona exe folder and in system32, I have all vc_redist from 2005 to 2010, I tried on xp and Win7, no success. Any Idea ?

Hi Joel,
I can’t get the exporter to render. Your exporter seems to work well (the scn and obj… are created). I tried to render with the command line, i get the error that wx…vc_custom.dll is missing. I tried to copy the dll from WxWidget in the corona exe folder and in system32, I have all vc_redist from 2005 to 2010, I tried on xp and Win7, no success. Any Idea ?

Nope, not yet, sorry I haven’t done any experiments at all with command line rendering; I just enabled it in the dropdown as a placeholder for when I can get around to experimenting. I may or may not have the same trouble, I’ll have to let you know.

Update 7/14/13 - added elindell’s Cycles node conversion code, and a button in the node editor UI for creating his ubershader node network. So you can now use his method of previewing materials in Cycles, then exporting them to Corona. Textures are not supported yet with this, however.
-objects are exported as individual .obj files instead of one large one
-Some bug fixes