0
$\begingroup$

I'm trying to displace a plane with a black and white texture for a Doom level map. What I am looking to get is a 90 degrees displacement all around, but the problem is the corners come out distorted even though the texture shows only straight angles. I checked the texture in GIMP and it shows zero grey pixels so that can't be it. I also increased the subdivision to 6 but it doesnt solve the problem either. Any advice on how to get the displacement to be only at 90 degrees?

Texture:

enter image description here

Blender:

enter image description here

Some of the texture settings I am using:

enter image description here

Another close up picture of the issue:

enter image description here

The less plane subdivisions the wider the distortion gets:

enter image description here

Edit: I tried it in Unity terrain and it seems I am getting the same issue:

As @Lukasz-40sth said, I did the contour manually and extruded the edges and it works although it is time consuming. I wonder if a script could detect the texture edges and create the 'physical' edges.

enter image description here

$\endgroup$

2 Answers 2

2
$\begingroup$

As pointed out by @Lucasz-40sth Unless the pixels coincide perfectly with vertices or subdivisions on the mesh you will see some form of interpolation. So displacement might not the best way to do what you want.

For such a simple shape is easier to model it.

But a much lazier, and precise, way to do it is to trace your map as a path in a vector drawing program (like inkscape or illustrator), save as an SVG file, then import that into blender.

enter image description here and give it some extrusion.

enter image description here

For a closed shape make it a 2D curve

enter image description here

Then you can convert the curves to a mesh.

enter image description here

$\endgroup$
3
$\begingroup$

Displacement needs many subdivisions to work. Still, the results are not gonna be perfect as the map may not overlap with subdiv "grid". Use this map as a reference image instead and extrude the walls.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .