|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New <dne### [at] sanrrcom> wrote:
> Well, no, I disagree. How do you find the size of an array at runtime?
It's a constant integral value, hence known at runtime.
> That's exactly why you have to pass it around along with the pointer.
Now you are confusing dynamically allocated arrays with static arrays.
They are not the same thing.
The size of dynamically allocated arrays cannot be resolved either at
runtime nor at compile time (eg. you cannot use the size of a dynamically
allocated array somewhere where a compile-time constant is expected).
> Hmmm... If you put an array in a struct, can you ask
> "sizeof(myrecord.thearray)" and get an appropriate size?
Yes, actually.
> I suppose you
> could, but still I wouldn't count that as such.
"As such"? What? Runtime? sizeof() always works at compile time.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
From: nemesis
Subject: Re: 99 lines of C++ for an unbiased ray tracer
Date: 15 Jan 2010 09:48:31
Message: <4b50803f@news.povray.org>
|
|
|
| |
| |
|
|
Warp escreveu:
> Out of curiosity I changed the location of the light to see that it really
> renders it properly:
>
> http://warp.povusers.org/images/smallpt.jpg
did you make it coincident with the surface?
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
nemesis <nam### [at] gmailcom> wrote:
> Warp escreveu:
> > Out of curiosity I changed the location of the light to see that it really
> > renders it properly:
> >
> > http://warp.povusers.org/images/smallpt.jpg
> did you make it coincident with the surface?
I have hard time deciding whether that was humorous or a serious question.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
From: nemesis
Subject: Re: 99 lines of C++ for an unbiased ray tracer
Date: 15 Jan 2010 11:20:32
Message: <4b5095d0@news.povray.org>
|
|
|
| |
| |
|
|
Warp escreveu:
> nemesis <nam### [at] gmailcom> wrote:
>> Warp escreveu:
>>> Out of curiosity I changed the location of the light to see that it really
>>> renders it properly:
>>>
>>> http://warp.povusers.org/images/smallpt.jpg
>
>> did you make it coincident with the surface?
>
> I have hard time deciding whether that was humorous or a serious question.
serious. Did you put right where the left sphere surface would hit?
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
nemesis <nam### [at] gmailcom> wrote:
> Warp escreveu:
> > nemesis <nam### [at] gmailcom> wrote:
> >> Warp escreveu:
> >>> Out of curiosity I changed the location of the light to see that it really
> >>> renders it properly:
> >>>
> >>> http://warp.povusers.org/images/smallpt.jpg
> >
> >> did you make it coincident with the surface?
> >
> > I have hard time deciding whether that was humorous or a serious question.
> serious. Did you put right where the left sphere surface would hit?
Unbiased monte-carlo rendering sends rays in a random fashion. It starts
extremely grainy, but the graininess gets reduced over time as the number
of samples gets increased. That image is the result of 30 minutes of
rendering in my computer (a virtually grainless result would have taken
days).
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
From: Invisible
Subject: Re: 99 lines of C++ for an unbiased ray tracer
Date: 15 Jan 2010 11:50:39
Message: <4b509cdf@news.povray.org>
|
|
|
| |
| |
|
|
Warp wrote:
> That image is the result of 30 minutes of
> rendering in my computer (a virtually grainless result would have taken
> days).
Or a GPU implementation...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp escreveu:
> nemesis <nam### [at] gmailcom> wrote:
>>>>> http://warp.povusers.org/images/smallpt.jpg
>>>> did you make it coincident with the surface?
>>> I have hard time deciding whether that was humorous or a serious question.
>
>> serious. Did you put right where the left sphere surface would hit?
>
> Unbiased monte-carlo rendering sends rays in a random fashion. It starts
> extremely grainy, but the graininess gets reduced over time as the number
> of samples gets increased. That image is the result of 30 minutes of
> rendering in my computer (a virtually grainless result would have taken
> days).
I know. I'm concerned about that huge circular, pure white light
artifact next to the wall, aren't you? Looks like a bug, which is why I
thought you posted the picture.
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
|
| |
| |
|
|
From: nemesis
Subject: Re: 99 lines of C++ for an unbiased ray tracer
Date: 15 Jan 2010 11:53:04
Message: <4b509d70@news.povray.org>
|
|
|
| |
| |
|
|
Warp escreveu:
> That image is the result of 30 minutes of
> rendering in my computer (a virtually grainless result would have taken
> days).
and no, you don't need days to get grainless result anymore than what
you would need with povray and area lights and radiosity. Specially for
such a simple scene. Though a pure simplified path tracer is very slow.
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
nemesis wrote:
> I know. I'm concerned about that huge circular, pure white light
> artifact next to the wall, aren't you? Looks like a bug, which is why I
> thought you posted the picture.
It's a light source. It's what illuminates the rest of the scene.
Post a reply to this message
|
|
| |
| |
|
|
From: Invisible
Subject: Re: 99 lines of C++ for an unbiased ray tracer
Date: 15 Jan 2010 11:58:01
Message: <4b509e99@news.povray.org>
|
|
|
| |
| |
|
|
nemesis wrote:
> and no, you don't need days to get grainless result anymore than what
> you would need with povray and area lights and radiosity.
Er, no, POV-Ray uses an utterly different algorithm for this. In
particular, it uses a shedload of statistical tests to reduce the number
of samples taken. *This* program just endlessly resamples everything
until all the randomness averages out; this is orders of magnitude slower.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |