Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted

@aeralure it doesn't work on mac right now. Since it looks like there's a lot of demand i may ask some friend if they can let me use their mac..

Ah thanks. I saw that it was Java so I just made the assumption that it would as most Java applications I run across are cross platform. I was pretty excited!

Please do borrow a Mac if you could, when it fits your development schedule to look into it. I'd really love to be able to render projects and for Mac users there's a bit of demand as a few of the more common solutions do not work (or don't work easily).

  • Replies 1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

PROBLEMS:

* if there is brick 4865 in a model BR stops giving error

java.lang.ArrayIndexOutOfBoundsException: 1

* if there is brick 2607 (MAGNET HOLDER) in a model this brick is not rendered at all

Uhm that's interesting. Could you send an lxf with only 4865 in it? I'm at work and don't have LDD installed. For the second part, it's probably an alias, there are some parts defined like that, maybe there's a similar part that works (bluerender doesn't support aliases).

hi... i just wanna thank you for the awesome application u have made.. anyway i just wanna ask a thing. how do you change the background color instead of the default blue color... and can we change the white color too? since there's a blue and white background if on some certain camera angle. i just want a simple tutorial on the color thingy since i tried few things but failed to change it. what color does it use, rgb hex? html? or something else.

background {

color { "sRGB nonlinear" 1 1 1 }

}

Thanks :) It's great to hear people liking the program :)

The colors are in RGB format, where each value goes from 0 to 1 (0 0 0 is black, 1 1 1 is white). You can change the background in that portion, while the plane can be changed in the "PlaneMaterial" shader, the "diff" variable which is actually { "sRGB nonlinear" 0.3 0.6 0.976 }

Ah thanks. I saw that it was Java so I just made the assumption that it would as most Java applications I run across are cross platform. I was pretty excited!

Please do borrow a Mac if you could, when it fits your development schedule to look into it. I'd really love to be able to render projects and for Mac users there's a bit of demand as a few of the more common solutions do not work (or don't work easily).

There's nothing that shouldn't work on mac, but i tried with some people to figure out command lines etc, via trial and error but it never worked..i already asked around, we'll see :)

Posted

First off, may I give you a thumbs up for another great program. It's fast, easy to use, and the ultimate advantage over LDD2POV-Ray: you can use LDD while Bluerender is running. If you figure out how to put LEGO text on studs whilst keeping the speed of render, I know you don't intend it to be but this may become a real LDD2POV-Ray competitor, especially for those who aren't so computer savvy :thumbup: This will definitely be used by me for now on to provide alternate pictures of LDD MOC's alongside the main POV-Ray render.

Now I haven't got time to read through 9 pages of posts, so I don't know if any of what I'm about to say has already been pointed out, so apologies in advance if it has!

Could I point out an error in your original post?

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).

Where you link, it comes up with a "page not found" so you might want to fix that or edit it out :wink:

Could I ask where I could find like a table of input RGB values for certain colours? I've always been familiar with using RGB values up to 255 (which is used in a lot of programs I use including Photoshop and POV-Ray), so using RGB values up to 1 instead is a little bit confusing for me :tongue:

Does using a custom .sc file slow rendering down considerably? I did a 620 piece render (including several flex tubes) using default settings and it took under 2 minutes. I did a render of exactly the same model using custom background and plane colours (both light gray) and that took over 3 times longer. Still considerably faster than POV-Ray though which takes about 10 minutes to just parse a 620 piece model on my computer!

If there's anything I'd like to see added (aside from LEGO text on studs option), would be the ability to choose your own .sc file to use. At the moment, to toggle between default and custom .sc files, I have to keep moving the .sc file to a different folder within File Explorer, then reselect the .lxf for Bluerender to pick up that the .sc file is there/not there, and that's quite a faff if I'm honest.

And finally: may as well play "spot the difference" between a POV-Ray render and a Bluerender render :laugh: (yes, I did zoom in on one before starting, and both have had an auto smart fix applied via Photoshop):

19083029571_f2f31cee2f_z.jpg

p.s. "Remember when it used to explode" never fails to put a smile on my face :grin:

Posted

Where you link, it comes up with a "page not found" so you might want to fix that or edit it out :wink:

Could I ask where I could find like a table of input RGB values for certain colours? I've always been familiar with using RGB values up to 255 (which is used in a lot of programs I use including Photoshop and POV-Ray), so using RGB values up to 1 instead is a little bit confusing for me :tongue:

Does using a custom .sc file slow rendering down considerably? I did a 620 piece render (including several flex tubes) using default settings and it took under 2 minutes. I did a render of exactly the same model using custom background and plane colours (both light gray) and that took over 3 times longer. Still considerably faster than POV-Ray though which takes about 10 minutes to just parse a 620 piece model on my computer!

If there's anything I'd like to see added (aside from LEGO text on studs option), would be the ability to choose your own .sc file to use. At the moment, to toggle between default and custom .sc files, I have to keep moving the .sc file to a different folder within File Explorer, then reselect the .lxf for Bluerender to pick up that the .sc file is there/not there, and that's quite a faff if I'm honest.

And finally: may as well play "spot the difference" between a POV-Ray render and a Bluerender render :laugh: (yes, I did zoom in on one before starting, and both have had an auto smart fix applied via Photoshop):

19083029571_f2f31cee2f_z.jpg

p.s. "Remember when it used to explode" never fails to put a smile on my face :grin:

They very recently moved the file.. strange for an inactive project! the pdf is now here.

About RGB values, well i don't know of any table, but it's basically just like you're used but divided by 255 :P So 120 200 255 becomes 0.47 0784 1.

Using custom sc should not slow the program per se, depends on what you put inside there. Just changing the color should make no difference. Maybe there was something else? You duplicated the panel instead of changing it? Or maybe there were other programs using resources (games, browsers, video, etc)?

Speaking of sc files, there's already a way to have custom scene! just put it in the same folder of your lxf with the same name (like spaceship.lxf and spaceship.sc), and it will automatically be picked instead of the standard one.

I've a hard time telling with render is which :) But the picture is private so we can't see it at full resolution.

Posted
Uhm that's interesting. Could you send an lxf with only 4865 in it? I'm at work and don't have LDD installed. For the second part, it's probably an alias, there are some parts defined like that, maybe there's a similar part that works (bluerender doesn't support aliases).

Link to the LXF: http://lego.queryen.com/download/20150623_br_4865-2607/4865_2607.lxf

+ no: no there is no other brick in LDD with this name or ID (there are only 3 parts containing the word magnet - "2609 PLATE 2X2X1/3 FOR MAGNET", "73092 MAGNETO HOLDER W. MAGNET", "2607 MAGNET HOLDER"), so what is the solution to the problem now?

Posted

They very recently moved the file.. strange for an inactive project! the pdf is now here.

About RGB values, well i don't know of any table, but it's basically just like you're used but divided by 255 :P So 120 200 255 becomes 0.47 0784 1.

Using custom sc should not slow the program per se, depends on what you put inside there. Just changing the color should make no difference. Maybe there was something else? You duplicated the panel instead of changing it? Or maybe there were other programs using resources (games, browsers, video, etc)?

Speaking of sc files, there's already a way to have custom scene! just put it in the same folder of your lxf with the same name (like spaceship.lxf and spaceship.sc), and it will automatically be picked instead of the standard one.

I've a hard time telling with render is which :) But the picture is private so we can't see it at full resolution.

Ah, that's what happened to the file! Definitely strange.

Well, all I changed was the plane and background colours (well, I increased the resolution from default to 2000x1500, that probably slowed it down a little), but I did notice the rendering program slow down. My last Bluerender renders on my Flickr took about 15 minutes each. Maybe it's got something to do with the fact I also had Photoshop Elements open (I'd forgot that program consumes 70% of my CPU's power even when I just have it open ready to import finished renders to add my watermark to it :tongue: )

Fixed the privacy settings on that for you so now you can play "spot the difference": https://www.flickr.com/photos/theoneveyronian/19083029571/in/dateposted/. See if you can guess which is which before you go read the photo description :wink:

But again, kudos to a great and easy to use rendering program that makes renders that can give POV-Ray a real run for it's money :thumbup:

Posted

Well, all I changed was the plane and background colours (well, I increased the resolution from default to 2000x1500, that probably slowed it down a little), but I did notice the rendering program slow down. My last Bluerender renders on my Flickr took about 15 minutes each. Maybe it's got something to do with the fact I also had Photoshop Elements open (I'd forgot that program consumes 70% of my CPU's power even when I just have it open ready to import finished renders to add my watermark to it :tongue: )

Fixed the privacy settings on that for you so now you can play "spot the difference": https://www.flickr.c.../in/dateposted/. See if you can guess which is which before you go read the photo description :wink:

But again, kudos to a great and easy to use rendering program that makes renders that can give POV-Ray a real run for it's money :thumbup:

Well the resolution is the main factor for render duration, doubling the resolution will slow the render four time (as there are four time as many pixels). If you also have 30% of free cpu power, your times are more than explained :) BTW It's terrible for photoshop to eat 70% cpu doing nothing!!

Now the bluerender render can easily be spotted by the absence of seams and the distinctive dotted shadow on the ground :)

Link to the LXF: http://lego.queryen....7/4865_2607.lxf

+ no: no there is no other brick in LDD with this name or ID (there are only 3 parts containing the word magnet - "2609 PLATE 2X2X1/3 FOR MAGNET", "73092 MAGNETO HOLDER W. MAGNET", "2607 MAGNET HOLDER"), so what is the solution to the problem now?

It renders both correctly to me. Are you sure you're using the right db.lif? It's NOT the one inside c:\programs\lego etc., as that one is the first that comes installed with LDD (ie, no updates). The updated one is under c:\users\name\AppData\Roaming\Lego etc..

And yes, LDD is wasting double the space it needs :)

TEQJDvV.png

Posted (edited)
It renders both correctly to me. Are you sure you're using the right db.lif? It's NOT the one inside c:\programs\lego etc., as that one is the first that comes installed with LDD (ie, no updates). The updated one is under c:\users\name\AppData\Roaming\Lego etc..

And yes, LDD is wasting double the space it needs :)

Hm, now that is really strange as my LDD updates itself a few days before and I never had problem with 4865 prior to that so it most probably is caused by the update...uninstall/install would be the easiest solution here tho I can check if there are more than one db.lif there somewhere, thanx for testing it.

Edited by bublible
Posted

Are there also parameters or something to influence the resolution to which the result is being rendered?

Update: Easy, in the config file. Works much better than Povray indeed. Much faster. Only two things in 0004 that I don't think work well: lights on vehicles become too dark. Road plates have turned into ice plates ;)

Posted

@msx80

Just to inform you: the problem with those two bricks is solved - it was really my local LDD installation messed up, reinstalling LDD helped so now they are rendered without any problem. :wink:

BTW I still did not figure out how to exactly reference a particular brick in a set tho I partly understood what you wrote me (as we were talking via PM lately), so can you please show us here some basic syntax let's say for a brick 3004? :wink: Cos as I understood you it should be something like this:

instance
{
   ...
   geometry "3004_<HERE-IS-PART-I-DO-NOT-UNDERSTAND>"
   ...
}

SUGGESTION:

+ could you please possibly implement that new variable/constant we were shortly discussing some time before that could be named for example %TOCAMERAVIEW% that would simply offset any object having transform attribute in place using this value according to actual BR camera position and Y angle, like this:

object
{
   ...
   transform %TOCAMERAVIEW%
   transform { translate 50 0 0 }
   ...
}

And also PLEASE set it for light object AS DEFAULT position for "source 0 0 0" = exactly where BR camera is placed on X and Z axis and Y angle (spherical and directional only, of course), so that "source 50 0 0" would actually place such light 50u to right from BR camera view instead of 50u to right from LDD baseplane front view as it is now...? Cos as it is now one can only guess and try to approximately place it where he intends to... :sceptic:

Posted

Are there also parameters or something to influence the resolution to which the result is being rendered?

Update: Easy, in the config file. Works much better than Povray indeed. Much faster. Only two things in 0004 that I don't think work well: lights on vehicles become too dark. Road plates have turned into ice plates ;)

Yeah, i know, transparent bricks are often rendered too dark.. needs some adjustment

@msx80

BTW I still did not figure out how to exactly reference a particular brick in a set tho I partly understood what you wrote me (as we were talking via PM lately), so can you please show us here some basic syntax let's say for a brick 3004? :wink: Cos as I understood you it should be something like this:

instance
{
...
geometry "3004_<HERE-IS-PART-I-DO-NOT-UNDERSTAND>"
...
}

SUGGESTION:

+ could you please possibly implement that new variable/constant we were shortly discussing some time before that could be named for example %TOCAMERAVIEW% that would simply offset any object having transform attribute in place using this value according to actual BR camera position and Y angle, like this:

object
{
...
transform %TOCAMERAVIEW%
transform { translate 50 0 0 }
...
}

And also PLEASE set it for light object AS DEFAULT position for "source 0 0 0" = exactly where BR camera is placed on X and Z axis and Y angle (spherical and directional only, of course), so that "source 50 0 0" would actually place such light 50u to right from BR camera view instead of 50u to right from LDD baseplane front view as it is now...? Cos as it is now one can only guess and try to approximately place it where he intends to... :sceptic:

You cannot reference a particular brick, becouse brick definitions (both instances and objects) are appended at the end of the scene.sc. You cannot inser your code past that, and you cannot reference things that are not defined yet.

If you want i can explain how they're named but it would be useless for you.

As for the light source, something similar is already planned. It will be possible to fix the sun direction in a way relative to the camera so to always have it coming from a certain angle

Posted
As for the light source, something similar is already planned. It will be possible to fix the sun direction in a way relative to the camera so to always have it coming from a certain angle

Thanx, but sun is not such a problem, it is much more needed for those two other types of lights but as it would be default for all lights then I am more than happy. :laugh:

You cannot reference a particular brick, becouse brick definitions (both instances and objects) are appended at the end of the scene.sc. You cannot inser your code past that, and you cannot reference things that are not defined yet.

If you want i can explain how they're named but it would be useless for you.

Understood now... :wink:

Anyway if you really could and would be so nice actually explain it to me I would be glad as I was finally able to compile SunFlow src (once again silly me: all I have to do was actually look into README :grin: ) so although there is a lot of code I think I understood principle so maybe I could play with it and who knows? :laugh::grin: Maybe after some time we will have seams, logo-on-stud, noshadow, noreflections in place...I have plenty of free time, I just need to see how things works :wink:

Posted

About the materials: do you have the definition for all chrome materials? i could import them, no problem if they reflect black for now. Just make sure you have all of them :)

As far as I know there are only 309 and 310 (Chrome Silver and Chrome Gold, respectively). There are quite a few other chrome colors that have been produced over time but they don't have corresponding color ids. Here's what I'm using.

shader {
name mat309
type mirror
refl 0.80784315 0.80784315 0.80784315
}
shader {
name mat310
type mirror
refl 0.8745098 0.75686276 0.4627451
}

To quote Scott Barnick on Flickr:

It's only fairly recently that the LEGO Group started assigning specific Material IDs to chrome colors, hence why 309 Metalized Silver and 310 Metalized Gold are neighbors with colors like 308 Dark Brown and 311 Tr. Bright Green.

So while it is possible to create entries for the other chrome colors with the appropriate RGB values, there would be no element color in LXF for them anyway.

I also managed to correct the black reflection. It now reflect the background color instead.

Finally got to test it. It looks MUCH better now! How did you do it?

Posted (edited)

Feature Request:

Reflectivity is set by default to .2 on individual material definitions, which results in models that are unnaturally reflective (real bricks just aren't all that mirror-like, even right out of the box). I would suggest changing it to a more modest .05 by default to make it more natural looking. Others may have a better value suggestion.

Edited by iceleftd
Posted

Thanx, but sun is not such a problem, it is much more needed for those two other types of lights but as it would be default for all lights then I am more than happy. :laugh:

Understood now... :wink:

Anyway if you really could and would be so nice actually explain it to me I would be glad as I was finally able to compile SunFlow src (once again silly me: all I have to do was actually look into README :grin: ) so although there is a lot of code I think I understood principle so maybe I could play with it and who knows? :laugh::grin: Maybe after some time we will have seams, logo-on-stud, noshadow, noreflections in place...I have plenty of free time, I just need to see how things works :wink:

Ok, if you want, i published the source of sunflow with my modifications, so anybody can see where i touched and how. You can find it here.

As far as I know there are only 309 and 310 (Chrome Silver and Chrome Gold, respectively). There are quite a few other chrome colors that have been produced over time but they don't have corresponding color ids. Here's what I'm using.

shader {
name mat309
type mirror
refl 0.80784315 0.80784315 0.80784315
}
shader {
name mat310
type mirror
refl 0.8745098 0.75686276 0.4627451
}

To quote Scott Barnick on Flickr:

So while it is possible to create entries for the other chrome colors with the appropriate RGB values, there would be no element color in LXF for them anyway.

Finally got to test it. It looks MUCH better now! How did you do it?

I'll put those definitions in the standard materials, thanks!

Glad to hear it looks better! I dug into Sunflow code, spotted some places where default colors were used (when there was no hit, no shader, or other cases), messed a bit and found where to change it. Inserted background color :)

Feature Request:

Reflectivity is set by default to .2 on individual material definitions, which results in models that are unnaturally reflective (real bricks just aren't all that mirror-like, even right out of the box). I would suggest changing it to a more modest .05 by default to make it more natural looking. Others may have a better value suggestion.

Isn't it a too low? I think for renders bricks should look pristine :) maybe i could lower it but i'm not sure. Anyway that' something everybody can change with a simple search/replace

Posted (edited)

@iceleftd

Ehm, I am not quite sure is mirror is the right type for chrome: it should not be that squeaky clean mirror-like reflections but rather slightly blurry one therefore using uber shader could be more appropriate as with that one you can somewhat play with "type/quality" of the reflections...just my opinion, quite a guess as I actually never used any chrome color/material in my models.

Feature Request:

Reflectivity is set by default to .2 on individual material definitions, which results in models that are unnaturally reflective (real bricks just aren't all that mirror-like, even right out of the box). I would suggest changing it to a more modest .05 by default to make it more natural looking. Others may have a better value suggestion.

I think it is just a matter of how you set up your lighting scene, my bricks with that default .2 value looks like normal very new ones. :wink:

Ok, if you want, i published the source of sunflow with my modifications, so anybody can see where i touched and how. You can find it here.

Thanx a lot! :thumbup:

I will deffinitely look into it later...

Edited by bublible
Posted

@msx80: Your tool works great. Look at my signature for proof ;)

Here is another proof:

Steam-Engine-7750-PF_smoke.png

I used Photoshop CC to make the smoke effect.

Posted (edited)

@msx80: Your tool works great. Look at my signature for proof ;)

Here is another proof:

I used Photoshop CC to make the smoke effect.

Your signature picture looks really good, seems almost real to me (at first I really thought that :sweet: ), so if it is rendered completely in BR then thumbs up, very good lighting setup! :thumbup:

BTW there seems to be problem with your second picture: it looks like wrong baseplane offset in LDD cos the bottom-most plates with rails are hanging in the air - if it is somewhat intended then it is OK of course.

Edited by bublible
Posted

@bublible, the roads are too 'icey' though and the bricks need to reflect a bit less (apart from the transparant problems). A lot of these things are only minor issues I think. I tried to render in pov-ray first, but it takes ages and also has issues.

Posted (edited)

@bublible, the roads are too 'icey' though and the bricks need to reflect a bit less (apart from the transparant problems). A lot of these things are only minor issues I think. I tried to render in pov-ray first, but it takes ages and also has issues.

I know POV-Ray, now as we have BR I too completely abandoned it and using BR only (my last render took literaly 7+ DAYS Nonstop...BR made it like for 10 minutes yet also in 2X bigger resolution? Unbelievable!!! :laugh: ).

Now, I do not know if I understood you right if the hanging of the base plates is intended or not but if it is a LDD kind of problem, just go to LDD, open your model, select all bricks (CTRl+A on Windows OS) and slightly just a tiny bit move your model - now the baseplane Y axis should offset right (in case your bottom plates are really the bottom-most objects/bricks in that model), save and re-render...now it should sit nicely on the ground when rendered. :wink:

As for the "too shiny bricks": hm, I don't know guys, I saw more ppl complaining about it and I can understand it but as I wrote earlier for me it is just a case of right lighting setup for your render, nothing else (at least for me :grin: ).

Edited by bublible
Posted

@msx80 -

My next area of focus is the dreaded "transparent objects cast shadows" problem. According to the Sunflow Wiki PDF, you can work around this in the mirror shader by turning on caustics. Trying to do that, however, results in a NullPointerException.

java.lang.NullPointerException
at javafx.embed.swing.SwingFXUtils.fromFXImage(Unknown Source)
at bluerender.a.a(Unknown Source)
at bluerender.BlueRender.a(Unknown Source)
at bluerender.BlueRender$$Lambda$278/490108022.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/730214495.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/1789447862.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/683287027.run(UnknownSource)
at java.lang.Thread.run(Unknown Source)

Another spot in the Wiki says "In the uber shader, setting the spec color to 0 0 0 and spec.blend to 0 will allow transparency, though this won't translate to transparent shadows at the moment.". That sounds encouraging, but is it a false trail?

You have been so productive and responsive so far - thank you!

Posted

Another spot in the Wiki says "In the uber shader, setting the spec color to 0 0 0 and spec.blend to 0 will allow transparency, though this won't translate to transparent shadows at the moment.". That sounds encouraging, but is it a false trail?

That is not quite true: maybe it is just me but transparency in/via uber shader simply did never work, on the other hand it did work with glass shader setting its color to white and eta to 1. :wink:

Posted (edited)

PROBLEM:

* file-mesh object type does not work at least for .obj files (PDF, page 70) - if I have code in .sc with the .obj file in the same directory as the .sc file written like this:

object
{
   shader mat1
   type file-mesh
   name dunes
   filename mesh.obj
   smooth_normals true
}

...then BR stops giving error:

java.lang.ArrayIndexOutOfBoundsException: 3

EDIT:

+ I just tested also .stl and it does not work as well tho in this case there is no error: render finishes but there is no new mesh/object from the .stl file anywhere (yet SunFlow supports .obj, .stl and .ra3 mesh files)

:look::sceptic:

Edited by bublible

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

Announcements

  • THIS IS THE TEST SITE OF EUROBRICKS!

×
×
  • Create New...