- User Since
- Jun 6 2014, 4:14 PM (262 w, 1 d)
Jul 12 2014
Just for the heck of it, I implemented the theoretical approach, estimating the remaining error via variance.
From above MATLAB file, I dereive that we need at least 100 samples to determine variance, better 500 samples, for hard pixels of variance 0.01.
Jul 10 2014
Here is a build that disables tiles that show little progress, working on the noisy tiles only.
When the noisy tiles become settled, it continues to sample all tiles depending on the noise level.
Sure, if I had the time. Unfortunately not the case, but I am willing to help yall.
I'm trying to team up with @Fábio Santos (fabio) , he's working on the XML exporter that I did not know of before.
I think it makes sense to put everything together - no need for a plethora of separate patches.
Unfortunately there is no way to contact him via blender dev, so I sent him an invite to contact me on BA.
_MAYBE_ you can create that contact.
Jul 9 2014
@Fábio Santos (fabio): pls contact me at BA, so I can help you w/ the cycles stuff: http://blenderartists.org/forum/member.php?225611-PRosendahl
OK, please close this task.
Here is the BA link:
In v02 the evaluation takes place on a pixel-basis, but only the tile stores the maximum "value" of the contained pixels.
Jul 8 2014
From what I understand, the description is correct, except for
- the difference of the averaged sample (that is the resulting linear pixel color, not the accumulated value) is compared every x-samples
- the nopping is tile-wise
- once all tiles are under the threshold, the threshold is lowered and some tiles are reactivated
I think it is very important to export/import materials, this will make people share stuff. Right now it is impossible to transfer materials from file->file.
People could paste simple text files to blendswap...
The process is a bit more complicated. They are loaded into RAM when the scene is constructed. Until then they are just a reference to a file.
Jul 7 2014
Here is a patch that adds normals and embedded files (textures) to the XML:
Maybe that task can be closed/merged.
Right... priority should be initialized with 0:
Here you go:
(it is just the EXE)
Please close this topic. Fabio is working on a full scene exporter here: https://developer.blender.org/T38279
Very nice! Here is my shot at materials export:
Will request closing that topic, so let's continue with your exporter.
Jul 5 2014
Forgot to mention that it is not exported to a file, but as (windows) clipboard text. Though it should work on other OS as well (bpy.context.window_manager.clipboard).
I had similar problems. It came down to "Beckmann" with roughness=0 does not work in latest cycles. If you change it to "Sharp" it works again. Maybe it's that?
BTW the break-disk is also pretty dark compared to the old render indicating a reflection problem, not a shadow problem.
Much cleaner. So we can also get rid of the node's socket-name conversion where spaces are eliminated (ie "is camera ray" -> "iscameraray") in xml_socket_name().
I dont mind at all :-)
Jul 2 2014
Jul 1 2014
I would not break the tiling. IMO it is the best way of dividing work into tasks.
I decided to put the NOP parameters below the existing "Performance" parameters. They are not aligned perfectly as they are just 2 independent columns...
Jun 30 2014
Thank you, I wish I asked earlier. Here it is:
@Wolfgang Faehnle (mib2berlin) It is designed to turn off tiles without affecting the resulting image. By turning off tiles, it saves calculation time. I did some benchmarks, but let me first tweak stuff.
The settings are pretty conservative. This will sample the entire scene until even dark noise is barely visible. Then it will start nopping stuff.
So unless you have very "simple" areas that fill an entire tile, there will be no nopping.
Jun 29 2014
@Lukas Stockner (lukasstockner97) I think your model is correct, there is an arbitrary color-distribution around the pixel (in space) c(x). And then you have a distribution-density-function to randomly scan that space phi(x). The distribution might be evenly distributed (very diffuse material), or a very sharp bump (eg reflective smooth material, incoming angle=outgoing angle).
Then you need to integrate c(x)*phi(x). You do that by sampling c(xi), where the generation of xi is determined by its density phi. The mean value is the desired color for that pixel. At least that is how I would model this.
This version precomputes the scaling (1/sample_count) to speed up subsequent calculations.
- maximum of 30% tiles nopped
- tile-wise nopping, as pixel-wise does not make sense for CUDA
Includes proper CUDA kernel.
Jun 28 2014
How about this
[My idea to the "worst case distribution" was that the 0-1-distribution gives me extreme values for each sample, maximizing the variance.
Or the other way around, if any sample lies in between (say, a continuous rectangular distribution), it converges faster to the expected value.
So when I can prove something for this worst-case distribution (like the above series-of-averages converging theory), it holds true for "friendlier" distributions.]
I took some time to review. I does not make sense to NOP single pixels when using GPUs. It would be a cycle waste, since all "threads" (or whatever the term is) run in sync. Nopping a single thread (pixel) makes it just wait for the others.
Lukas' code diverts the current x/y to another (more needing) x/y position. That is the way to go _within_ the tile for GPU.
Right, it fails to find my git executable. Will fix that, probably just an environment variable. Thank you!
FYI, this one purely sorts by progress. So worst tiles are processed first until they catch up, nopping the other tiles. (eps=1)
This one should give very bad noise transitions:
Patching against master. Trying to keep VS2008 as VS2013 gives me eye cancer. Fortunately the changes do not require openmp (yet).
Jun 27 2014
Thank you for the counter example! I was starting to download stuff from blendswap to check it out...
OK, to bring this forward
- added a PASS_SAMPLE_COUNT that counts the samples per pixel
- film_convert() uses that pass-data
- adaptive nopping/resuming of tiles depending on maximum-progress-per-tile
- max 90% of all tiles can be nopped, after that the threshold is lowered
Jun 26 2014
I'm always in for cooperations. The goal is to bring Cycles forward. I have seen other products with _very nice_ adaptive sampling results.
In v01: the idea was to stay below a visible progress in order to avoid all those (visible) noise problems.
At the time it stops, 200 samples are needed for a .5 RGB-step ; 400 samples for a 1.0 RGB-step. And all those samples have to be biased from the present average (either all more or all less, otherwise they partially cancel out).
Jun 25 2014
By the time writing, I realize that there is a memory leak of Session::last_tile_buffers , they need to be freed in ~Session()...
These are the settings I like most, it doesnt kill the noise entirely (like if you zoom in), but IMO a good balance btw nopping vs noise:
0.02% every 5 samples
Nah, 1% change is just too much. this is, speaking in RGB 255-value-range, a change of 2.55 in either R,G, or B (or alltogether).
To stay below visible changes we need about 1/255 ; and then to account for rounding, so we should be around 1/510 \approx .2% .
@Sergey Sharybin (sergey): correction: rev3 works with Session::buffers _AND_ Session::tile_buffers , depending on whether you run in background or non-background.
@Sergey Sharybin (sergey): I am manually editing the patches to clean them up. In rev2 nop_tiles() was designed to work in non-background mode only. Rev3 fixes that, working with the Session::tile_buffers variable (not with "buffers").
Here is HEAD with the tile-nopper:
Jun 24 2014
Figured it out shortly after my message, just had to build INSTALL. I am adjusting the code so it can be used for blender-hosted cycles as well ( it uses the "Session::tile_buffers" variable to store stuff instead of "buffers" ).
v01: Even worse, because when NOPPED with visible noise present, it will preserve that noise forever.
Here is a new patch, cleaned up. It checks every 5th sample whether the maximum progress on a tile is below 5% (set parameters in Session::nop_tiles()).
If so, it disables the entire tile.
Jun 23 2014
adaptive sampling _within_ the tile? That would mean pixel-wise samples-count variation, and when finished do a scaling to mimic a homogeneous sampling over the entire tile. That is basically what Lukas is doing. In v18 I couldnt find the sampling homogenisation, but I assume this is little work for him.
Background: I am working with vs2008. Frankly I never got blender to run, and I also do not intent to unless absolutely necessary. I converted Cycles to DLL (requires MD builds of all libraries) and plug it into our software.
As a common platform (so we have something to talk about) I suggest the Cycles standalone app driven by XML files.
His evaluation function can directly replace the one in the patch. It is open to any progress/convergence evaluation function.
I just dont feel right about converting to grayscale - it disregards the spectral information. I'm using fake dispersion, so lots of rays of similar brightness but totally different colors. Except from that IMO correlation is a good measure.