Help with PDF
#1
Posted 08 October 2009 - 11:48 AM
Im having a difficult time with sss, I cant quite seem to understand how it works... could anyone give me a few hints? (especially ReedBeta, pleeze read this!)
#2
Posted 08 October 2009 - 04:23 PM
Heres the real time equivilent, ive looked at its shots and it is VERY realistic for skin, I recommend everyone having a look at this one, its excellent.
But the maths is just a little too hard for me... what I really would ask santa for is a working exe of this algorythm so I can have a look at it in code.
Converting those equations to code I cant say im good enough at maths to do. But this is really worth a bit of effort in putting together, itll make your game look partially offline rendered!
#3
Posted 09 October 2009 - 01:47 PM
Do you know what derivatives and integrals are? Any vector calculus?
I've never actually done any of that SSS stuff, but I understand the math.
#4
Posted 09 October 2009 - 03:47 PM
Im sorry, im good with programming systems, but im a total flunk at maths... dont say math thats what americans say, we are australian we say maths like english people...
You wouldnt believe this, but I can code the DFT (discrete fourier transform) but I cant read the notation for it for nuts!!
Really, I just need a good example in CODE! then id be able to reverse engineer it.
#5
Posted 10 October 2009 - 12:35 AM
As for the math part, I'd recommend picking up a copy of Pharr and Humphreys, as it will give you a decent introduction to the kind of stuff you see in these papers (you will, however, need to already have a handle on integrals).
#6
Posted 10 October 2009 - 04:47 PM
So you dont think im a total dumbass for not understanding then...
Im definitely getting shader x7, cause it might come with some slappinable code especially, and I might get that p&h book you mentioned, because itll probably get me thinking more standardly about things.
Thankyou for your time.
<EDIT> Integrals? Doesnt sound easy. I got my brother to have a look and he said it was "double integration" whatever that means because he went through maths at uni. But even he cant help he says its too hard. </EDIT>
#7
Posted 10 October 2009 - 06:14 PM
#8
Posted 10 October 2009 - 09:15 PM
Id be bringing out the easy lecture as soon as I do it, and ill mention how im actually looking for a dry surface not a wet surface, in real time.
I gathered points around a spherical area around every pixel, BUT IT DIDNT WORK! It ONLY LOOKED LIKE RUBBER!
I was thinking there was a way to use proper balancing equations to bring it to real marble quality.
But thanks, I understand what you say, just not what they say.
#9
Posted 11 October 2009 - 04:48 AM
double integrate((f*)(double), double from, double to)
{
double sum = 0.0;
const double step = 0.001;
for (double x = from; x < to; from += step)
sum += f(x) * step;
return step;
}
The only difference is that the mathematical integral assumes that "step" is infinitely small, making the calculation infinitely accurate.
#10
Posted 11 October 2009 - 04:23 PM
Is double integration 2d integration?
http://www-evasion.i...07/sap_0327.pdf
Ive found an even simpler explained paper, but I think its missing equations, I almost understand tho...
#11
Posted 11 October 2009 - 05:16 PM
rouncer said:
Yep. However, most of the integrals in those papers are actually even worse. For instance in the Ki paper in equation 1, the two integrals are over an area around the point and over the hemisphere, respectively. Each of those is a 2D integral in itself, so the whole thing is actually a 4D integral.
#12
Posted 11 October 2009 - 05:41 PM
Ive always done my maths with simple code and variables, I even write * for multiplication when I do my simple algebra I need from time to time on a piece of paper on the dining room table...
I remember I was looking up wavesurfing voxel terrains and I got some of maths written by the lecturer in C! cool! So it slaps straight in, I much prefer teachers that do the conversion for you!
But I have been torturing myself with equations these past few days but I think im getting a little better at it.
I bet "4d integration" could make it into code a lot of different ways... am I right?
#13
Posted 11 October 2009 - 05:54 PM
#14
Posted 12 October 2009 - 12:31 AM
rouncer said:
Yeah, basically, although as ReedBeta says, you'll never actually do the integration like that in real time as it's far too expensive. You have to find approximations.
And that's where the maths comes in. You can make integration a lot simpler to computer if you can find the antiderivative. For example:
if f(x) = 2.0 * x
then the antiderivative is F(x) = x * x
and then you can calculate the integral more easily (and more accurately):
integrate(f, from, to) == F(to) - F(from)
This is called the second fundamental theorem of calculus.
Unfortunately, finding the antiderivative is difficult in many cases, so you have to use approximations.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












