Cycles new microdisplacement testing, discussion and blend sharing

That depends.

Technically, you just add a subdivison surface modifer to the end of your stack and set that to adaptive.

If that is a good idea, though, depends on your scene.
The adaptive subdivsions benefit from having a base with very little polygon count as it’ll only subdivide parts of the mesh until the pixel/verts ratio is met.
The subdivision surface modifier just flat out increases your polycount. And adaptive will not de-subdivide stuff.

So, just using a plane and shader displacement will result in high detail landscapes with relatively low resource needs.

There are still reasons using the displacement modifier or a combiation of both.
I my case it’s because “microdisplacement” is confused when the UVs arent connected and because I don’t want the fine details being pushed in the same vector as my overall structure.

Comparison: The same object, using only adaptive subdivsions:



In the upper left part of the image you can see that the object becomes disconnected where the uvs are seperate.
And front center you can see that it just pushed everything straight up, which does not look that “organic” anymore.

I think for a landscape, if you don’t want to actually model the overall geometry, you could use both, but:
You’ll have to use different textures for your displacement modifier and your microdisplacement and you’ll have to find a balance between the settings of both subdivision modifiers.
If you need a high count for displacement, you might have to reduce the adpative subdivsions. (Or buy more RAM)

Fair enough, that wasn’t clear from your original post. Somewhere earlier in this thread, Brecht mentions that adaptively subdivided faces are converted to patches, which take up more memory. His main argument against moving the UI for adaptive displacement out of modifiers was that users might accidentally subdivide already dense meshes. Apparently, you want to intentionally do that, which may simply go beyond what OpenSubDiv is designed for. Try monitoring your memory usage, it may actually be your OS killing the Blender process.

Should i Apply the displace modifier and subdiv modifier to the terrain so in other words their will be no modifers in the stack anymore, the terrain will have that 8 million tris and original displace detail then baked directly into the mesh. Then use the micro displace within the shader to only add displace to the rocks by useing a mask map within the shader that would only Micro displace the rocks area’s.

For adaptive subdivision (i.e. “micropolygons”) to work at all, you need to use a subdivision modifier (at the bottom of the stack). Again, there is no “micro displace” feature, there’s only subdivision (adaptive or not) and material displacement. They work independently.

But all the images show very low poly counts that people are using on objects when using the micro displace feature. But because my terrain will have a base face count of 8 million tris how should i set up the the adaptive diceing rule within the displace modifier that only affects the shader micro displacement? As the model has lots of face detail to begin with surly ill need to use much less Diceing than on an object with very low poly count?

Do you really need a base mesh of 8 million polygons? You should first try to reduce that, if possible. If the faces are already small, they will not be subdivided further, but they will still need to be converted to patches.

I was just running a test render on GPU of a large terrain displacement. Seems that it was sharing both RAM and vRAM totalling about 30gb on the system across both.
I didn’t realise that Blender could do that. Cool.

Cheers Guys, After i little play ive started to get something acceptable for what i need. Ive completely removed the displace modifier and subsurf from the stack and only got the subsurf modifier with adaptive set. The reason i wanted to try to keep high poly count was for vertex group selections for boulders and tress etc proceduraly scattered with the particle system and instanced meshs.

Ill see if i can find a way round this like duplicateing the mesh, have displace modifier and subdive on it NOT using the adaptive system and just hide the mesh at render time, then ill be able to use the vertex groups from that copy of the terrain to place tress, boulders etc into the scene in the right place at the right height. Will take some testing to find what power diaplce in the modifier matchs the power of displace needed in the shader displace version so they line up exactly.

Heres a quick render of the terrain with just the Micro displace setup, ive also added a mix system for the rock faces displace maps to blend with the terrain height displace map so the rock faces now have a more realistic look as it’s also using the displace detail from the rock textures.


An animation test… Shaders: Clay VS MPD


grass test(like vray displacement grass):smiley:

I’m curious, what would have to go into actual adaptive displacement (subdividing more only where a displacement or vector map calls for additional geometry to reach its proper limit surface)? I can’t imagine it’s a simple process, but OSD would appear to have it built in.

OpenSubdiv does not have it built-in as far as I know.

For arbitrary displacement shaders it’s a difficult problem. There’s a whole range things you could do to adapt the subdivision to the displacement functions: oversubdividing and then simplifying, adding more subdivisions around sharp edges, analyzing image textures to find where the detail is, some iterative algorithm to place edges exactly along discontinuities, etc.

I’m not sure which renderer is doing something particularly advanced here though.

I haven’t read all 19 pages so this question might be answered but on my win64 with build 6f80604 the viewport preview doesn’t update when changing the material node graph. Is this expected? It just means I have to keep toggling shading mode in the 3D view to see changes. Same behaviour experienced for both CPU i7-6700 and GPU GTX780.

Is it possible to implement MD in Blender Render via the shaders?

It’s a known limitation right now.

No, this is not something you can implement in a shader.

No worries, thanks brecht.

Does anyone have info about when caching will be added back?

Had a few hours to spare, so thought id work on my shader system for terrains with Micro displacement:


:cool:looking great!
? procedural, ratio (size-scale), some stats :o … any info would mean a lot.
TIA

It would be nice if adaptive subdivision wouldn’t split meshes automatically on material borders.


I see that the vertex locations there wouldn’t be non-ambiguous because of the two displacements fighting each other, but couldn’t they just be averaged from the locations calculated for both shaders? Or maybe the one with the smaller displacement could be favored. I just prefer not to have holes in the mesh.

Could adaptive subdivision that underlies the displacement build be adapted to work with volume textures - esentially an adaptive isosurface generator?

I second this notion. Running into the same issue.

I would like to see support for Tiled EXR images. It should help with memory management of large real world geometry landscape displacements. Here an explanation from the Chaosgroup website.

https://docs.chaosgroup.com/display/VRAY3MAYA/Tiled+OpenEXR+and+TIFF+Files

It was on the GSOC list, but there wasn’t enough time. The devs are well aware it needs to be done, I’ve whined at them a bunch about it. :wink: