Patrick Rosendahl (PRosendahl)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 6 2014, 4:14 PM (163 w, 6 d)

Recent Activity

Jul 12 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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 12 2014, 11:35 PM · BF Blender, Cycles

Jul 10 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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.

Jul 10 2014, 10:32 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40773: mesh normals in cycles.xml and embedded (texture) files.

Sure, if I had the time. Unfortunately not the case, but I am willing to help yall.

Jul 10 2014, 10:10 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40773: mesh normals in cycles.xml and embedded (texture) files.

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 10 2014, 9:50 PM · Cycles, BF Blender

Jul 9 2014

Patrick Rosendahl (PRosendahl) added a comment to T38279: Improve Cycles standalone.

@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

Jul 9 2014, 2:21 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40773: mesh normals in cycles.xml and embedded (texture) files.

OK, please close this task.

Jul 9 2014, 12:23 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Here is the BA link:
http://blenderartists.org/forum/showthread.php?342516-cycles-tile-disabling

Jul 9 2014, 12:22 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

In v02 the evaluation takes place on a pixel-basis, but only the tile stores the maximum "value" of the contained pixels.

Jul 9 2014, 12:52 AM · BF Blender, Cycles

Jul 8 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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
Jul 8 2014, 7:56 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T38279: Improve Cycles standalone.

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...

Jul 8 2014, 12:44 AM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40773: mesh normals in cycles.xml and embedded (texture) files.

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 8 2014, 12:39 AM · Cycles, BF Blender

Jul 7 2014

Patrick Rosendahl (PRosendahl) added a comment to T38279: Improve Cycles standalone.

Here is a patch that adds normals and embedded files (textures) to the XML:
https://developer.blender.org/T40773
Maybe that task can be closed/merged.

Jul 7 2014, 11:16 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Right... priority should be initialized with 0:
http://cycles.patrickrosendahl.de/blender_NOP_v02_rev6.zip

Jul 7 2014, 8:13 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Here you go:
http://cycles.patrickrosendahl.de/blender_NOP_v02_rev5.zip
(it is just the EXE)

Jul 7 2014, 1:12 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) awarded T38279: Improve Cycles standalone a Like token.
Jul 7 2014, 12:59 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40929: NodeWrangler / node_efficiency_tools.py - Export Material as Cycles XML.

Please close this topic. Fabio is working on a full scene exporter here: https://developer.blender.org/T38279

Jul 7 2014, 12:59 PM · Cycles, Addons
Patrick Rosendahl (PRosendahl) added a comment to T38279: Improve Cycles standalone.

Very nice! Here is my shot at materials export:
https://developer.blender.org/T40929
Will request closing that topic, so let's continue with your exporter.

Jul 7 2014, 12:58 PM · Cycles, BF Blender

Jul 5 2014

Patrick Rosendahl (PRosendahl) added a comment to T40929: NodeWrangler / node_efficiency_tools.py - Export Material as Cycles XML.

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).

Jul 5 2014, 11:21 PM · Cycles, Addons
Patrick Rosendahl (PRosendahl) updated subscribers of T40916: BMW Render difference.

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.

Jul 5 2014, 11:16 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) updated subscribers of T38279: Improve Cycles standalone.

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().

Jul 5 2014, 11:09 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

I dont mind at all :-)

Jul 5 2014, 11:02 PM · BF Blender, Cycles

Jul 2 2014

Patrick Rosendahl (PRosendahl) reopened T40929: NodeWrangler / node_efficiency_tools.py - Export Material as Cycles XML as "Open".
Jul 2 2014, 9:13 PM · Cycles, Addons

Jul 1 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

I would not break the tiling. IMO it is the best way of dividing work into tasks.

Jul 1 2014, 8:45 AM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

I decided to put the NOP parameters below the existing "Performance" parameters. They are not aligned perfectly as they are just 2 independent columns...

Jul 1 2014, 12:39 AM · BF Blender, Cycles

Jun 30 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Thank you, I wish I asked earlier. Here it is:

Jun 30 2014, 5:33 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

@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.

Jun 30 2014, 1:46 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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 30 2014, 9:18 AM · BF Blender, Cycles

Jun 29 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

@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.

Jun 29 2014, 8:39 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

This version precomputes the scaling (1/sample_count) to speed up subsequent calculations.

  • min_samples=10
  • nth_sample=10
  • eps=0.002
  • maximum of 30% tiles nopped
  • tile-wise nopping, as pixel-wise does not make sense for CUDA

Includes proper CUDA kernel.

Jun 29 2014, 2:08 AM · BF Blender, Cycles

Jun 28 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

How about this

Jun 28 2014, 10:10 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

[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.]

Jun 28 2014, 5:26 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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.

Jun 28 2014, 10:46 AM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Right, it fails to find my git executable. Will fix that, probably just an environment variable. Thank you!

Jun 28 2014, 2:49 AM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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:
http://cycles.patrickrosendahl.de/blender_min5_every5_sortByProgress.zip

Jun 28 2014, 1:44 AM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Patching against master. Trying to keep VS2008 as VS2013 gives me eye cancer. Fortunately the changes do not require openmp (yet).

Jun 28 2014, 1:25 AM · BF Blender, Cycles

Jun 27 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Thank you for the counter example! I was starting to download stuff from blendswap to check it out...

Jun 27 2014, 9:20 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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 27 2014, 7:28 PM · BF Blender, Cycles

Jun 26 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

I'm always in for cooperations. The goal is to bring Cycles forward. I have seen other products with _very nice_ adaptive sampling results.

Jun 26 2014, 10:39 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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 26 2014, 9:04 AM · BF Blender, Cycles

Jun 25 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

By the time writing, I realize that there is a memory leak of Session::last_tile_buffers , they need to be freed in ~Session()...

Jun 25 2014, 9:35 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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
http://cycles.patrickrosendahl.de/blender_avg5frames_02perc.zip

Jun 25 2014, 6:58 PM · BF Blender, Cycles
lopata (lopataasdf) awarded T40774: adaptive sampling v01 a Like token.
Jun 25 2014, 4:44 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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% .

Jun 25 2014, 3:35 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

@Sergey Sharybin (sergey): correction: rev3 works with Session::buffers _AND_ Session::tile_buffers , depending on whether you run in background or non-background.

Jun 25 2014, 12:25 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

@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").

Jun 25 2014, 10:33 AM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

Here is HEAD with the tile-nopper:
http://cycles.patrickrosendahl.de/ASv01_win64_rev3.zip

Jun 25 2014, 8:42 AM · BF Blender, Cycles

Jun 24 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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" ).

Jun 24 2014, 9:15 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

v01: Even worse, because when NOPPED with visible noise present, it will preserve that noise forever.

Jun 24 2014, 2:43 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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 24 2014, 9:51 AM · BF Blender, Cycles

Jun 23 2014

Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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.

Jun 23 2014, 11:43 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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.

Jun 23 2014, 10:38 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) added a comment to T40774: adaptive sampling v01.

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.

Jun 23 2014, 9:55 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) updated subscribers of T38401: Metropolis Sampling.
Jun 23 2014, 4:08 PM · Cycles, BF Blender
Patrick Rosendahl (PRosendahl) reopened T40774: adaptive sampling v01 as "Open".
Jun 23 2014, 3:49 PM · BF Blender, Cycles
Patrick Rosendahl (PRosendahl) reopened T40773: mesh normals in cycles.xml and embedded (texture) files as "Open".
Jun 23 2014, 3:06 PM · Cycles, BF Blender