![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi all,
After seeing a few cool Lego mosaics (where an image is built up from lego
bricks) I thought to myself 'why not cut out
all the hard work and just do a photo-realistic ray traced version
instead!',
which led me to the image attached.
Firstly though, the wooden background was NOT done in POV-Ray, it is infact
a photo of a desk. The Lego blocks (1x1x1) are of my own design, although I
might move them over to one of the Lego POV-Ray libraries floating about
soon.
What I would really like are tips to make it look more photo-realistic. So
far I just have a simple area light, another point light, and a little bit
of focal blur. I played with some HDR rendering using image maps in
MegaPOV, but the results didn't seem to capture the vibrant colours you
expect from Lego and took a long time to render.
So any tips?
Cheers.
Post a reply to this message
Attachments:
Download 'lego mario.png' (665 KB)
Preview of image 'lego mario.png'
![lego mario.png](/povray.binaries.images/attachment/%3Cweb.44e27bd71f0f71aba665db720%40news.povray.org%3E/lego%20mario.png?ttop=443866&toff=4300&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Neat idea.
> So any tips?
If these were real the blocks wouldn't be attached to anything.
I'd make the blue sky the "plate" that the others blocks stick onto.
A few loose blocks left or right would help it feel real as well.
The table might seem a bit less flat if you used a greyscale of the
image for a normal, or for a heightfield.
The color of the table is a near match for much of the picture as
well, it draws the eyes away from the subject, maybe darker?
A bit more reflection in the table finish would be ok too.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Tim Attwood" <tim### [at] comcast net> wrote:
> Neat idea.
> > So any tips?
> If these were real the blocks wouldn't be attached to anything.
> I'd make the blue sky the "plate" that the others blocks stick onto.
> A few loose blocks left or right would help it feel real as well.
> The table might seem a bit less flat if you used a greyscale of the
> image for a normal, or for a heightfield.
> The color of the table is a near match for much of the picture as
> well, it draws the eyes away from the subject, maybe darker?
> A bit more reflection in the table finish would be ok too.
I like that: tips to make my photos (the desk) more photo-realisitic :P
I agree that the table is a little too bright. However I think when striving
for realism it is the flaws that make the image believable, so care is
required when fixing imperfections. By that I mean some imperfections are
really features. Still, in this case I agree with you so thanks for the
suggestion.
Regarding the blocks, usually these things are just 2D, although I do need a
backplate. Having a few levels of depth in the image would actually be quite
cool, but considering I want to process a large number of reference images
for an animation I won't be able to do much hand tweaking.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I agree with most of Tims suggestions.
And I too find this a neat idea! Cool theme as well!
Cant wait to see the animation(?) =)
Are there any borders separating the lego pieces? They look like only one
big piece, maybe I have to look again though..
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
scam wrote:
> Regarding the blocks, usually these things are just 2D, although I do need
> a backplate. Having a few levels of depth in the image would actually be
> quite cool, but considering I want to process a large number of reference
> images for an animation I won't be able to do much hand tweaking.
Not really that hard to do.
You know the value of the "sky" color (the blue) so you can fairly easily
determine what is not part of the sky. If it is not then raise the block by
1 lego-unit.
--
Ger
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"RusHHouR" <gee### [at] mail nu> wrote:
> I agree with most of Tims suggestions.
> And I too find this a neat idea! Cool theme as well!
> Cant wait to see the animation(?) =)
>
> Are there any borders separating the lego pieces? They look like only one
> big piece, maybe I have to look again though..
They are sitting flush, but the edges are rounded so that they just catch
the light a little. It's kind of wasted in this image though. I'll post the
first draft of the animation later tonight, however it won't have any of the
suggestions people have made here. Still, the animation is looking pretty
good so far.
Ger <No.### [at] Thank You> wrote:
> Not really that hard to do.
> You know the value of the "sky" color (the blue) so you can fairly easily
> determine what is not part of the sky. If it is not then raise the block by
> 1 lego-unit.
Is there a POV-Ray function that will return the RGB value at a particular
point in an external image?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
scam wrote:
> "RusHHouR" <gee### [at] mail nu> wrote:
>> I agree with most of Tims suggestions.
>> And I too find this a neat idea! Cool theme as well!
>> Cant wait to see the animation(?) =)
>>
>> Are there any borders separating the lego pieces? They look like only one
>> big piece, maybe I have to look again though..
>
> They are sitting flush, but the edges are rounded so that they just catch
> the light a little. It's kind of wasted in this image though. I'll post
> the first draft of the animation later tonight, however it won't have any
> of the suggestions people have made here. Still, the animation is looking
> pretty good so far.
>
> Ger <No.### [at] Thank You> wrote:
>> Not really that hard to do.
>> You know the value of the "sky" color (the blue) so you can fairly easily
>> determine what is not part of the sky. If it is not then raise the block
>> by 1 lego-unit.
>
> Is there a POV-Ray function that will return the RGB value at a particular
> point in an external image?
#declare MaxWidth = 320; // Or whatever the imagewidth is
#declare MaxHeight = 180; // Or whatever the height is
// You'll need to determine these values from the original images
#declare LowerColLimit = 0.45;
#declare HighColLimit = 0.55;
#local PIMAGE = function {
pigment{image_map {"mario.png"}
rotate x * 90 // rotate backwards
translate < -0.5, 0, -0.5 > // slide over so the center is on <0,0,0>
scale <MaxWidth,1,MaxHeight>//scale to image size
}}
#declare CountH = -div(MaxWidth,2);
#while (CountH< div(MaxWidth,2))
#declare CountV = -div(MaxHeight,2);
#while (CountV< div(MaxHeight,2))
#declare COL=PIMAGE(CountH,1,CountV);
#if ((COL.blue < LowerColLimit) | (COL.blue > HighColLimit))
object {LegoBlock pigment { Col } translate <CountH,2,CountV>}
#else
object {LegoBlock pigment { SkyBlue } translate <CountH,1,CountV>}
#end
#declare CountV = CountV + 1;
#end
#declare CountH = CountH + 1;
#end
This is untested code but it should work
HTH
--
Ger
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ger <No.### [at] Thank You> wrote:
> > Ger <No.### [at] Thank You> wrote:
> >> Not really that hard to do.
> >> You know the value of the "sky" color (the blue) so you can fairly easily
> >> determine what is not part of the sky. If it is not then raise the block
> >> by 1 lego-unit.
> >
> > Is there a POV-Ray function that will return the RGB value at a particular
> > point in an external image?
>
> #if ((COL.blue < LowerColLimit) | (COL.blue > HighColLimit))
This may cause problems for the code as it only polls the blue channel for
comparison. Colours that have a high blue value but aren't blue may get
caught by it (i.e. white<1,1,1>, cyan<0,1,1>, magenta<1,0,1>). A method to
filter the other channels as well should be added as well.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Trevor G Quayle wrote:
> Ger <No.### [at] Thank You> wrote:
>> > Ger <No.### [at] Thank You> wrote:
>> >> Not really that hard to do.
>> >> You know the value of the "sky" color (the blue) so you can fairly
>> >> easily determine what is not part of the sky. If it is not then raise
>> >> the block by 1 lego-unit.
>> >
>> > Is there a POV-Ray function that will return the RGB value at a
>> > particular point in an external image?
>>
>> Â Â #if ((COL.blue < LowerColLimit) | (COL.blue > HighColLimit))
>
> This may cause problems for the code as it only polls the blue channel for
> comparison. Colours that have a high blue value but aren't blue may get
> caught by it (i.e. white<1,1,1>, cyan<0,1,1>, magenta<1,0,1>). A method
> to filter the other channels as well should be added as well.
>
>
> -tgq
You're right. I lifted this from a code section where I was only interested
in the blue channel.
So it should be something like this :
#if (((COL.red < LowerRedLimit) | (COL.blue > HighRedLimit)) &
((COL.green < LowerGreenLimit) | (COL.blue > HighGreenLimit)) &
((COL.blue < LowerBlueLimit) | (COL.blue > HighBlueLimit)))
--
Ger
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks for the code Ger, I'll have a play with it and do a test render later
to see how it looks.
If anyone would like to see my first stab at an animation in POV-Ray you can
download it here:
http://www.theloveorthemoney.com/3d/test%20big%20zoom.avi
It's a 30MB XViD file. I added a zoom effect in post production to break the
absolute position of each brick from frame to frame to make it look less
artificial. It came out alright, but it didn't really nail the effect I was
after. I think adding some depth like has been suggested could make it much
more impressive.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |