Creating terrain tiles without gap

Hi, I am trying to make terrain tiles(isometric). The reference I use is https://www.youtube.com/watch?v=mIS0CPy3f8g.

But i have problem on render tile. The tiles used look like this in the Tiled:

tiled_FfZk2BEVUs

How can i solve this problem?

The python script I use:

import bpy

objs = []

for obj in bpy.data.objects:
    if obj.name.startswith("Landscape"):
        obj.hide_render = False
        objs.append(obj)

for curObj in objs:
    prevLoc = curObj.location.copy()
    curObj.hide_render = False
    
    for otherObj in objs:
        if curObj != otherObj:
            otherObj.hide_render = True
            
    curObj.location = (0,0,0)
    bpy.data.scenes['Scene'].render.filepath = "c:\\temp\\Blender\\" + curObj.name + ".png"
    bpy.ops.render.render(write_still=True)
    
    curObj.hide_render = True
    curObj.location = prevLoc

Hi,
At first view, I will say it’s a problem of camera adjustment : right and left pieces are cut and edges aren’t align. You have to adjust very precisely your tile in the camera view (shortcut 0 in Blender).

In the tutorial you are refering to, as you can see the camera is perfectly aligned to the border of the object, centered on (0., 0., 0.).


You have to do so.
The script is just a way of doing the automation for isolating object, putting it at (0., 0., 0.), hiding others, and rendering.
But even without using the script, you should try to put one of your tile at (0.,0.,0.) and render it. If it’s not fine, the script won’t do better by itself :slight_smile:

See you :slight_smile: ++
Tricotou


By the way, your line obj.hide_render = False in the first loop is useless, it’s already done in the other loop.

Hello, again. Thanks for your answers. I solved problem. I realized, I have to set Objects’s origin point z-axis value ‘0’. And I tried manually this steps and it works:

  • Select object, Shift + S > Cursor to Selected.
  • Click N button and input the View tab.
  • In 3D Cursor section, set location z to ‘0’
  • And Set Origin > Origin to Cursor

After that, i wrote this script for quick operation. It works Blender 2.8:

import bpy

bpy.context.area.type = 'VIEW_3D'

for obj in bpy.data.objects:
    if obj.name.startswith("Landscape"):
        obj.select_set(state=True)
        bpy.context.view_layer.objects.active = obj
        bpy.ops.view3d.snap_cursor_to_selected()
        bpy.context.scene.cursor.location.z = 0
        bpy.ops.object.origin_set(type='ORIGIN_CURSOR', center='BOUNDS')
        obj.select_set(state=False)
                
bpy.context.area.type = 'TEXT_EDITOR'

Finally result:
tiled_OrpKiKjlT5