2
$\begingroup$

I'm trying to use a displacement map of shingles to apply evenly sized shingles on a cone shape (roof for a witch hut). No matter what I do I can't get the shingles to stay a consistent size over the height of the cone.

The cylinder shows the approximate size of the shingles that I am looking for, the cone is the shape I'm going for.

The final cone is my attempt at manually changing the UV map, but even if I get the scale correct, the texture "spirals" around the cone shape.

Displacement map example

$\endgroup$
9
  • 2
    $\begingroup$ Cones are made largely of tris which don't play nice with either subdivisions or displacements. Try using a cylinder instead, and scaling down the top face really small so it looks like a cone, but the mesh is still quad-based. $\endgroup$ – Christopher Bennett Feb 3 at 4:13
  • $\begingroup$ This is what I did in the third shape and the distortion remains. $\endgroup$ – Kyle Feb 3 at 4:17
  • $\begingroup$ Ahhh, I see. Not sure then. All I can recommend is the normal things - Check for dupes, apply scale, make sure normals are all facing the right directions, etc... $\endgroup$ – Christopher Bennett Feb 3 at 4:36
  • $\begingroup$ @vklidu here is the packed blend file, hope i did this correctly... blend-exchange.giantcowfilms.com/b/2OdQAjEV $\endgroup$ – Kyle Feb 3 at 18:21
  • $\begingroup$ You didnt packed your texture, so I used one seamless from net. I don't have an issue with provided file imgur.com/BRdfOrE BTW next time please place given code into your question via "edit" link. $\endgroup$ – vklidu Feb 3 at 18:51
7
$\begingroup$

Theory

I don't think you have a chance to get there with this single texture and your mesh topology.

The only reasonable solution that came to my mind is to use some radial texture, like one based on fibonacci pattern.

enter image description here Unwrapped from top view.

Pattern

To create such texture use this Brecht's script
(copy&paste into blender's Script Editor and Run Alt+P)

import bpy
import bmesh
import math

n = 100 # number of points
c = 0.1 # scale factor

mesh = bpy.data.meshes.new(name="Spiral")
bm = bmesh.new()

for i in range(0, n):
    theta = i * math.radians(137.5)
    r = c * math.sqrt(i)
    bm.verts.new((math.cos(theta) * r, math.sin(theta) * r, 0.0))

bm.to_mesh(mesh)
mesh.update()

from bpy_extras import object_utils
object_utils.object_data_add(bpy.context, mesh)

It creates vertices pattern. At row 5 of the script you can change number of vertices.

enter image description here

Model

Add Plane and model one Shingle, Object has to be oriented in positive Y direction so bottom part is on top. Rotate it on X axis a bit upward with shingles end so when they will repeated will be on top of other. For this quick Shingle I added Solidify and Bevel modifier.

enter image description here

Select Shingle and than pattern object and parent Ctrl+P them. Go to pattern's Object Properties > Instances > Vertices. Enable Align to Vertex Normal to get desired rotation.

enter image description here enter image description here

Texture

To be able bake Normal map of this model you have to search for Make Instances Real, Join Ctrl+J them. Add another Plane above, add a new material and add Image node, click new, and keep this node selected (active). Go to Render Properties, choose Cycles engine, at bottom go to Bake > Bake Type > Normal > enable Selected to Active. Select joined Shingles than Plane and press BAKE. Save image as OpenEXR type of file.

enter image description here

Note: to create Bump Map - position camera above object and under Render Passes enable Depth pass or Mist pass. After rendering go to Compositor and tweak output of one of this pass. Or you can create a simple B&W material with Blend texture on Z axis for the same result. You can find a lot of answers here I guess.

Edit: I just noticed ... baked Ambient Oclussion worked much better in this case. Result is similar to Depth. And you could already notice, unwrap from top view applies texture stretched vertically, so its good to compensate this by creating shingle a bit wider horizontal, so after texture is applied it looks in proportions.

enter image description here enter image description here

Render doesn't use Displacement modifier, but Adaptive Subdivision (aka Microdisplacement) that needs a just a few faces for cone and beautiful details :)

$\endgroup$
5
  • 1
    $\begingroup$ That is a nice application of this pattern ! One might even be able to reproduce it procedurally :) $\endgroup$ – Gorgious Feb 4 at 18:27
  • $\begingroup$ Such a beautiful solution.. $\endgroup$ – Robin Betts Feb 4 at 20:53
  • $\begingroup$ Happen to have a tiling Fibonacci sequenced texture of roof shingles? $\endgroup$ – Kyle Feb 5 at 0:29
  • $\begingroup$ Oh my gosh, thanks! It was a half joke, I didn't expect anything, but thank you so much! $\endgroup$ – Kyle Feb 5 at 19:24
  • 1
    $\begingroup$ I'm not sure if you are notified about updates, so ... AO bake works much better here :) $\endgroup$ – vklidu Feb 5 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.