Syntopia
|
|
« Reply #30 on: March 01, 2015, 09:41:55 PM » |
|
It may seem counter intuitive but after that many bounces the lighting is usually minimal unless you have a material like glass (but much better to give it too much light than none at all). Maybe you do this already??
Yes, if the ray doesn't hit anything after maxRaySteps, I assume it escapes. I believe, this is also why the black dots (which are no longer NaN - I cheked that) appears when cranking up the maxRaySteps: the ray progresses longer, and hits the ceiling. (But I'm a bit puzzled why this does not happen for pure reflection - there might still be a bug). Yes it is possible but that kind of march gets very slow as you have to calculate the cloud density at small steps. One thing that could be done with these highly sampled scenes is to jitter the cloud density march and take just a few samples of cloud (per frame sample). lol Syntopia will hopefully understand that.
It is one of those requests that gets put last on the bucket list.
You can get very nice and very fast results using a few samples: https://www.shadertoy.com/view/MtfGDBHowever, if you want truly participating media, you have to do proper lighting at each cloud sample, which is expensive. But you are right Eiffie, that if we just choose a few random samples we could converge to the true solution.
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #31 on: March 01, 2015, 10:51:42 PM » |
|
Also this one: https://www.shadertoy.com/view/Xdf3zBAnother update! Last time I haven't updated the presets so there may be some problems when using them. Fixed now. I've also corrected the warnings. It should work on non Nvidia CGs. Here is a render with the tweaked AO:
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #32 on: March 01, 2015, 10:57:00 PM » |
|
BTW! for the black dots, a workaroud is to do : return max(0.,col); in color() function. That worked for me.
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #33 on: March 02, 2015, 12:18:18 AM » |
|
I tried implementing some volumetric fog. The idea is simple: choose a random point on the primary ray, and check whether you can trace a ray to an arbitrary point on the sun disc. The attached example uses Perlin noise for the fog field. Notice in particular the shadow of the closest sphere.
This is reasonably fast. For an even less expensive solution, just sample the fog density at an arbitrary point w.o. checking visibility.
|
|
|
Logged
|
|
|
|
eiffie
Guest
|
|
« Reply #34 on: March 02, 2015, 04:39:41 PM » |
|
Here is a version of knighty's version of syntopia's shader with iq's fast clouds (no real shadows). I didn't really optimize this but I thought since Crist-JRodger started the thread by asking for it someone should make it. You have to enable it with #USE_IQ_CLOUDS Look at the code for a brief explanation of the sliders. There are 2 files a new DE-Raytracer and a test scene. The clouds are dependent on MaxDistance (they fade out) and HF_Dir (for which way is up in the scene). Syntopia's version is more complete and with less sampling could be fairly fast. These clouds resolve in a few frames so you waste gpu cycles after that.
|
|
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #35 on: March 02, 2015, 04:49:05 PM » |
|
I tried implementing some volumetric fog. The idea is simple: choose a random point on the primary ray, and check whether you can trace a ray to an arbitrary point on the sun disc. The attached example uses Perlin noise for the fog field. Notice in particular the shadow of the closest sphere.
This is reasonably fast. For an even less expensive solution, just sample the fog density at an arbitrary point w.o. checking visibility.
And volumetric perlin more dense next to the objects?
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #36 on: March 02, 2015, 09:22:17 PM » |
|
Those are wonderful results with fog. First results of my attempt. I'm not releasing yet the frag because I'm really confused by all those formulas and there are a lot of errors to correct.
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #37 on: March 02, 2015, 10:11:58 PM » |
|
I played around with my volumetric fog thing and I don't think it is the right way to go. It will create some 'god ray' volumetric effects, but it will never look like clouds. For this, the clouds must be able self-shadow (see IQ's description: http://www.iquilezles.org/www/articles/dynclouds/dynclouds.htm), cast shadows on ground and receive shadows.
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #38 on: March 02, 2015, 10:26:33 PM » |
|
eiffie, looks nice! need to create animation ) Thank you! Just some time to tune them, but it's fantastic ) knighty, wow ) real god-rays : How many times I dreamed about sun, clouds, bloom and god-rays ) and now i't s possible. Guys you make amazing things ) I played around with my volumetric fog thing and I don't think it is the right way to go. It will create some 'god ray' volumetric effects, but it will never look like clouds. For this, the clouds must be able self-shadow (see IQ's description: http://www.iquilezles.org/www/articles/dynclouds/dynclouds.htm), cast shadows on ground and receive shadows. I think it's different objects. Clouds - on the sky, god-rays 'closer' to scene and formed by fog or something more uniform.
|
|
« Last Edit: March 02, 2015, 10:32:25 PM by Crist-JRoger »
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #39 on: March 02, 2015, 11:31:07 PM » |
|
Oh my such splendid images
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
|
eiffie
Guest
|
|
« Reply #41 on: March 03, 2015, 05:37:12 PM » |
|
I'm glad you were able to figure out the controls! They are "touchy". Looks nice and I think you all are right we do have to treat these (clouds and fog) as different beasts or it becomes much too slow. With fog you can take a few samples and let it converge but with clouds that self occlude you have to march in small increments
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #42 on: March 03, 2015, 07:51:55 PM » |
|
Great renders CJG!
Another update. Added Iq's like clouds that eiffie implemented and volumetric light. (Don't forget to set Aperture to a value!=0.) The volumetric noise takes some time to converge especially with anisotropy. There are two reasons: - I'm having troubles with using RNG. - Only "distance to light" -importance- sampling is implemented for now. That explains high variance when using anisotropy. - Stratified sampling would help a lot with reducing variance. That makes them three.
And some pictures.
|
|
« Last Edit: March 03, 2015, 07:57:54 PM by knighty »
|
Logged
|
|
|
|
eiffie
Guest
|
|
« Reply #43 on: March 03, 2015, 09:22:36 PM » |
|
These renders get me excited about the compo!
|
|
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #44 on: March 03, 2015, 09:27:51 PM » |
|
and as a side note: I EXPECT STUFF LIKE THIS IN UTTER MOTION!"
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
|