Sunflow rendering system - New version feb 5!

Update:

Feburary 5, 2006
New version out. Get it and the blender script from the download page. New features in this release include:

* OpenEXR output
* Robust kd-tree traversal (link)
* Experimental integration with Janino for compiling user shaders on the fly
* A few minor bug fixes

Be carefull, the command line to start Sunflow has changed. Check the README for more information.

Christopher Kulla (fpsunflower) has released a precompiled package for his open-source rendering system Sunflow. Previously, only the sources were available. There is now also a script for blender export, courtesy of Robert Lindsay (hayfever_). Well, I’ll just quote Christopher himself from the news-page:

January 20, 2006
I have posted a precompiled binary package for those folks who don’t want to mess with the source code. Get it here. I am also making available a simple Blender export script. Thanks to Robert Lindsay for writing most of this. I am not making an official package for this just yet since its very new. Place it in your .blender/scripts folder and restart Blender. The script will let you set a few basic render options and export the geometry to disk. You will most likely need to tweak the exported scenes by hand to get the most out of the software. Better integration to Blender is planned, so keep on checking back here for updates! Feedback is welcome, please use the Sourceforge mail system to reach me.

http://sunflow.sourceforge.net/index.php?pg=news

Thought this might be interesting for blender-people. Unfortunately, I haven’t had much luck with the export yet. I get a black screen.

Hi Bellorum, thanks for moving this here. You may be getting a black screen due to the light setup try using a meshlight (see below), as for overwriting the .blend file (???) i didn’t have that problem, if it happens again can you provide the steps that made this happen so i can have a look. Below are a few features of the script that will allow you to export Sunflow specific settings and will be included in a readme at some point.

  1. to create a meshlight, add a mesh object and make sure the object name begins meshlight, if you use a plane make sure the normals are pointing in the right direction. You can use any mesh to emit light.
  2. to add an ibl light, create a new world and add an image texture called ibllight and load a .hdr image file
  3. enabling raymirror in materials will export the shader as mirror type
  4. enabling raytransp in materials will export the shader as glass type
  5. surfaces (nurbs) are also exported without converting to meshes, although i don’t think they all work, curves for example

Written 100% in Java

Isn’t that going to be brutally slow? Anybody have any experiences with it?

Thanks for the tip. First modest result below :slight_smile:
http://img24.imageshack.us/img24/364/sunflow9ti.jpg

as for overwriting the .blend file (???) i didn’t have that problem, if it happens again can you provide the steps that made this happen so i can have a look.

My bad actually. :expressionless: Everything works like it should now.

How do I do a simple GI render, without any mesh lights?

This looks interesting … Send me the scene file if you want, you can also try editing the .sc and change “type mesh” to “type flat-mesh” in the cube definition. My guess is there’s something wrong with the normals. Proper support for blender style normals and uvs is comming in the next release.

The script has basic support for point lights. Create one in the scene and turn on path tracing in the exporter.

The script has basic support for point lights. Create one in the scene and turn on path tracing in the exporter.[/quote]

Hello, there was a bug in the exporter, i’ve fixed it and sent it on to Chris

That fixed it.

Bellorum, thanks for the link. I’d really like to try it out but…

I can’t seem to get it working. I get this if i try running sunflow.jar:

Exception in thread “main” java.lang.UnsupportedClassVersionError: SunflowGUI (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

I’m using Linux and suspect i’m missing something.

thanks

Looks like you are running an older version of Java. Type

java -version

at the command line to check.

Once you installed the newest one, make sure you update your path. You need at least 1.5 for sunflow to work.

The script has basic support for point lights. Create one in the scene and turn on path tracing in the exporter.[/quote]

Hello, there was a bug in the exporter, i’ve fixed it and sent it on to Chris[/quote]

lakca, you can get the latest script from the website now, it has a fix to export the lamps. it was all my fault %|

Actually, with a newer Virtual machine with a JIT compiler Java can be as quick as native code. The perceived speed loss can be mostly explained by the time neccessary to initialise and create the virtual machine. Since this renderer will most likely be maths centric I imagine that it won’t be that much slower, if at all, then a native solution.

The script has basic support for point lights. Create one in the scene and turn on path tracing in the exporter.[/quote]

Hello, there was a bug in the exporter, i’ve fixed it and sent it on to Chris[/quote]

Point lights?

[/quote]

Point lights?[/quote]

Blender Lamp

Loading of .tga imagetextures dies with an IllegalArgumentException. I’ll email Christopher too, as I understand he doesn’t visit here?

/edit

Ok, thanks hayfever. I’m an ass and/or can’t see very well.

Sunflow dies with

D:\kielet\Blender\Sunflow>java -jar -Xmx800M sunflow.jar
Exception in thread "Thread-2" java.lang.IllegalArgumentException: Empty region!

        at javax.imageio.ImageReader.computeRegions(Unknown Source)
        at com.sun.imageio.plugins.wbmp.WBMPImageReader.read(Unknown Source)
        at javax.imageio.ImageIO.read(Unknown Source)
        at javax.imageio.ImageIO.read(Unknown Source)
        at org.sunflow.image.Bitmap.<init>(Bitmap.java:151)
        at org.sunflow.core.Texture.<init>(Texture.java:17)
        at org.sunflow.core.TextureCache.getTexture(TextureCache.java:25)
        at org.sunflow.core.shader.TexturedDiffuseShader.<init>(TexturedDiffuseS
hader.java:13)
        at org.sunflow.SceneParser.parse(SceneParser.java:341)
        at SunflowGUI.loadScene(SunflowGUI.java:197)
        at SunflowGUI$15.run(SunflowGUI.java:90)
        at java.lang.Thread.run(Unknown Source)

With this material:

shader {
   name Material
   type diffuse
   texture D:\kielet\Blender	extures\corvette_insign.tga
}

This was a simple cube exported from blender and the precompiled jar. Changing the texture to something else renders fine. I also checked that the tgafile is present.

Thanks for a promising looking software, none the less.

He will be looking at the forum, id is fpsunflower (see previous page for some of his posts)

I do visit here =)

TGA files are not supported at the moment I’m afraid. Try converting your texture to jpg or png.

note for OS X:

Java 1.5 is only supported by OS X 10.4+ and needs a manual download from apple.

Will sunflow compile under 1.42?

No. I use some new features like generics and enums that are not present in 1.4.x

I have gotten Sunflow to work on OSX with the said manual download though. It will not overwrite your path, so you will need to dig through the framework directories to find the proper java executable, but it works.