Using 3D Software (i.e. Blender) to Create RM Maps

Hi,
I've been playing around with Blender for a couple of weeks and I'd love to integrate renders into an RPG Maker game. However, I am having trouble making the render fit a 48x48 RM map.

I've read with great interest this post by @Amarok https://forums.rpgmakerweb.com/inde...3d-isometric-mapping-pipeline-tutorial.88190/ that explained a Blender to RM pipeline. It answered some questions however I'm still unable to make a 45 degrees top-down scene in Blender fit in RM.

So my question is this: Is there a way of creating a map in Blender that would fit EXACTLY the 48x48 grid in RM?

Here are the steps I've taken:

1- Created an empty map in RM and took note of its size in tiles and pixels (20x11 tiles, 960x760px).
2- Created a scene in Blender using the same number of units (20x11 meters) and I set the resolution 960x760px
3- Created an orthographic camera and set rotation to x45, y0, z0 with a scale of about 20.

And this is the result I get:
2020-12-09 14_47_19-Blender_ [C__Users_tonytank_Desktop_TS DATA_rooms_ground10.blend].png


As you can see, despite the fact that I used exactly 20x11 tiles and used the same img size as RM, things do not fit at all. There's some space above and under my scene. I also noticed that the grid squares are "squished" in the orthographic view, which might explain the issue.

In short, how can I make sure that a render in Blender fits perfectly the grid and the scale of RM? Thanks!
Well, 1st of all using a 20x11 map size is more suited for a 960x540 resolution (it's what I use), not 960x768. That's probably why you're getting a space above and below.
20x11 is 960x528 though. Maybe it's because of the mismatch between pixels and meters. You could render it in a high resolution then scale it up/down to fit your game if needed.
OK, I was way off with the pixel sizes, my mistake.

20x11 is 960x528 though. Maybe it's because of the mismatch between pixels and meters. You could render it in a high resolution then scale it up/down to fit your game if needed.
Would it be a good idea to render at twice the resolution (1920x1056) and resize it to 960x528 in Photoshop?
20x11 is 960x528 though. Maybe it's because of the mismatch between pixels and meters. You could render it in a high resolution then scale it up/down to fit your game if needed.
Yep, you are correct. I just happen to use 960x540 because it doubles to 1920x1080 perfectly, leaving only a very minor bar on the bottom/top. I would recommend 960x540 over 960x528 so you don't get any weird stretching.
OK, I was way off with the pixel sizes, my mistake.


Would it be a good idea to render at twice the resolution (1920x1056) and resize it to 960x528 in Photoshop?
I guess it will work. You can experiment with one map and see the results.
The problem here is that the tiles in RM do not have a camera point or a realistic perspective at all.
I would recommend 960x540 over 960x528 so you don't get any weird stretching.
that assumes that his monitor also has 1920x1080, but not everyone has the same monitor size.
which means your game will still be distorted for other monitor sizes
@tonytank1 : If you are using Blender like this on a 45deg camera angle on x you should set your aspect x : 1.414. That way your grid will fit exactly and you will see equal squares when you render.
(1.414 = square root 2 = 45 deg.)

Spoiler: screenshot Blender
Aspect ratio.PNG

(PS. if you want a 20x11 tiles resolution in blender should at 960x528 and ortho cam scale at 20).
that assumes that his monitor also has 1920x1080, but not everyone has the same monitor size.
which means your game will still be distorted for other monitor sizes
I'm aware resolutions vary, but that's why I picked the most common resolution of 1920x1080, combined w/ having "real scale" enabled so it's always stretched to a multiple of its resolution. There aren't any resolutions that match (or are a multiple of) 960x528 whereas 960x540 at least works for 1920x1080, which I'd wager is a significant portion of the population. Besides, OP mentions using 20x11 tiles (which is what I use throughout my entire game). Given that constraint, I feel using 960x540 is a better choice than 960x528.
@tonytank1 : If you are using Blender like this on a 45deg camera angle on x you should set your aspect x : 1.414. That way your grid will fit exactly and you will see equal squares when you render.
(1.414 = square root 2 = 45 deg.)

Spoiler: screenshot Blender

(PS. if you want a 20x11 tiles resolution in blender should at 960x528 and ortho cam scale at 20).

I tried changing aspect x to 1.414 but all it did was change the camera size (it doesn't fit the scene anymore) while the grid is still rectangles.
2020-12-09 19_33_52-Blender_ [C__Users_tonytank_Desktop_TS DATA_rooms_ground10.blend].png


Am I missing something?
Also, to make sure I perfectly understand: Let's say I create a larger map (25x30 tiles for example). Do I set the resolution in Blender to 1200x1440 (25x30 * 48)?
@tonytank1 : I am experimenting with the same kind of workflow with Blender for some time now.
There is more to set and beware of when working this way but I will explain the workflow for the grid set up here for now.

Spoiler: Blender grid set up
In order to work with a 45deg angle with squares the aspect x should always be set to 1.414 to start with.


- the resolution set in Blender should indeed always be 48 x number of tiles. (fror MV and MZ)
- one 1x1m square in Blender is a 48x48 resolution.
- the orthographic cam scale size should always equal the x tile size
Example for the 20 x 11 tiles:
Blender resolution set to 960 x 528
Ortographic cam scale set to 20

Example for the 25 x 30 tiles:
Blender resolution set to 1200 x 1440
Ortographic cam scale set to 25

Best workflow is to make a grid same as your map size:
- With an even x number (20x11 for example) set a coordinate 0,0.
- With an uneven x number (25x30 for example set at 0.5,0
Set your camera x coordinate same as grid coordinate. (y coordinate should not matter as it is ortho view but always negative to place it in front of your grid
If you jump to camera view in Blender <Ins> you will see that your x size will match this way.
you will have to move your camera in z posistion to fit the grid y resolution.
(the view still has rectangles because of the 45deg cam position)
If the grid fits and you jump to render <F12> you will see a square grid the size of your grid.

The trick now is placing your 1x1 tiles(48x48 resolution) in front of the camera.
- On the x-axis they will always align the Blender 1x1 squares.
- But to get the y-axis correct you will have to move them up and down until the bottom of the tile matches your grid in the camera view. It will show up aligned correct in render

Here are 2 example snapshots from Blender.
I placed the grid in front of the camera just to show a better 'on the map view':

Spoiler: Screenshot 20x11 tiles
snapshot_render20x11.png

Spoiler: Screenshot 25x30 tiles
snapshot_render25x30.png

I hope this makes the Blender set up part more clear, feel free to ask me anything about this kind of workflow.

I've moved this thread to Useful Development Tools. Thank you.


@tonytank1 , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


You can just edit your last post to add more info if you need to.
Moved to: Useful Development Tools
Double-post notice: @tonytank1
You can just edit your last post to add more info if you need to.
Duly noted, sorry for that.

@tonytank1 : I am experimenting with the same kind of workflow with Blender for some time now.
There is more to set and beware of when working this way but I will explain the workflow for the grid set up here for now.

Spoiler: Blender grid set up
In order to work with a 45deg angle with squares the aspect x should always be set to 1.414 to start with.


- the resolution set in Blender should indeed always be 48 x number of tiles. (fror MV and MZ)
- one 1x1m square in Blender is a 48x48 resolution.
- the orthographic cam scale size should always equal the x tile size
Example for the 20 x 11 tiles:
Blender resolution set to 960 x 528
Ortographic cam scale set to 20

Example for the 25 x 30 tiles:
Blender resolution set to 1200 x 1440
Ortographic cam scale set to 25

Best workflow is to make a grid same as your map size:
- With an even x number (20x11 for example) set a coordinate 0,0.
- With an uneven x number (25x30 for example set at 0.5,0
Set your camera x coordinate same as grid coordinate. (y coordinate should not matter as it is ortho view but always negative to place it in front of your grid
If you jump to camera view in Blender <Ins> you will see that your x size will match this way.
you will have to move your camera in z posistion to fit the grid y resolution.
(the view still has rectangles because of the 45deg cam position)
If the grid fits and you jump to render <F12> you will see a square grid the size of your grid.

The trick now is placing your 1x1 tiles(48x48 resolution) in front of the camera.
- On the x-axis they will always align the Blender 1x1 squares.
- But to get the y-axis correct you will have to move them up and down until the bottom of the tile matches your grid in the camera view. It will show up aligned correct in render

Here are 2 example snapshots from Blender.
I placed the grid in front of the camera just to show a better 'on the map view':

Spoiler: Screenshot 20x11 tiles

Spoiler: Screenshot 25x30 tiles

I hope this makes the Blender set up part more clear, feel free to ask me anything about this kind of workflow.

Your instructions worked perfectly, thank you so much! The magic number is indeed 1.414. Things look a little stretched out in the camera but they look fine once rendered.

I also discovered a cool feature: You can set your RM map as the background of the camera and adjust the transparency. It makes it easier to set everything to RM scale:
Spoiler: RM Map as Blender background
2.png

As you can see, the grids match perfectly.

I then went ahead and imported a (very ugly and minimalistic) render to RMMZ and everything appears to be fitting perfectly. Also, the angles and scale look pretty good.

Spoiler: Test render in RMMZ
3.png

Thanks again for your help, I think we've got a decent workflow going here!
@tonytank1 : Good, glad I could help. Setting map backgrounds is indeed a good idea too. Good luck with your project.
@tonytank1 : Good, glad I could help. Setting map backgrounds is indeed a good idea too. Good luck with your project.
Thanks. An additional question: I noticed that imported assets or appended blender files look elongated when rendering. Do "fatten up" your assets on the X-axis by about 1.4 to make them look normal or is there another way to deal with this?
@tonytank1 : While I do think I understand what you mean, could you send me an example snapshot as it would make it more easy to explain. In general items will appear elongated when placed under an angle over the x-axis. But in general you do not want to stretch them for it in the x-axis as it will not match in the game engine tile(s) anymore (unless you would not mind ofcourse)...adjustments to make something fit are best done in the y or z-angle to make it fit in a tile.

The ratio to make something fit in such case would be a 0.7 scale (1 / 1.414).
In the example snapshot here I placed a 2x2x2 sphere in Blender but due to the 45 deg. camera angle it looks stretched in the render over the y-axis. (left spehere)..If i scale the y & z axis by 0.7 it will fit again in the 2x2 grid (right sphere).

Spoiler: Blender sphere example
Stretch example.PNG
@Dutchmountain : Sure, here are some screenshots, but I can already confirm that your fix worked perfectly:

This is what I see in my camera when I import an asset:

Spoiler
1.jpg

But this is what I see once rendered:

Spoiler
2.jpg

So, following your instructions, I scaled the Y and Z axis to 0.7, which made the asset look like this in my camera:

Spoiler
3.jpg

However, once rendered, it looked like the original:

Spoiler
4.jpg

So, once again, thanks for your help, that's exactly what I needed to know!

May I ask you: Do you also work with a top-down 45-degree angle? If so, how do you deal with the front of buildings? In the RTP, we can see the entire front of the buildings and the roof:

Spoiler
5.jpg

However, when a camera is set to 45 degrees on 3D buildings, we only see a small part of the front (as seen with the asset above).

Also, default character sprites (which have no angle) look weird next to the 45-degree buildings.

I'm thinking of two solutions right now:

- Stretch out the front of buildings while keeping the roofs as-is to simulate RPG Maker perspective.

or

- Create character sprites that are displayed at a 45-degree top-down view. Here's a quick example:

Spoiler
6.jpg

That second solution probably looks more realistic but maybe less charming and easy to navigate?

How do you deal with this issue? Thanks!
@tonytank1 : I also make the creations in Blender with 45deg. angle.
What counts is the output of the render as that is how it will appear in the RPGM engine / game.
As shown before it means you will have to manipulate your 3d asset in Blender until it looks as you want in game.

I use a grid during this process and shift the pieces in places until if fits how I want it to be. special focus are dor ways for example..move your asset around until the door opening is on a bottom line grid as that is where the door in the game engine (or game) will be. same may count for roofs, what you see in your render (grid) is what you get in game so maybe you will need to make your roof float up (z) or backwards(y) to get it in place. Better leave characters out of te render as they will only appear in game and should not be in the 45 deg. angle. (unless you aim for it)

some example shots here to see how I want it to apear in the render and the game and how it actually looks in the 3dmodel.

Spoiler: example snapshots fron Blender
example_screen02.PNG

example_screen01.PNG
Better leave characters out of te render as they will only appear in game and should will be in the 45 deg. angle. (unless you aim for it)
Of course, I placed that character in the render as an example of a sprite at a 45 angle. However, I don't get the last part of your sentence... Are you saying that the character SHOULD be at a 45 angle?

Original thread: https://forums.rpgmakerweb.com/threads/using-3d-software-i-e-blender-to-create-rm-maps.130804/