I am not very literate in python as of yet. However, I have an idea for a better displacement method. If anyone would like to work on this, with or without me, I would be happy to see what can come of this.
The idea came to me after watching a video tutorial on how normal map data is applied to 2D surfaces. So, I started thinking of how the same principal could be applied to displacements.
We already have access to baking displacement maps from modeled geometry. This data is all in grey scale values that give us the baked shapes and relative height values. This should give us enough data to apply to a surface directly, correct?
Well, unfortunately, the answer is no.
We have to UV unwrap it and subdivide it. I am not complaining about the UV unwrapping because that is standard to apply any data map to a surface, but what I do have issues with is the subdivisions that are required to even approximate the same quality of the original geometry. That and there are a lot of limitations on what shapes and angles can be applied in the current displacement method.
I have taken some time to think about what data would be needed in applying this new method and what tools we have available that would help in making this possible.
If we start with our 2D surface, UV unwrap it, and apply our chosen displacement map in the UV editor, that is all a good start, but to apply the displaced geometry to our surface ‘WITHOUT’ subdivisions, yes you read that right!
Now, If we apply a bounding box around our surface to use as a displacement volume control and add mesh vertices data to the displacement map from our original mesh geometry, we can duplicate our original mesh data exactly.
I would suggest using color values for vertices data in the displacement map with blue->white, green->grey, and
red->black correspondences. Adding Ceiling, Floor, and Basement values within the bounding box, and the reason for this is because 50% grey in the displacement map is the normal displacement base value, while white = positive displacement and black = negative displacement. In this we can then place our surface half way between the top and bottom of the bounding box as a starting point equal to the 50% grey displacement base value.
The Ceiling control would allow to cap the top level of the displacement while the Basement control would fill the negative displacement to a desired level, and the floor control would allow for two things:
The level of the floor would allow for changing the negative to positive displacement ratio.
The thickness of the floor would allow for changing how much of the short or shallow displacement will be applied.
Finally, limiting the scaling of the bounding box to the ‘Normal’ axis of the surface would allow for making the displacement more pronounced or subdued.
Woohh! That is a lot to type… Yet, I am hoping that someone out there in the blender community is just as concerned about this is and will be just as excited as I am to get this implemented, and hopefully they know a lot more about scripting than I do to get this add-on started.
I would love to be involved in this project, and while I am trying to learn, it will take me quite a bit to get up to speed to be of much help in the heavy lifting on this. So, for now the best I can do is to get this out there and let someone else run with it. That is if they are interested.
Thank you all for listening to me rant and I look forward to comments.