C3POwen

[Guide] Rendering LDraw models using POV-Ray

Recommended Posts

Sorry, let me clarify a bit.

HDRI map I am using, already has celing reflected on the floor.

That's why I only need to reflect a minifig, and ignore HDRI map

To avoid double celing reflection.

I hope this makes it more clear...

Now I understand. This means, that you need only to add your own reflective base plane to reflect the model and ceiling. This base plane hides also the lower part of your HDRI, so original reflection will be below the plane and will not be visible. And that's what you actualy, I think. Added some base plane to proper position with enough reflective texture.

Share this post


Link to post
Share on other sites

Now I understand. This means, that you need only to add your own reflective base plane to reflect the model and ceiling. This base plane hides also the lower part of your HDRI, so original reflection will be below the plane and will not be visible. And that's what you actualy, I think. Added some base plane to proper position with enough reflective texture.

Well, kind off.

The base plate (floor) has to be transparent and reflective. So you can still see the floors of my HDRI map, and also reflect Lego minifig.

however if I only do a reflective/transparent floor, it will crease a double reflection of the celing(I'll post image tonight)

Original map due to transparency+ reflection.

Yeah this is confusing.

Basically all I need is matte map that will receive shadows and reflections while ignoring my background (HDRI map)

Share this post


Link to post
Share on other sites

Well, kind off.

The base plate (floor) has to be transparent and reflective. So you can still see the floors of my HDRI map, and also reflect Lego minifig.

however if I only do a reflective/transparent floor, it will crease a double reflection of the celing(I'll post image tonight)

Original map due to transparency+ reflection.

Yeah this is confusing.

Basically all I need is matte map that will receive shadows and reflections while ignoring my background (HDRI map)

So you are actually trying to add reflections and shadows of the figures to existings reflections and shadows on the floor from the HDRI map. Looking forward to see the definition of the floor, that will be transparent enough to see existing HDRI floor and still showing shadows and reflections from the model. I did not succeeded with any single pass techniques to get this.

Share this post


Link to post
Share on other sites

The result few post above is best I can do....

butits not that good.

I know other rendering engines would include a map just for that purpose, but I cannot find anything like that in povray.

I know povray is a free engine and still a work in progress so maybe we will just have to wait...

Or use HDRI maps with out reflections in them....

so i basically gave up

Double reflection

double_ref.jpg

Final result.

hdri_final.jpg

Edited by TotalyWicked

Share this post


Link to post
Share on other sites

Since the colour of the top layer was not so nice, I removed the top layer and tried rendering it, first with the using the non-"clear" lgeo pieces, and then using the regular ones:

Non-"clear":

tryout4-2.png

Clear:

tryout4.png

Neither renders were too short, but they also weren't incredibly long. Clear one probably took about 3-4 hours to complete.

Share this post


Link to post
Share on other sites

For those interested in seeing what I'm presently working on:

river_predators10.png

It's not done yet. but it's getting there.

Share this post


Link to post
Share on other sites

Since the colour of the top layer was not so nice, I removed the top layer and tried rendering it, first with the using the non-"clear" lgeo pieces, and then using the regular ones:

Neither renders were too short, but they also weren't incredibly long. Clear one probably took about 3-4 hours to complete.

Is it possible that you swapped the pictures? First one looks like rendered using standard transparent pieces (with geometry for trans. bricks), the second looks like rendered using non-transparent pieces (with geometry for opaque bricks) with assigned transparent color.

For those interested in seeing what I'm presently working on:

It's not done yet. but it's getting there.

Looking forward to see the version with transparent water.

Edited by hrontos

Share this post


Link to post
Share on other sites

Is it possible that you swapped the pictures? First one looks like rendered using standard transparent pieces (with geometry for trans. bricks), the second looks like rendered using non-transparent pieces (with geometry for opaque bricks) with assigned transparent color.

Nope. The order is the way it was. The second one seems more transparent than the first.

Share this post


Link to post
Share on other sites

Nope. The order is the way it was. The second one seems more transparent than the first.

To me, the refraction looks all wrong in the first image. I think that's because the pieces aren't being treated as being solid.

Share this post


Link to post
Share on other sites

When I said that the refraction looks wrong in the first image, I meant that is (to me) the main difference between the first (faster) render (using non-transparent LGEO bricks), and the second (slower, more accurate) render. In other words, I was saying that the more accurate transparent LGEO bricks (that take longer to render) do, in fact improve the picture IMHO.

Share this post


Link to post
Share on other sites

GUIDE UPDATE: I have updated the LGEO-Update.zip file in the Downloads section with 3 new parts, 7 updated parts and 1 fixed part.

LGEO-Update-2012-12-26.png

The FIXED, UPDATED and NEW LGEO parts from the 2012-12-26 update

Well, I've finally passed the 100 part mark for my LGEO Parts Pack.

An update that those who render with minfigs are likely to appreciate. It seems that the LGEO.xml file for LDView was set to point to the old naming conventions for the minifig body pieces, so I have updated them to match the current LDraw numbers and they should now render using native LGEO parts, which have been there all along.

Share this post


Link to post
Share on other sites

Is this our Christmas present for being so good? :grin:

Thanks so much, C3POwen. Now I feel the need to render all my models again. :laugh:

Share this post


Link to post
Share on other sites

Now I feel the need to render all my models again. :laugh:

Finally a great looking mini fig arms...

Well, both the arms and legs need a little work on them, as they're not perfect, so you may want to hold off for the time being.

The legs have a few small gaps on them which can be seen when rendering, and the connection points on the arms need to be carved out a bit, as they currently go through the torso, rather than just the arm holes.

Share this post


Link to post
Share on other sites

The arms connection points do look not quite right. Thanks so much for your work. You do, totally, rock!

Share this post


Link to post
Share on other sites

Happy New Year, all!

GUIDE UPDATE: I have updated the LGEO-Update.zip file in the Downloads section with 8 new parts, 1 updated part and 5 fixed parts.

LGEO-Update-2013-01-01.png

The FIXED, UPDATED and NEW LGEO parts from the 2013-01-01 update

Share this post


Link to post
Share on other sites

GUIDE UPDATE: I have updated the LGEO-Update.zip file in the Downloads section with 13 new parts and 1 updated part.

LGEO-Update-2013-01-06.png

The UPDATED and NEW LGEO parts from the 2013-01-06 update

Another relatively small LGEO update, but this time with mainly new parts.

Share this post


Link to post
Share on other sites

Great job :thumbup:

I'm wondering; what do you do to transform an LDraw part into an LGEO one?

Share this post


Link to post
Share on other sites

Does someone know how I can remove that horizon when you render from a low angle withour using fog? Because fog always makes my renders a bit vague. Or maybe a setting to use fog without making the model vague?

Also, how can I avoid these weird bobling shadows at the edges of bricks like in this image (view at full size to see what I mean)?

Share this post


Link to post
Share on other sites

I'm wondering; what do you do to transform an LDraw part into an LGEO one?

Funnily enough, I was thinking of doing a small explanation at some point, probably with some example images. I will update the guide with some extra information on this, for those that are interested.

Does someone know how I can remove that horizon when you render from a low angle withour using fog? Because fog always makes my renders a bit vague. Or maybe a setting to use fog without making the model vague?

Also, how can I avoid these weird bobling shadows at the edges of bricks like in this image (view at full size to see what I mean)?

I usually set the fogging to sit a certain distance away based on the model's size. As long as you place this below all of the declarations of an LDView-generated POV-Ray file, I find that the following works quite well:

// Fog
#if (LDXFloor != 0)
fog {
distance LDXRadius*50
color rgb <255, 255, 255>
}
#end

This will only use fogging if the floor is switched on, and should place it far away enough to not cause an issue. You can change the colour to something more appropriate using standard RGB.

The second issue with the blobby artifacts in the shadows is due to the radiosity settings. I use settings based on some posted by whitew0lf, which I use to replace the default "Radiosity_Final".

Navigate to your POV-Ray includes folder (usually at "C:\Users\[uSERNAME]\Documents\POV-Ray\v3.7\include" and find the "rad_def.inc" file. This contains all of the radiosity settings.

Look for a section that starts with "#case (Radiosity_Final)" and modify the below options to match this:

pretrace_start 0.08
pretrace_end 0.005
count 800
nearest_count 20
error_bound 0.02
recursion_limit 1
low_error_factor 0.25
gray_threshold 0.0
minimum_reuse 0.015
brightness 1.0
adc_bailout 0.01/2

Render time will increase (and hugely so for transparent parts) but the artifacts will be gone. Some of the numbers are probably overkill, but I haven't had time to test this with trial and error.

Edited by C3POwen

Share this post


Link to post
Share on other sites

I usually set the fogging to sit a certain distance away based on the model's size. As long as you place this below all of the declarations of an LDView-generated POV-Ray file, I find that the following works quite well:

// Fog
#if (LDXFloor != 0)
fog {
distance LDXRadius*50
color rgb <255, 255, 255>
}
#end

Put the above into a file that's in your POV-ray include path, then set that as the "Top include filename" in the General section of LDView's POV Export Options. This will cause it to always be used. Of course, if you need to change the color for each model, don't do this, unless you want it to simply match the floor color, in which case you can use LDXFloorR, LDXFloorG, and LDXFloorB.

Note that your top include can include any and all custom overrides that you want. For example, if you don't like LDView's default lights, put your own lights into your top include (using the same declares that are used for LDView's lights, but with different locations), and then define LDXSkipLight1, LDXSkipLight2, and LDXSkipLight3.

Share this post


Link to post
Share on other sites

The second issue with the blobby artifacts in the shadows is due to the radiosity settings. I use settings based on some posted by whitew0lf, which I use to replace the default "Radiosity_Final".

Navigate to your POV-Ray includes folder (usually at "C:\Users\[uSERNAME]\Documents\POV-Ray\v3.7\include" and find the "rad_def.inc" file. This contains all of the radiosity settings.

Look for a section that starts with "#case (Radiosity_Final)" and modify the below options to match this:

pretrace_start 0.08
pretrace_end 0.005
count 800
nearest_count 20
error_bound 0.02
recursion_limit 1
low_error_factor 0.25
gray_threshold 0.0
minimum_reuse 0.015
brightness 1.0
adc_bailout 0.01/2

Render time will increase (and hugely so for transparent parts) but the artifacts will be gone. Some of the numbers are probably overkill, but I haven't had time to test this with trial and error.

I tried this, but it didn't solved the problem. :sceptic:

Share this post


Link to post
Share on other sites

Put the above into a file that's in your POV-ray include path, then set that as the "Top include filename" in the General section of LDView's POV Export Options. This will cause it to always be used.

I have to say I already do this myself, as I like to use floor and light settings that are different from LDView's default settings, so use this function. If you're rendering things and you want to keep the same settings between renders, this is very, very useful!

My current file is set up like this.

Incidentally, LDView Travis, is there any news on the next update to LDView?

I tried this, but it didn't solved the problem. :sceptic:

Would you be able to supply a copy of the Messages pane from POV-Ray from after you've finished a render?

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.