Jason Posted April 16, 2003 Share Posted April 16, 2003 Hey man, We've seen your posts on the SESI forum.. whatcha doing? Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 16, 2003 Share Posted April 16, 2003 Your fault.... Sub-surface scattering...Irradiance....fighting me.....must not give up.... somebody say brute force? Is it just me who is getting slapped around by irradiance? SESI hasn't said anything and I'm scared that its user error. (Although I doubt it). jim. Its April 15th, do you know where your taxes are? Quote Link to comment Share on other sites More sharing options...
michael Posted April 16, 2003 Share Posted April 16, 2003 I'm not being slapped around by irradiance...well...at least not directly Quote Link to comment Share on other sites More sharing options...
Jason Posted April 16, 2003 Author Share Posted April 16, 2003 Heh heh, sorry to invoke a world of pain for you.. SESI might be unresponsive on the irradiance issue, but I'm pretty sure the necessary people have seen the threads and are probably working on it anyway. At least I hope so - because that's usually the case.. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 16, 2003 Share Posted April 16, 2003 Hehe I don't mind SESI not responding. Its just I'm always a little scared that a suspected bug is really just a user bug. The dreaded response: "No you dolt, it works fine, you forgot to check the following button." jim. Quote Link to comment Share on other sites More sharing options...
michael Posted April 16, 2003 Share Posted April 16, 2003 lol.... a friend of mine is fond of saying it's a PEBCAK error > Problem Exists Between Chair And Keyboard. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 18, 2003 Share Posted April 18, 2003 Nothing good on CNN today so I decided to do a few SSS tests. 32 samples 512 samples SSS actually means super slow shading. jim. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 18, 2003 Share Posted April 18, 2003 One more that I rendered while I was playing Generals jim. Quote Link to comment Share on other sites More sharing options...
Jason Posted April 18, 2003 Author Share Posted April 18, 2003 Wow - this looks pretty good! Are you using caching? And have you tested a shot animation? Cheers! Happy friday, Jason Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 18, 2003 Share Posted April 18, 2003 I'm just brute forcing it right now. I'll do a little zoom animation, so I can see how bad it "shimmers". I'll post the hipnc which contains the vex shortly. jim. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 18, 2003 Share Posted April 18, 2003 Its not very smart right now. It just shoots tons of rays everywhere to get the distance and the surface color. This is why the edges of the cube appear black, very few samples are hitting the top. Its a start. Here is the working version...so far. // Brutey SSS // slow rendering is fun. #define PI 3.14159265359 vector sssGather( vector P; // Point being shaded vector D; // Direction to sample in float bias; float maxContrib; float maxDist; float extCoeff; int samples; string objName; ) { vector colorOut = 0; vector randomDir = 0; vector refColor = 0; vector Dn = normalize(D); float hitDist = 0; float extinction = 0; int i; for(i=0; i<samples; i++) { randomDir = normalize(nrandom() - .5); if ( dot(randomDir,Dn) < 0 ) { randomDir *= -1; } // hitDist = rayhittest(P, randomDir, bias, "scope", objName); hitDist = rayhittest(P, randomDir, bias); if (hitDist > 0) { extinction = exp(-extCoeff*hitDist); // refColor += extinction * reflectlight(P, randomDir, // bias, maxContrib, // "scope", objName, // "maxdist", maxDist); refColor += extinction * reflectlight(P, randomDir, bias, maxContrib, "maxdist", maxDist); } } colorOut = refColor / samples; return colorOut; } surface bf_SSS( vector diff = .5; float Ksss = 1; float extCoeff = 1; int samples = 16; float maxDist = 1e7; float maxContrib = 1; float bias = 0.01;) { vector Nn = normalize(N); string objName = getobjectname(); Cf = ambient(); Cf += diff * diffuse(Nn); if (Ksss > 0 && getraylevel() == 0 && samples > 0) { Cf += Ksss * sssGather(P, -Nn, bias, maxContrib, maxDist, extCoeff, samples, objName); } } jim. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 18, 2003 Share Posted April 18, 2003 I really wish reflectlight(), or trace() returned the distance of the ray that was fired. That would mean I could skip the rayhittest() call. I'm open to improvements, comments and a Midori Sours.. jim. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 19, 2003 Share Posted April 19, 2003 Holy noise batman. After viewing about 20 frames of the animation I decided I'll try irradiance caching again instead of brute force. jim. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.