Jump to content


[Software] LDD2PovRay


  • Please log in to reply
811 replies to this topic

#301 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 02 October 2012 - 10:33 AM

View PostShroud, on 01 October 2012 - 06:56 PM, said:

I was doing a render in POV using the converter and found an orange peel effect on the underside of part number 45301 (LDD Number).

Image

Looks like a poly is off a little  :sweet:

I will check this part - it looks like the location of bottom connection points does not match part geometry. LDD2POVRay uses location of connection points to do some geometry enhancements.

View PostShroud, on 02 October 2012 - 09:52 AM, said:

I had a question about the horizon line as well if anyone can help. I want to have a blend so there is no horizon line at all, I've fluked it working on one moc but the other (with the same settings) has a line.

What is the code I would need to achieve this?

Cheers

In this topic there is a point 7.2 which shows how to add a fog to scene, which helps to hide that line. The other posibilities are to build a box around your model using boxes/cylinders/spheres.

#302 Shroud

Shroud

    Posts: 127
    Joined: 06-April 10
    Member: 10165
    Country: Australia

Posted 02 October 2012 - 04:49 PM

Cheers for that :) I played with the fog a little before but couldnt get it exactly right as that tut is for LDRAW and the code is a bit different.

Loving the converter I must say, two 4am sessions now heh
Posted Image

#303 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 02 October 2012 - 07:43 PM

View PostShroud, on 02 October 2012 - 04:49 PM, said:

Loving the converter I must say, two 4am sessions now heh

:laugh: Performance needs some improvements so that it will be only 1am.

#304 NickAb

NickAb

    Posts: 164
    Joined: 17-December 10
    Member: 14739
    Country: Russia

Posted 11 October 2012 - 03:15 PM

I've made a recreation of main building from 10937 for a render challenge proposed by hrontos or superkalle (can't remember for sure, it was before the forum went down).
Here is a link 10937-recreated.lxf
So now anyone can try to render a picture like one of the official pictures playing with light setup and materials.

There are few errors I know about:
Flower in the pot: had to add plate 1x1 round, cause cone cannot be connected with stalk in direct.
I'm not sure about colors used for decorations (such as Sai, Bladed Claw, Unicor Horn, Tooth etc).
74340 Turn Table can't be disassembled in LDD, so I had to make a stained-glass window in a different way.
I'm not sure about doctor's table (at the second floor, next to patient's bed). Made it symmetrical with both drawers closed, but on 1 photo left drawer looks like open.

There might be other errors in colors and bricks, as the model were recreated only after a few official images.

Edited by NickAb, 11 October 2012 - 03:19 PM.


Download the latest version of SVG decals library and collaborate on making SVG decals library bigger and better on github.
Subscribe to my youtube channel where I post videos on how to create custom decals and other LEGO related stuff. My flickr and Brcikshelf pages.


#305 Phoxtane

Phoxtane

    Posts: 647
    Joined: 28-May 12
    Member: 28870
    Country: USA

Posted 07 November 2012 - 08:05 AM

I've been working with LDD2POV-Ray and now that I'm familiar with how it all works, I've been creating renders and posting them on my deviantArt gallery.

Image

"A worker has just finished pouring a concrete slab! He looks rather pleased with himself."

Edited by Calabar, 07 November 2012 - 09:47 AM.
Oversized Image converted in Text Link

"2341.  Liechtenstein doesn't have a challenge rating." Things Mr. Welch is No Longer Allowed to Do in an RPG

#306 Balrog

Balrog

    Posts: 918
    Joined: 09-June 10
    Member: 11355
    Country: Germany

Posted 12 November 2012 - 12:16 AM

Today I just finished a Technic model in LDD. I wanted to try out PovRay rendering. I got the setup done and rendering starts. Then I thought of how stupid and genius I am. Why do that on my laptop where LDD barely works fluently. My PC at home is alright for the job and mainly idle anyway. So I remotely set up everything there. I started my first render. Desktop resolution, standard AA. After a hour I cancelled it. I disabled AA, because it is very intensive on processing. I doubled the resolution values as suggested and gave it some time. After 4h, still this thing isn't finished. I cancelled. I chose the desktop resolution again. Right now it is running for 3 1/2 hours and at 37%.

I wonder if you other guys still have some tipps to optimize settings. But mainly I have a theory which needs some proof. I figured, that visible bevels are enough to render. That was already like that when making maps for half-life or counter-strike. So, lots of bevel means lots of renderwork. So is it just common for larger Technic models to take ages to get rendered? I have not yet made any comparison rendering though. That will happen tomorrow I guess.

Perhaps hrontos has some details on this "issue"?

#307 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 12 November 2012 - 11:07 AM

Technic models are more expensive to render, because technic beams contain many beveled edges.
Each technic hole consists of 4 circles modeled as dodecagon and this means 48 bevels for each technic hole.
Standard studed brick contains only 16 bevels in total.
So technic models are more memory intensive and take much longer to render.

I presume that replacement of those dodecagons with smooth circles will not only improve look but also performance. But I do not have this solution yet.

#308 Balrog

Balrog

    Posts: 918
    Joined: 09-June 10
    Member: 11355
    Country: Germany

Posted 12 November 2012 - 01:29 PM

The radiosity for this render took roughly 1 hour and 20 minutes and the trace time 13 hours. I wonder what times you needed "roughly" for the crawlers in your signature. That would be quite interesting.

Here is the pic:
Posted Image
I know it is somewhat flying. I have to adjust this. I'll let it render again until tomorrow and keep AA enabled and hopeflly can fix the ground clearance before that. But for now, I really like the result.

Edit: Found the reason why it is flying. One of the back wheels was angled and thus it has clearance in the back. I had to fix the drive train and the differential. Though, it is still flying on the front side. The back wheels are the lowest parts. The model should stand slightly angled to the front. And I somehow cannot fix that in LDD. So, most likely I'll treat that as a lesson to learn and keep it at that.

Edited by Balrog, 12 November 2012 - 02:02 PM.


#309 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 12 November 2012 - 03:17 PM

To get it less angled: attach some beam and pin to front mudguard and use the rotation tool to rotate whole model and make it sit straight. LDD2POVRay uses lowest point of the whole model as point through which the plane is going so when model is rotated due to some wrong manual rotation or due to use of the auto align tool, it will fly.

And to the render times:

The models from my signature were rendered at 1600x893, no AA and lowest level of detail - this means no bevels, because I wanted more pictures and I needed them this year :laugh:. Each picture took about 2 hours to render. Original 800x443 pictures are available here.

I rendered recently also 9396 Rescue Helicopter at 4800x2700, no AA, because desired target resolution of the final image was 1600x900. With maximum level of detail (all bevels), it took about 4 days per picture.

Edited by hrontos, 12 November 2012 - 03:19 PM.


#310 Balrog

Balrog

    Posts: 918
    Joined: 09-June 10
    Member: 11355
    Country: Germany

Posted 12 November 2012 - 04:11 PM

View Posthrontos, on 12 November 2012 - 03:17 PM, said:

To get it less angled: attach some beam and pin to front mudguard and use the rotation tool to rotate whole model and make it sit straight.

I tried this and it doesn't work. It won't let me rotate the whole model. This was just a test anyway, so I don't really care anymore.

View Posthrontos, on 12 November 2012 - 03:17 PM, said:

it took about 4 days per picture.

That is something I could let run this week, because I will not use my PC at home that much :D

Edited by Balrog, 12 November 2012 - 04:17 PM.


#311 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 12 November 2012 - 04:16 PM

View PostBalrog, on 12 November 2012 - 04:11 PM, said:

That is something I could let run this week, because I will not use my PC at home that much :D

Usually I have no problem to work with the PC while rendering. I have experienced problem with YouTube freezing, other applications work pretty good. When it is too slow for some work, I pause it. I never burn a CD or DVD while it is running - for such tasks I pause it always.

#312 Balrog

Balrog

    Posts: 918
    Joined: 09-June 10
    Member: 11355
    Country: Germany

Posted 12 November 2012 - 04:28 PM

View Posthrontos, on 12 November 2012 - 04:16 PM, said:

Usually I have no problem to work with the PC while rendering. I have experienced problem with YouTube freezing, other applications work pretty good. When it is too slow for some work, I pause it. I never burn a CD or DVD while it is running - for such tasks I pause it always.

Haha lol ... I totally overlooked the Pause button.

Btw. I will totally steal your 8258 lxf file and set up something tonight to render when I am back home, so my computer won't be sitting idle when I am away for the week :D

#313 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 13 November 2012 - 08:43 PM

Today, I was asked how to make picture with trans brick look really lighting.

Something like this:

Posted Image

LXF is here (needed only to force converter to generate needed includes).

Commented POV file is here.

Edited by hrontos, 15 November 2012 - 10:08 PM.


#314 Smartiac

Smartiac

    Posts: 14
    Joined: 27-March 08
    Member: 2946

Posted 15 November 2012 - 09:10 PM

View PostBalrog, on 12 November 2012 - 04:11 PM, said:

I tried this and it doesn't work. It won't let me rotate the whole model. This was just a test anyway, so I don't really care anymore.



That is something I could let run this week, because I will not use my PC at home that much :D

I think that the bounding box surrounding wheels is square, so if they are rotated at anything other than flat, the abseplane will be lowered.

Maybe...

#315 Seluryar

Seluryar

    Posts: 167
    Joined: 23-May 10
    Member: 10876
    Country: United States

Posted 15 November 2012 - 09:50 PM

hrotos, I am very interested in learning how to add a wooden reflective surface to the render like in your post #313.
With Lego, All things are possible
Posted Image  |  Posted Image  |  Posted Image  |  Posted Image

#316 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 15 November 2012 - 10:06 PM

View PostSmartiac, on 15 November 2012 - 09:10 PM, said:

I think that the bounding box surrounding wheels is square, so if they are rotated at anything other than flat, the abseplane will be lowered.

Maybe...

Bounding boxes are really square, but base plane position uses real model dimension and not bounding boxes dimensions. So it should be the lowest point of the model as "seen" by the POV-Ray.

View PostSeluryar, on 15 November 2012 - 09:50 PM, said:

hrotos, I am very interested in learning how to add a wooden reflective surface to the render like in your post #313.

The post contains commented POV file, floor is at the end of the file. When you render the file, you will get that image (LXF is there to help you generate missing includes for the POV file - just convert it, you do not have to render it). Floor can be easily copied to any POV file.

#317 Balrog

Balrog

    Posts: 918
    Joined: 09-June 10
    Member: 11355
    Country: Germany

Posted 15 November 2012 - 10:10 PM

View PostSmartiac, on 15 November 2012 - 09:10 PM, said:

I think that the bounding box surrounding wheels is square, so if they are rotated at anything other than flat, the abseplane will be lowered.

Maybe...

The problem is, in the render I posted, as you said. the box of the one rear wheel was rising the whole model above the ground. But I fixed that in the .lxf. But, now it is still not working. The problem now is, that the rear wheels are flat on the ground, which is ok. But the front wheels are in the air, since they are positioned higher on the model. The real model is leaning forward a little bit. To fix that, I would need to rotate the whole model a little bit, then again fix the wheels. But it won't let me rotate it.

If you want, I can upload the .lxf. Perhaps that helps to clarify it.

#318 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 15 November 2012 - 10:22 PM

View PostBalrog, on 15 November 2012 - 10:10 PM, said:



The problem is, in the render I posted, as you said. the box of the one rear wheel was rising the whole model above the ground. But I fixed that in the .lxf. But, now it is still not working. The problem now is, that the rear wheels are flat on the ground, which is ok. But the front wheels are in the air, since they are positioned higher on the model. The real model is leaning forward a little bit. To fix that, I would need to rotate the whole model a little bit, then again fix the wheels. But it won't let me rotate it.

If you want, I can upload the .lxf. Perhaps that helps to clarify it.

LDD usually won't let you rotate bricks, when some of the are not connected and they just placed there (using scafolding or whatever). So try the connected selection tool to check if model is completely connected.

Model can be rotated also in the POV-Ray. There is a variable named ldd_model_transformation that can be used for this.  Just finding correct angle can be tricky.

#319 Seluryar

Seluryar

    Posts: 167
    Joined: 23-May 10
    Member: 10876
    Country: United States

Posted 16 November 2012 - 12:03 AM

View Posthrontos, on 15 November 2012 - 10:06 PM, said:

Bounding boxes are really square, but base plane position uses real model dimension and not bounding boxes dimensions. So it should be the lowest point of the model as "seen" by the POV-Ray.



The post contains commented POV file, floor is at the end of the file. When you render the file, you will get that image (LXF is there to help you generate missing includes for the POV file - just convert it, you do not have to render it). Floor can be easily copied to any POV file.

I have pasted the floor section into povway, but it does not show the floor as its being rendered, just a blank white background. Do i need to edit a converter file to add the wood floor into the program?

Edited by Seluryar, 16 November 2012 - 12:09 AM.

With Lego, All things are possible
Posted Image  |  Posted Image  |  Posted Image  |  Posted Image

#320 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 16 November 2012 - 12:12 AM

View PostSeluryar, on 16 November 2012 - 12:03 AM, said:

I have pasted the floor section into povway, but it does not show the floor as its being rendered, just a blank white background. Do i need to edit a converter file to add the wood floor into the program?

Yes, you have to remove original white floor generated by conveter at the end of the generated pov file. Or uncheck "add base plane" on the scene tab before conversion. And then add the floor to the pov file.

Edited by hrontos, 16 November 2012 - 12:22 AM.


#321 Seluryar

Seluryar

    Posts: 167
    Joined: 23-May 10
    Member: 10876
    Country: United States

Posted 16 November 2012 - 12:35 AM

View Posthrontos, on 16 November 2012 - 12:12 AM, said:

Yes, you have to remove original white floor generated by conveter at the end of the generated pov file. Or uncheck "add base plane" on the scene tab before conversion. And then add the floor to the pov file.
What about background color and transparency?

Ok, i got it to work by only removing base plane
With Lego, All things are possible
Posted Image  |  Posted Image  |  Posted Image  |  Posted Image

#322 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 16 November 2012 - 12:42 AM

View PostSeluryar, on 16 November 2012 - 12:35 AM, said:


What about background color and transparency?

Ok, i got it to work by only removing base plane

I am glad it works for you. You had there two planes and POV-Ray displayed the white one.

Background color and transparency have and influence of those areas of the output image which do not contain anything (no model, no floor or any other object that could be rendered). Those pixels will get background color or will be transparent.

#323 Balrog

Balrog

    Posts: 918
    Joined: 09-June 10
    Member: 11355
    Country: Germany

Posted 17 November 2012 - 12:30 PM

Like I announced, I bluntly stole hrontos' .lxf file for 8258 to do some rendering tests. I have a first result and some time calculation. Regarding the model, I'd like to have it, but I am too late for that. Perhaps I will rebuild it myself in LDD.

I first rendered the file with mostly default settings. I set resolution to 5040x3150 pixels, which is roughly 16 Megapixels. Level of details is minimum (original geometry, no bevels) and I disabled anti-aliasing. The rendering was finished over night (shame on me I did not look up the time). Here is the result (click for original size)

Posted Image
I already think this is looking very good. hrontos' suggestion with low detail rendering was really worth it.

Currently, my PC is rendering the same image with all visible bevels and Lego writing on the studs. I disabled bevels for transparent parts and let AA disabled, too. Right now, it is rendering for more than 3 and a half days and it is at 52%. I did a quick calculation to find out when it will be finished. PovRay tells me, it is rendering at 26pps (pixel per second) right now. So, for 16MP the render takes up roughly a little more than 7 days. So I will most likely see on Wednesday how the result is. It would be Tuesday evening, but I will need the PC for playing some games on Monday and Tuesday, so I will pause the render for that.

Edited by Balrog, 17 November 2012 - 01:07 PM.


#324 The Player Nº1

The Player Nº1

    Posts: 377
    Joined: 15-February 10
    Member: 9578
    Country: Portugal

Posted 19 November 2012 - 09:25 PM

I'm trying this software right now.
I loved the pics.

#325 hrontos

hrontos

    Posts: 726
    Joined: 05-August 11
    Member: 19500
    Country: Slovakia

Posted 19 November 2012 - 10:32 PM

View PostBalrog, on 17 November 2012 - 12:30 PM, said:

Like I announced, I bluntly stole hrontos' .lxf file for 8258 to do some rendering tests. I have a first result and some time calculation. Regarding the model, I'd like to have it, but I am too late for that. Perhaps I will rebuild it myself in LDD.

A bit off the topic: I bought mine from eBay Germany last year, the seller was from Austria, he used it just as a display model. It was complete, not a single missing piece, even the extra pieces were included. You should try to get it. I got mine for only 71EUR (including shipping), which was incredible price for the model in excelent condition. Spring or spring-summer seems to be the right season for buying, since now the prices are very high.
My son was 7 at that time and it took him one week to build it (each evening I prepared him about 250+ pieces for the steps for the next day and told him that we have to wait for the other parts to come next day by mail). I did not wanted to show him all parts at once, since I had an experience with him building 8265 - he wanted to finish the model at once, he was tired and a bit disapointed, that I did not let him build all day long. This daily "dosage" of parts approach worked very well - something more  than one hour of building every day and a play after that.

View PostBalrog, on 17 November 2012 - 12:30 PM, said:

I first rendered the file with mostly default settings. I set resolution to 5040x3150 pixels, which is roughly 16 Megapixels. Level of details is minimum (original geometry, no bevels) and I disabled anti-aliasing. The rendering was finished over night (shame on me I did not look up the time). Here is the result (click for original size)

I already think this is looking very good. hrontos' suggestion with low detail rendering was really worth it.

It works quite well for these large models. Beveled version is different, but event this one without bevels looks good. Try to use camera angle of about 45-60 degrees. It add a bit deeper perspective to the picture which looks nice in case of these longer models.

Looking forward to see the version rendered with the bevels.

After that try some HDR lighting. For example http://www.hdrlabs.c...bl/archive.html. Indoor images look quite good on rendered models. I like the Gold Room - it has many light sources so it creates many highlights on the model.

HDR images may add some tint to the colors of the model. The Gold Room makes the model look a bit yellowish.
It can be compensated by adding "emission" keyword to the generated sky_sphere like this:

sky_sphere {
pigment { image_map { hdr "kMt-Washington-Gold-Room_Ref.hdr once interpolate 2 map_type 1 } }
rotate <0,105,0>
emission <0.98,0.98,1.0>
}

It reduces red and green components to 98% of the original. Red+Green = Yellow. Proper values are a matter of trial and error approach.
The keyword "rotate" allows you to rotate whole sky_sphere (in this example 105 degrees along vertical - y - axis) so it is like you were in the room and turn around to get proper lighting of your model. Works very nicely with the wooden floor I posted before, since the wooden floor likes the overall colors of the Gold Room.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users