Page MenuHome

Cycles: Microdisp - Add preview dice rate for displacement
ClosedPublic

Authored by Mai Lavelle (maiself) on Apr 13 2016, 11:12 AM.

Diff Detail

Repository
rB Blender

Event Timeline

Mai Lavelle (maiself) retitled this revision from to Cycles: Microdisp - Add preview dice rate for displacement.Apr 13 2016, 11:12 AM
Mai Lavelle (maiself) updated this object.
Mai Lavelle (maiself) updated this revision to Diff 6417.
Brecht Van Lommel (brecht) requested changes to this revision.

Would be interesting to get input from other Cycles developers here, but I think this should be a scene level setting, in the Simplify panel. The scene level setting would then get multiplied with the per object dicing rate.

Ideally users could even leave the object level dicing rate alone most of the time, and only tweak a scene level dicing rate.

This revision now requires changes to proceed.Apr 14 2016, 12:08 AM

Adjusting the dicing rate for each object might be a hassle in scenes with many objects, so having a global multiplier (for preview and final) might make sense.

Having the preview setting work as a percentage might be a good idea, since cases are probably common where you'll want more dicing for some objects compared to others, but still have the whole scene simplified. i.e. 50% would dice all objects in the scene at 2x the number of pixels as their object setting. Would probably require some extra int casting or floor/ceil stuff, but would be much more useful I think than a flat simplification number for everything in the scene.

i've tested the micropolygon stuff for like 1 month and in my experience theres nearly no need to tweak the object subdiv rate. for the final render you usually want a subdiv rate of 1 and for the preview something bigger like 4-5 (looks almost the same). i wouldnt put the global subdiv rate in the simplify panel 1. its too hidden 2. the global rate should be in focus not the object rate 3. it should be a panel in the render setting (called like "geometry" or so) so its easier to find/use

just my opinion :)

i've tested the micropolygon stuff for like 1 month and in my experience theres nearly no need to tweak the object subdiv rate. for the final render you usually want a subdiv rate of 1 and for the preview something bigger like 4-5 (looks almost the same). i wouldnt put the global subdiv rate in the simplify panel 1. its too hidden 2. the global rate should be in focus not the object rate 3. it should be a panel in the render setting (called like "geometry" or so) so its easier to find/use
just my opinion :)

I agree. Would be nice to be able to tweak the settings from the render panel. If there are global options I feel they should be alongside all the other things you set at render time (volume sampling, light paths etc).

Ok, I propose the following:

  • Add scene level dicing rate, and scene level max subdivisions (like D1922)
  • Rename Volume Sampling panel to "Detail", "Resolution" or something like that (can someone think of a good name?), and put these settings in there.
  • Add a previewing dicing factor to the scene Simplify panel. The property is a factor in the range 0..1, displayed in the UI as a 0..100% percentage. For preview render the effective dicing rate is then scene_dicing_rate / preview_dicing_factor.
  • Have an per object dicing factor, again in the 0..1 range and displayed as a percentage. The dicing factor for an object is then scene_dicing_rate / object_dicing_factor. This property can have a soft limit of 1 and a higher hard limit, allowing higher values like 200% if specific objects need extra detail.
  • I don't know if we need an object level or preview max subdivision, I would leave them out to begin with.

How does that sound?

Ronny G (nutel) added a comment.EditedApr 16 2016, 2:39 AM

i would definitly agree with..

a scene level subdiv rate in pixels
one global max subdiv lvl (works for both final and preview)
to leave out the object max subdiv lvl setting
to rename the volume panel and add more global stuff (global settings ?)

but the rest sounds a little weird and complicated to me :) the preview subdiv rate shouldnt depend on the final rate (why should it?) and shouldnt be placed in the simplify panel (imagine preview samples in the simplify panel as a percentage slider - wtf? :))

for the percentage slider im not sure - whats the point of this? to see an effect you have to enter numbers like 10 or 20% or less (sounds quite low but it isnt - everything still looks smooth)

whats wrong with 2 separate subdiv rates (final and preview like the render samples) and an object multiplier/percentage divider?

again just my opinion :)

to rename the volume panel and add more global stuff (global settings ?)

"Global settings" is too generic a name I think. Some more ideas: "Geometry", "Geometric Detail", "Geometry Detail", "Surfaces & Volumes", "Dicing".

but the rest sounds a little weird and complicated to me :) the preview subdiv rate shouldnt depend on the final rate (why should it?) and shouldnt be placed in the simplify panel (imagine preview samples in the simplify panel as a percentage slider - wtf? :))

The simplify panel already contains settings for changing geometric detail in the viewport, the way I see it a preview dicing rate is exactly the same kind of setting. It would also make sense to have a preview volume step size, for faster volume rendering in the viewport.

I think they are closely related anyway, and I would like to have some consistency here, one way or another. Maybe it makes sense to put it all in a single panel in the scene settings, or to move the simplify panel to the scene settings, I'm not sure.

for the percentage slider im not sure - whats the point of this? to see an effect you have to enter numbers like 10 or 20% or less (sounds quite low but it isnt - everything still looks smooth)

It could be a totally decoupled subdiv rate, but I think the percentage is pretty intuitive. If you set it to 50% you would get about 1/4th the number of polygons, 10% about 1/100th. So you could go even lower, but you are giving up a lot of displacement detail and the percentage number would reflect that.

So my thoughts are this:

  • one dice rate per object, set by default to 1
  • a final render 'multiplier' somewhere with the other render settings (default 1)
  • a preview render 'multiplier' under the final render setting (default 8)

For me percentage seems very confusing, what is it a percentage of exactly? With multipliers it doesn't matter which a user views as 'more important' since the order works both ways.

I also wonder about the button to turn off subdivision in previews, do we keep this? It might be useful in complex scenes to turn off subdivision for some objects.

This comment was removed by Mai Lavelle (maiself).

I think the most common workflow for working with displacement is as follows:

#Viewport for render preview
#Node editor to edit the shader
#Render settings to edit light paths etc

It would be nice if you could edit the subdiv preview settings without having to switch to the simplify panel.
You switch the subdiv on and off quite often as you want to preview some parts of your shader without it so you get faster updates in the viewport.

@ brecht - what about a "Geometry & Volume" panel? :)

i would put the 2 subdivision rates in that panel like this

and the max subdivision level in the simplify panel :)

Wouldn't the "both"/auto-bump mode remove the need to use render dice rate = 1.0 in a lot of cases?

no thats not a good idea with dicing rate > 1 and displacement it could flicker quite a lot but thats not the topic here :)

The main thing I want to emphasize is that I would like the workflow to be that users control the dicing rate at the scene level nearly all the time. The object level dicing rate should be secondary, and something that you tweak to optimize the scene. That's part of the reason I suggest this to be a percentage, I actually want to make the scene level dicing rate more important.

The final goal here is that users can use subdivision surfaces and displacement, and not even have to worry about any dicing rates or settings like that. For simplification, the ideal might be a single percentage slider than can simplify the entire scene: subdivision, volumes, particles, ... . So from that point of view it makes sense to have all these preview settings be percentages.

Anyway, let's not lose too much time on these UI details. Let's name the panel "Geometry" (volumes are a type of geometry too), and put the render and preview dicing rates and max subdivision there. Let's leave out the toggle for turning off subdivisions for specific objects in previews, better to just lower the scene level preview dicing rate.

Changing the preview and object object level rates to be percentages can be done later still if we want, it's easy to change.

@ Everyone: Also please keep in mind that Displacement is an experimental feature, and clearly marked as such. We can still change UI and break compat after a few weeks (We did the same for hair actually too). :) Let's get this into master first, and worry about such details later.

Mai Lavelle (maiself) updated this revision to Diff 6439.
  • renamed "Volume Sampling" panel to "Geometry"
  • moved render and preview dice rates to this panel
  • made per object dice rate a multipler of the scene dicing rates
  • added some code to update render when preview dice rate is changed
Brecht Van Lommel (brecht) requested changes to this revision.
Brecht Van Lommel (brecht) added inline comments.
intern/cycles/blender/blender_sync.cpp
127–136

Please make this work for both preview and render dicing rate. We don't need it yet, but generally syncing code should also work for final render settings and not be specialized for previews. Eventually we might support faster re-renders or animation renders this way.

You can change, float preview_dicing_rate; to float dicing_rate:, and set it to the right value here based on preview. Then you can pass this dicing_rate to create_subd_mesh() as a parameter.

This revision now requires changes to proceed.Apr 17 2016, 5:41 PM
Mai Lavelle (maiself) updated this revision to Diff 6440.

Made requested changes

This revision is now accepted and ready to land.Apr 17 2016, 6:34 PM
This revision was automatically updated to reflect the committed changes.