← All ideas
  • Published 11 Mar 2019

Add option to use meshes with displacement modifier

Currently the displacement modifier uses just textures. Because blender is primarily a 3d software and not a drawing software so I think blender is missing a trick here because you can not easily use meshes as displacement textures. These displacement meshes could be really quick to create in blender which makes them really powerful. You could quickly create patterns like diamond plates, grilles and just basic elevation map sets for terrain.

The way the displacement modifer would use the meshes is to use them in tiled form just like it does with textures. So for terrain you could just create one displacement mesh and then add 3 displacement modifiers to your terrain mesh using that single displacement mesh to create the smaller, medium and large elevations in terrain (scale it 1x, 10x and 100x). This mesh could be set of cubes, balls or suzannes. Or sculpted meshes. Really really quick.

Another strength of this is that it is much quicker to use than messing with arrayed and shrinkwrapped objects to create similar effect. And you can easily and super quickly create patterns in 3d compared to creating them in texture form either in paint program or with noise patterns. Another strength is how easy it is edit the displacement mesh in 3d using the existing tools. This also works in 3d so it is theoretically much easier to create surface patterns on complex shapes than it is with arrayed shrinkwrap objects.

The way this works is that the displacement modifier uses the displacement mesh in similar way as it uses textures on its surfaces. I think that is how the textures are used? The user can use scaling to control the size in all direction (x/y/z), offsets xyz to move the displacement positioning, rotate and vertex groups to control the areas of effect. And a strength value so you can scale it up and down with single value.

Here is a sample modifier how it could look: Image

And here is what it does to a sphere using single suzanne's head mesh: Image The sample image is a bit misleading as it is just the sphere and the face meshes joined together. In reality the sphere surface should be displaced by the suzanne faces just like a displacement texture would do to the sphere mesh. The modifier does not use uvmaps for anything. Instead a simplified particle system is used to place the displacement objects on the surface. If there is just one displacement object then this modifier works as unique shrinkwrapper.

The modifier settings don't 100% match the result as it is all imaginery at this point. Here's rundown of the settings:

  • Mode can now be switched between texture and object.
  • direction is how the objects are aligned. In this example the z-axis of the suzanne is rotated towards face normals
  • negative/positive limits the direction
  • Number is how many suzannes are used. If you set this to 1 you can also use this modifier as shrinkwrapper
  • particles per face is 1 to limit overlapping objects. This is probably unnecessary setting
  • jittering just like with particles
  • scale allows you to scale the suzannes
  • vertex group to limit area of effect
  • strength controls the effect of this modifier. It can be -1, 0.1 or 400. The way this modifier works is that it uses the suznane object to displace the surface of the sphere and this setting allows you to tune this effect strength
  • randomness for scale and positioning settings might be useful as well
100%

Development Status: Open

Upvote 5 Downvote 0
Ideas-Battleship
11 Mar 2019

8 Comments

vasiln

You know you can render a height-map from a mesh, right? I know that's not as one-step as you're talking about, but it's a lot easier than setting up arrays+shrinkwraps.

1
Josephbburg

A better proposal would be a more flexible "cast" modifier, maybe using Maya's sculpt deformer as inspiration. If you could use cast modifier with any arbitrary target, it would be like displacement with a mesh, but more flexible.

Ideas-Battleship Author

* @Josephbburg * I think there are two different kinds of uses for this kind of mesh based deformer modifier. Either use it for surface displacement on a mesh or use it to deform a mesh. I think the displacement modifier in blender is the first type and cast modifier (or sculpt deformer in maya) is the second type. This suggestion is more about the surface deformation. So from my pov the cast modifier is not really what I am looking for. In fact in its current form it does nothing like what I suggested at all.

Maybe I wrote it poorly but essentially the displacement modifier is good for adding noise displacement on the surfaces of a mesh. And it can also use vector displacement as Vyacheslav mentioned below. My suggestion is about adding mesh support there as well so you can displace the mesh surface with other meshes. To create patterns on the surface for example.

I have never really used the cast modifier so maybe I don't understand it well but I just don't see any way at all how you could add this functionality to the cast modifier in the first place or how it could even do what I suggested in the post? I think we are talking about different things.

Josephbburg

It would help if your post had pictures. The problem with using mesh as a source for displacement is: what is your reference point? The origin/orientation of the source object? But how is this mapped from the source to the target? You would need to specify a UV location on the target mesh somehow, and a method for moving the 3D displacement of the source mesh (relative to a reference point or plane) to locations in the target's UV space.

This is Maya's sculpt deformer, take a look: youtube.com/watch . If you move the sculpt object to the surface of the target object, it does something like what you want. I would love to see something like this in Blender.

Anyways, what I think you will have to do is experiment with baking vector displacements. I'd recommend using xNormal. If you bake displacement onto a plane, you could probably get something like the effect you want by manipulating the UV of the displacement texture, or using a UV project modifier. Again, not really sure what you want without pictures.

1
Ideas-Battleship Author

* @Josephbburg * Reference point works the same way as it works with textures. But instead of using the uvmap and just mapping the displacement texture on the surfaces what you can do is two or three methos. You can either have an option like "rotate to face normals" which means the z/x/y direction of the displacement mesh should always point towards the face normal (or vertex normal). Or you can just have 3d shape displacing the original mesh in all directions differently.

If you use suzanne head then in first option you can create suzanne face displacement effect on all faces of your mesh depending how many tris you have. If this was a sphere then all around the sphere you had faces. Faces as in plural as you can tile and scale the mesh like you can with a texture.

In the second example with tiled suzanne head but without face normal rotation you'd have the suzanne's face on those faces that point z-up (to the direction of the face of suzanne) but underside you'd have the back the head and on the sides you'd have sides.

The origin of the displacement mesh is only used to define this zero. I'll try making some images later and I'll post them if I am succesfull. The main difference between sculpt deformer and this is that this is a tiled surface displacement effect using face normals for example whereas the scult deformer is a shape deforming that adjust the shape and not the surface of the objects.

Ideas-Battleship Author

* @Josephbburg * So here is a challenge. Take an sphere and deform its surface so that you have the suzanne's face uniformly tiled on it. This is an example of what this kind of modifier could do.

Shrinkwrap is hopelessly awful actually for this job as you'd need to manually create vertex groups for it to get the right area of effect. For 10 suzannes this is doable but slow and tedious. For 100s of objects it is a total no go unless you are good at making pyhthon scripts.

The cast modifier is also just totally useless because you are not looking for a solution to deform a mesh by moving another mesh. It just doesn't work at all that you'd move the suzanne heads to create those patterns on the surface unless you'd do it individually for all of them. Because if you have 10 suzanne heads you need own modifier for each of them. Lots of manual work.

So here are some pics. First is a sample of the modifier with some settings it could have: i.imgur.com/kw9TfLO.png And here is what it does to a sphere: i.imgur.com/Y1VKG62.png

The sample image is a bit misleading as it is just the sphere and the face meshes joined together. In reality the sphere surface should be displaced by the suzanne faces just like a displacement texture would do.

Vyach

The more I wait — fake displacement with selfshadowing (POM+PDO)

Vyach

switch to experimental render. There is true displacement from shader. And displacement modifier works. Also Blender supports VDM.

youtube.com/watch