msx80

[Software] Bluerender, a rendering engine for LDD

840 posts in this topic

Thanks to the open source SunFlow rendering system, i'm able to present:

Bluerender

A rendering engine for Lego Digital Designer.

How it works:

You just open the LXF file with Bluerender and click the big Render button. Optionally, you can choose an output png file and do a "preview" render: it will render the model in wireframe (useful for testing and framing your model). A set of default settings is provided that should looks good for most renders, but you can tinker with the scene description to use the full power of SunFlow.

Rendering is fast, a 1024x768 image usually take no more than five minutes on average pc.

This project came about as an experiment when i discovered that i could integrate SunFlow into Blueprint code with minimal effort. It's by no mean a competitor to Povray, which is slow but ultra-high quality, professional renderer.

Features:

  • Renders models, even big ones (tested on 12k piece models)
  • Completely customizable scene
  • Use camera settings from lxf file, so you can just frame your model in LDD.
  • Support for LDD decorations and decoration substitution

Limitations:

  • many :P

Documentation:

A wiki is available with plenty of documentation.

Using the renderer with default settings is quite simple. If you want to customize light, materials etc, you can change the scene description, simply edit the included scene.sc file. The syntax of the scene description is that of Sunflow and should be easy, there are some examples inside. Anyway some documentation is available here (note: it may be a little outdated at times).

You can optionally have a custom scene file for each model: simply copy the scene.sc file and name it like your lxf model (for example, if you have spaceship.lxf, create the file spaceship.sc, in the same folder of course).

You can override LDD decoration with your own adding lines like this in your scene file (the number is the decoration ID):

##CHANGEDECOR 59879 c:\path\to\custom\mydecor.png

Issue Tracker:

Have any bug or feature request? Be a good fellow and report it in our shiny issue tracker.

Requirements:

Disclaimer:

Use at your own risk, i decline any responsability for anything that may happen to you using the program.

Download:

You can download Bluerender vers. 0005 here.

Flickr Group:

You can add your renders to the official Bluerender Lego Rendering group.

Running on Mac:

Some people were able to run Bluerender on Mac. Try the following instructions:

  • Remove all java installations
  • Install Java, but not from Oracle, from Homebrew instead. What's HomeBrew? I've no idea, but you can try following these instruction.
  • Open a command prompt/shell/terminal, cd to the folder where you unzipped Bluerender
  • Enter the following command: java -cp "bin/*" bluerender.BlueRender
  • If the program manage to start, it will ask you to locate the db.lif file, you should find it here: /Users/USERNAME/Library/Application Support/LEGO Company/LEGO Digital Designer/db.lif

Special thanks:

to Bublible for his help with the renderer.

to Jackalope for his help testing the app on Mac.

to Fabrizio for his precious time as beta tester.

Screenshot:

screenshot.png

Example Output:

(these models are taken from the web, not mine)

1418063886m.lxf.jpg

1016.150309.135258_Gundam_Chroma_S4_Balthious.lxf.jpg

1424445098m.lxf.jpg

village_cold.lxf.jpg

minibackhoe.lxf.jpg

More examples can be found here.

Here you can find a 3027x2304 render of a 12000 parts model, took about 30 minutes.

Changelog:

0005:

  • Black is now real black #93
  • Glass is now lighter #82 (thanks to bublible)
  • Implemented bublible chrome materials #73 (thanks to bublible)
  • Corrected NPE with invalid color codes (default to white) #86
  • Implemented aliases parsing and caching #81, #68
  • 360° rotation renders #71
  • can now place light with transform{} blocks #72 (thanks to bublible)
  • overwrite and other options are now persisted #64
  • basic parameters are now in the app #65
  • changed default background to white

0004:

  • Janino shaders now work
  • Automatic aspect ratio
  • Overwrite without asking checkbox
  • No longer "forget" some flexible elements
  • Correct background color reflection for mirrors (no more black)

0003:

  • Model loading is fast again (even faster!)
  • Some textured glass support (not perfect yet)
  • Clickable scene label (opens the scene file)
  • Self adjusting plane height
  • Search file in db folder beside db.lif
  • Bugfixes

0002:

  • remembers last used folder
  • ask before overwrite
  • use a single scene.sc file instead of three files for setup, materials, lights
  • scene files are not shown on the program anymore (was more confusion than anything)
  • optional per-model scene file
  • LDD decoration support
  • custom decoration support

0001:

  • initial release

Edited by msx80

Share this post


Link to post
Share on other sites

Thanks for this tool! I really appreciate. :grin:

Two fast questions:

- LDD is among requisites, it it necessary that LDD is installed on the machine that performs the rendering?

- Is sunflow integrated in the package? (I didn't get it yet)

Edited by Calabar

Share this post


Link to post
Share on other sites

Thanks for this took! I really appreciate. :grin:

Two fast questions:

- LDD is among requisites, it it necessary that LDD is installed on the machine that performs the rendering?

- Is sunflow integrated in the package? (I didn't get it yet)

- The program really only need the database file of LDD to read geometries etc. If LDD is installed, it will autolocate it. If it's not installed, you will be asked to locate the db.lif file manually. This way you can simply copy the file to a new machine without installing the software (that's how i use it at work.. but don't tell around :P). The file by default is installed under: C:\Users\USERNAME\AppData\Roaming\LEGO Company\LEGO Digital Designer\db.lif

- Yes, Sunflow is integrated, no need to download anything else.

Share this post


Link to post
Share on other sites

Not bad, not bad, tho definitely if you can inspire with ldd2povray as for the interchangeable decors functionality...ehm, I mean at least the decors ability intself for first, of course. :laugh::thumbup:

Share this post


Link to post
Share on other sites

Nick, my compliments for another nifty program. I've had very satisfying results with Bluerender, the combo of speed and quality is really good.

18011181410_1dbb0055ac.jpg

McLaren MLP7 by SPARKART!, on Flickr.

Share this post


Link to post
Share on other sites

Thank for this great tool! Train model below (4,238 bricks) took only 1 min 39 sec!

This rendering speed is good for making animation.

Suggestions:

- Trans clear part material is too dark. (train headlight & windows of nanoblock castle below)

- Error if render scene with many kind of different bricks. (out of memory?)

The road part model by Dilvish.

18222549815_8147fbf134_c.jpgBluerender0001 test by Nachapon S., on Flickr

18218901782_654e80b95b_c.jpgCASTLE 5.lxf by Nachapon S., on Flickr

Edited by bbqqq

Share this post


Link to post
Share on other sites

wow, that's a sweet model and a great render! :) glad to see it works!

Share this post


Link to post
Share on other sites

Hi msx80,

The pictures are quite impressive! As a pure LDD builder I wanted to give a try.

However, the lwjgl32.dll file in the native directory is infected by a Trojan according to my Symantec Endpoint Security:

Trojan.Gen.SMH.2

Please take a look on it, a clean package would be better. :wink:

Thanks,

Zoli

Share this post


Link to post
Share on other sites

omg really?? i'll take a look right now. I downloaded the new library just a couple of days ago

Share this post


Link to post
Share on other sites

I also got security warning on all the included .dll :sceptic:

Share this post


Link to post
Share on other sites

wow, that's a sweet model and a great render! :) glad to see it works!

Thanks, just make some more quick test.

A 3876 pcs death star took 3 min 22 sec.

I tried to render two death star at once but error. After delete some unseen part to 5842 bricks, two partial 10188 took 2 min 55 sec.

17603249213_ce771d9916_c.jpgdsl.lxf by Nachapon S., on Flickr

17601255374_82b8df590b_c.jpgBluerender0001 test 2 by Nachapon S., on Flickr

18224204795_ddfa6e2458_z.jpgerr by Nachapon S., on Flickr

Edited by bbqqq

Share this post


Link to post
Share on other sites

I also got security warning on all the included .dll :sceptic:

Can you show me the warnings? What software are you using? I'm

I just ran a scan with Norton Power Eraser and it found nothing. I also re-downloaded the lwjgl binaries from here and it looks identical to the one i have here. I'm downloading Symantec Endpoint Protection to check with it too.

Ok, i searched the lwjgl forum and it looks like the problem is on the library itself, they report the same warning about Trojan.Gen.SMH.2

http://forum.lwjgl.org/index.php?topic=5590.msg30895#msg30895

I'll ask there, but i'm starting to think it's a false positive

Share this post


Link to post
Share on other sites

I'll ask there, but i'm starting to think it's a false positive

That's most probable... I have crappy Norton Internet Security at work. It reported the trojan problem on lwjgl32.dll, and marked the other dll as unsafe.

Share this post


Link to post
Share on other sites

Update: I tried getting the standard lwjgl distribution and had the same problem. I decided to bypass Norton temporarily and use the DLLs from the lwjgl distribution.

I did a comparison with a recent POV-Ray rendering at high quality. Bluerenderer was about 10x faster (!), but the quality was much lower.

What expectations should I have for this project? Is it intended to be a faster replacement for POV-Ray (someday), or just something to make quicker (but less fancy) renderings?

A couple of small observations...

  • readme.txt still references Blueprint instead of Bluerenderer
  • When I changed the resolution in the setup to match the resolution of my POV-Ray image (for comparison), the result was that my image was stretched to fit the new aspect ratio (all the bricks were flatter in this case). Not what I expected, and I suspect not what anyone wants.

Share this post


Link to post
Share on other sites

I did a comparison with a recent POV-Ray rendering at high quality. Bluerenderer was about 10x faster (!), but the quality was much lower.

What expectations should I have for this project? Is it intended to be a faster replacement for POV-Ray (someday), or just something to make quicker (but less fancy) renderings?

The second one :) If high quality could be made faster, they would have already made it in POV-Ray. It will never be a replacement for it. But let's say you make a small model and you want to show it quickly on flickr, you can do it right away without having your pc work all night and waiting the next day.

What were the quality problem you noticed? Maybe it's something i can fix. One thing i noticed is that sometime, depending on the direction of your model, you get the sunlight "behind" the model and you see the unlit side, for an unpleasant result. Turning the sun direction in the "light" settings can fix this.

A couple of small observations...

  • readme.txt still references Blueprint instead of Bluerenderer
  • When I changed the resolution in the setup to match the resolution of my POV-Ray image (for comparison), the result was that my image was stretched to fit the new aspect ratio (all the bricks were flatter in this case). Not what I expected, and I suspect not what anyone wants.

Ops, i have to fix the readme :P

Uhm there's an "aspect" ratio in the "camera" setting under "Setup". Have you changed that too? I'll see if i can make it automatic, it's quite obvious that it should match the screen resolution.

Thanks for your feedback and for taking the risk despite the warnings. I hope they'll solve the problem soon :)

Share this post


Link to post
Share on other sites

The second one :) If high quality could be made faster, they would have already made it in POV-Ray.

Ehm, not quite true: see The Foundry MODO rendering engine for example (but it's payed application costing like 1000€, of course) :wink:

Share this post


Link to post
Share on other sites

What were the quality problem you noticed? Maybe it's something i can fix. One thing i noticed is that sometime, depending on the direction of your model, you get the sunlight "behind" the model and you see the unlit side, for an unpleasant result. Turning the sun direction in the "light" settings can fix this.

I don't think it's a "problem". Here's a comparison image:

18208591776_9a92ee46b5_c.jpgBlueRender comparison by iceleftd, on Flickr

POV has more definition (bevels between bricks, for example) and better shading, but those are white tables and they look light bley in POV. Seeing some other images in BlueRender (by Nachapon, for example), I'm beginning to like the look of BlueRender better.

Uhm there's an "aspect" ratio in the "camera" setting under "Setup". Have you changed that too? I'll see if i can make it automatic, it's quite obvious that it should match the screen resolution.

Making the aspect ratio match the resolution fixed the problem (thanks). I think the best solution is to have the aspect ratio default to the resolution size but let it be overridden in the setup file (and then comment out that value in the default file).

I don't know if this is the right forum for bug requests, but here's another small one: It really should prompt you before overwriting an existing image file.

Share this post


Link to post
Share on other sites

@msx80

Well, I have to admit your SW is doing quite excellent job for my quick renders of MOCs' modularities - it is REALLY QUICK and tho without decors for some reason they look very nice almost artistic like :sweet: , so thanx once more and hoping you will definitely implement that decoration support (I will post my BlueRender renders quite soon today, like a few minutes later in my Sci-Fi subforum posts so you can check them there if you like) :thumbup:

Share this post


Link to post
Share on other sites

@msx80,

I saw the answer of the lwjgl forum admin, it seems the Norton product family is giving false positive alert for the dll.

So I created a quick render of my latest builds.

42038 Arctic Truck. 888 pcs was rendered in 3:30 (800x600) on Intel Core i5-3320M (2 cores at 2.6GHz). Java.exe took 1GB of RAM.

42038_arctic_truck_a_render.png

42028 Arctic Truck B

42038_arctic_truck_b_render.png

5580 Highway Rig

5580_highway_rig_a_render.png

42029 Customized Pick-up Truck (1060 pcs, 4 min)

42029_customised_pick-up_truck_a_render.png

42006 Excavator (694 pcs, 2:30 min)

42006_excavator_a_render.png

The tracks are not fully visible although they are above the horizon in the LXF file.

I think the Transparent items needs some fine tuning, they are almost looking invisible/black.

But I'm very satisfied with the results!

Thank you for your great software! :wink:

Edited by mzoli

Share this post


Link to post
Share on other sites

@msx80,

I saw the answer of the lwjgl forum admin, it seems the Norton product family is giving false positive alert for the dll.

So stop using that pseudo AV and use something that really works without giving you error on false positives and is even for free like for example avast! :wink:

I was using Norton, AVG, even NOD many years back but all of them had some sorts of problems like the one many of you are mentioning here, but since I am using avast! there are no such probs lakily anymore (I am using BlueRender with the AV without any false positives here). :thumbup:

Edited by bublible

Share this post


Link to post
Share on other sites

Thanks everybody for the great feedback!

26,000 pcs took only 6 min render time! (by average gaming notebook)

18207601776_d2ac15b957_b.jpgBluerender0001 test 10 by Nachapon S., on Flickr

Woah, that's just huge :O

I don't think it's a "problem". Here's a comparison image:

18208591776_9a92ee46b5_c.jpgBlueRender comparison by iceleftd, on Flickr

POV has more definition (bevels between bricks, for example) and better shading, but those are white tables and they look light bley in POV. Seeing some other images in BlueRender (by Nachapon, for example), I'm beginning to like the look of BlueRender better.

Making the aspect ratio match the resolution fixed the problem (thanks). I think the best solution is to have the aspect ratio default to the resolution size but let it be overridden in the setup file (and then comment out that value in the default file).

I don't know if this is the right forum for bug requests, but here's another small one: It really should prompt you before overwriting an existing image file.

Well they're very different. LDDtoPovray does some processing inbetween LDD and Povray, such as the bevels, or the Lego logo, primitive substitution etc, while bluerender just feed the original geometries as-is to the renderer. Indeed without bevels the bricks just merge together :)

I noted your suggestions, they'll be in the next release

Did some tests too and I like the results :classic:

Show us something :)

@msx80

Well, I have to admit your SW is doing quite excellent job for my quick renders of MOCs' modularities - it is REALLY QUICK and tho without decors for some reason they look very nice almost artistic like :sweet: , so thanx once more and hoping you will definitely implement that decoration support (I will post my BlueRender renders quite soon today, like a few minutes later in my Sci-Fi subforum posts so you can check them there if you like) :thumbup:

You're welcome! :) i've seen the renders in sci-fi, great models! Decors are on the way, both in blueprint and bluerender :)

@msx80,

I saw the answer of the lwjgl forum admin, it seems the Norton product family is giving false positive alert for the dll.

So I created a quick render of my latest builds.

...

The tracks are not fully visible although they are above the horizon in the LXF file.

I think the Transparent items needs some fine tuning, they are almost looking invisible/black.

But I'm very satisfied with the results!

Thank you for your great software! :wink:

Great renders! The red pickup really shines, while the arctic truck suffer from the "sun behind the model" problem. For the excavator: LDD lowers the ground "on-demand" to adapt it to the lowest point of the model while bluerender does not, it's fixed at height 0. You can change it manually in the "setup" panel, there's a comment there that explains how.

Yes, the trasparents are way too dark, but i haven't been able to find a setting that looked better. If anyone want to tinker with the "materials" tab and find some decent values :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.