Free Add-on for Blender
Scrubs started this discussion in Model Export and Render
Avatar of Scrubs
Administrator

Mecabricks Add-on for Blender

About this thread
You will find in this section everything needed to easily make photorealistic renderings of Mecabricks models with Blender.

Software and files needed
Blender
Blender Add-on by Mecabricks
• Environment images [e.g. zbyg Packs]

More…
653 replies · Page 2 of 33
Avatar of Scrubs
Administrator

So, I did some experiments on a PC under Windows (it runs fine on the macos version of Blender) and I managed to make Blender crash too. After investigation it looks like the Subsurface Scattering node with a Cubic falloff and a Sharpness value of 1.0 doesn't like the Round Edge shader (OSL) as a Normal input.

I doesn't matter if you did not understand a single word of the previous sentence, what you need to know is that I think I fixed the issue and I will make available the new version for testing in a few hours as soon as I come home 😃

[edit] I managed to render the Drawbridge Defense model with this new set up. Hopefully it will solve your issue.

Avatar of Scrubs
Administrator

Last version available here. Let me know if it still crashes.

My rendering of Forestmen's crossing ([url]http://www.mecabricks.com/en/models/B9P2kQrZvon[/url]) goes for WAY longer but still crash.
unfortunately i didn't think of bringing up the console to see what wrong with it.
Here a screen of the rendering the moment it crash. maybe it would help...
[url]http://i.imgur.com/HcmmaTa.jpg[/url]
Thank you for your help !

EDIT : So the render didn't crash at 25% of the resolutions (Why ? oO), but i still have some warning in the console. here's a screen : [url]http://i.imgur.com/3pZoai6.jpg[/url]

Avatar of Scrubs
Administrator

It is really weird. For example yesterday, I managed to make it crash after only 4 tiles (32👨2) simply by increasing the mix value of sss and diffuse shader from 0.4 to 0.6. Nothing really makes sense so the best I can do is to find a set up that does avoid a crash!

Can you please try this one and tell me if it works up to the end?

The render did work this time !
Thank you !
[url]http://www.mecabricks.com/en/models/B9P2kQrZvon[/url]

I will try that template on more set tomorrow, I'll update if anything goes wrong.

Avatar of Scrubs
Administrator

Good to know!

In the tutorial you say its better not to modify the part position after having run the script. Is the rendering result ok when I "re-run" the script after having altered the model position for the next shot?

Avatar of Scrubs
Administrator

You can actually move/rotate your model after you ran the script. This is scaling which is the issue. Re-running the script won't do anything except creating a new bunch of materials that won't be used.
If you have a look at a material node, you will see that there is an input scale. It shall match the scale of the object Model - assuming that children of this object have a scale of 1.

I have my report now. My crash is from the Python 2.6.1 not handling the “rng” functions. They were added to Python at the version 2.7. It took me a bit of time to take the material nodes apart and substitute the shader written by VarkenVarken. The final break though was when I figured out the size of the bricks made a difference. So far I have just rendered the bricks that come in the template. But I feel the biggest hurdle has been overcome. I’m now ready to download and render a model. More to come. By the way the work you have done is awesome.
Thanks

Avatar of Scrubs
Administrator

Thank you 😃

Good to hear that you managed to solve your issue. It is helpful to know for other people that might get the same issue.

Got my third render done! Now I just need to learn how to do what zanna is doing!

Nice work UmbraManis 😄

😊 ☺️ honestly I'm still trying to figure out what I'm doing!
I'm just experimenting for now because two months ago I had never opened Blender. Before, I used (or tried to use) another 3D software: Cinema 4D, so I played with camera settings, but I had not reached the realism of the materials, which has instead reached Scrubs.

Apart from that, I will try to share what I know 😃

I managed to get a transparent background in my most recent render! 😄

Avatar of Scrubs
Administrator

Sorry, I think I forgot to give the tip in the other posts. You need to hide the ground object and ensure that the Transparent checkbox is ticked in Render > Film (I did it by default)

Question: In Colour Tale #135 the sRGB numbers to not match the hex number, is that a typo? Same thing for #2003. Since I'm not sure how the hex and sRGB number work since most of them give you the same colour and I wonder why list both.

So after some reading and some experimentation i have a few question about the script.

Can we automatically add a bump map on certain piece ? The slope are too reflective and most of them in real life are really rough.
I have no idea on how to do the slope right. The angle is way more bumpier than the other side of the brick. i think i need to play with the UV map but i'm not really sure.
In any case, can an automatic process is possible ? Editing all the slope one by one is not really an option.

Also, how can i edit the script ? I would like to add a bit a roughness on all the piece and selecting all the piece one by one is a little bit too much.

You can view a render of a brick (with my GPU, so the lighting is not great) with some bump map applied here : [url]http://i.imgur.com/2yrXiOW.png[/url].
I'm really new to blender so the bump map does really not looks good but you can see the idea, the brick has a little more detail to it.
I could probably add some dust and scrach too but i think it's better to add that sort of detail by hand only on the important part of the render.

I found a video with some good information : [url]https://www.youtube.com/watch?v=6Rn037UGPwI[/url]You can see that the minifig look more realistic.
Providing a way to detailling some brick and the minifig automaticly will by hard but i think it's probably worth it.
Even if an automation is not possible, meaby someone more skilled than me can write some tutorial for a more realistic look ?

I'm also working on a way to animate minifig, especially the mouth. I like when my lego talks !
I have found some way to do that but i really need to learn a little bit more about Blender and the UV warp before jumping into action.

(I'm sorry for my poor english skill, i know my spelling is not really good 😕)

Avatar of Scrubs
Administrator

Regarding the slopes, I will add a map (bump or other) at some stage so that it does also appear in the mecabricks workshop. It is visually obvious on real parts and therefore it would be great to add a bit a realism without damaging too much the performances of the editor.

When done, I will try to translate that in the Blender template.

To add some roughness, you can go in each of the base materials (SOLID, PEARLESCENT, etc.) and change the roughness parameter of the node. Run the script after that only.

For the rest, I'll probably leave it to you guys. I'm no expert in rendering and it is a bit hard to automate the process. Every single bricks has different surface finish, moulding seams, ejector marks etc.

Furthermore, it would be only needed for the visible parts and close up scenes. If you render the whole Shield Helicarrier for example, I don't think it would bring any value 😉

Getting photo-realistic rendering is a full time job!

Just out of interest, what is your mother tongue? Is it French?

Good point i didn't think of the hidden piece !

I've made a normal map from a scan piece, it's tiled, if it's any use to you you're free to use it !
[url]http://i.imgur.com/rdOhHSi.png[/url]

I still have a major issue : I can't figure out where to put the normal map node. When i attach it on the "displacement" node the map doesn't show when i do a rendering with the CPU.
When i try a little more complicated solution with a difuse node, the render will only show the normal map and not the color or the texture.

I probably need to put the normal map in your "SOLID" group but that group scare me.

Do you have any idea ?

I know photo-realistic render is really hard, but your script does a pretty good job !

I'm indeed french. I can understand english but i don't write or speak it very well...

Avatar of Scrubs
Administrator

Your normal map looks cool. I might try some stuff with it.

You need to plug the normal map node to the Normal input of the shader. http://i.imgur.com/Y6UdvXO.jpg
However, I already use the normal input to round the edges, so I'm not sure how to do that in my current set up.

I am a frenchman too - even if I lived in New Zealand for the past 9 years 😉 I think that your english is more than good enough!

I got here by a tip of UmbraManis and he was totally right. This is awesome. 😄
If only we could import LDD files...
Anyways great job Scrubs! 😄
I've been seeking for ages to find a solution how to make good renders on a Mac! 😄
Btw is there a option to apply no background for the model so you can insert it in every picture you want?

Advertising
160 participants
Avatar of Scrubs
Avatar of NGCHunter2
Avatar of wlange
Avatar of ArmoredBricks
Avatar of Masman8675
Avatar of StepsiPepsi
Avatar of LoneCoyote
Avatar of zanna
Avatar of SaitoGray
Avatar of LukeSkywalker
Avatar of _deleted_
Avatar of TheGecko7
Avatar of UmbraManis
Avatar of Legosim
Avatar of Sealund
Avatar of adambrickover
Avatar of MARTIXTAPEATTACKER
Avatar of kl3w_lego
Avatar of [deleted]
Avatar of SiMaI
Avatar of nu_montag
Avatar of dtriangle
and others

LEGO, the LEGO logo, the Minifigure, and the Brick and Knob configurations are trademarks of the LEGO Group of Companies. ©2024 The LEGO Group.

Mecabricks, the Mecabricks logo and all content not covered by The LEGO Group's copyright is, unless otherwise stated, ©2011-2024 Mecabricks.