POV-Ray : Newsgroups : povray.binaries.images : Mario rendered in Lego Server Time
5 Nov 2024 16:39:05 EST (-0500)
  Mario rendered in Lego (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: scam
Subject: Mario rendered in Lego
Date: 15 Aug 2006 22:15:01
Message: <web.44e27bd71f0f71aba665db720@news.povray.org>
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


 

From: Tim Attwood
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 03:53:18
Message: <44e2ceee$1@news.povray.org>
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

From: scam
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 05:10:00
Message: <web.44e2e0c8be537bf3a665db720@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> 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

From: RusHHouR
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 07:00:01
Message: <web.44e2f984be537bf347d3ae5e0@news.povray.org>
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

From: Ger
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 07:31:40
Message: <44e3021c@news.povray.org>
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

From: scam
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 08:05:00
Message: <web.44e30994be537bf3a665db720@news.povray.org>
"RusHHouR" <gee### [at] mailnu> 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] ThankYou> 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

From: Ger
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 09:16:20
Message: <44e31aa4@news.povray.org>
scam wrote:

> "RusHHouR" <gee### [at] mailnu> 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] ThankYou> 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

From: Trevor G Quayle
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 10:00:01
Message: <web.44e324b7be537bf3c150d4c10@news.povray.org>
Ger <No.### [at] ThankYou> wrote:
> > Ger <No.### [at] ThankYou> 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

From: Ger
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 10:08:56
Message: <44e326f6@news.povray.org>
Trevor G Quayle wrote:

> Ger <No.### [at] ThankYou> wrote:
>> > Ger <No.### [at] ThankYou> 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

From: scam
Subject: Re: Mario rendered in Lego
Date: 16 Aug 2006 10:40:00
Message: <web.44e32e15be537bf3a665db720@news.povray.org>
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

Goto Latest 10 Messages Next 9 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.