MV3D - 3D rendering for RMMV with Babylon.js

Okay, so anything placed in the water/waterfall spots on the A1 tilesheet will be recognized automatically

What about plaching objects ”on” the wall (like a window)?

Also I readsomething earlierin this thread of how you’d need to place the top part of a B/C/D/E tile on top of the part that goes underneath but it sidn’t work well for me so I guess I must’ve made a mistake with the terrain tags?
For now, they have to be put as events, like the doors in the demo project. I know that is not the best solution, but it makes sense as walls can go from all four directions of a tile and you could want different things on either side.

For tiles to have a height, they for now can only be flat on the ground as default, raised blocks like terrain, or act like fences, as a cross or as xcross, which is a cross but turned 45 degrees, unless you use an event. What each tile will be is set through a terrain tag, that option when setting tilesets that give tiles a number, by default the plugin comes with terrain tag 1 being xcross and 2 being fence but they are set on the plugin parameters and can be changed or added to at will. It is hard to explain through words, so check them out yourself.
The thing you read is about someone that wanted a table to be more table-like than what could be done with just those ways, and the solution suggested was to separate the legs of the table as a cross or xcross tile and put a flat tile over it for the table'stop.
If wrong, however, must apologize.

I understand that it counts like this, right?

I may be confused. Yes, it's very confusing for some examples.

RScMAg.png


@Parallax Panda
when you use 3 parameters, you set the tile as it is in the editor. For example, A1,4,0 is the fifth tile on the first row on the editor for the file set as A1 - because it starts from 0, the first tile on the first row is 0,0, the second on first row is 0,1 and so on.
View attachment 130084

But when you use five parameters, you are not dealing with tile positions anymore, you are dealing with the pixels of the image. You open the image on photoshop, gimp or something and check the position you want to take it from. In your example, the tile would from then on take the image from the 25th pixel horizontal, 73rd vertical - because again, it starts from 0, but image editors already count the first each as 0 so just use the number they give you, and the other two parameters are the width and height of the image to get. In your example, they are a 48 by 48 pixels square with the top left position being the pixel 24,72.
The area not in red here:
View attachment 130085

As you can see, it may seem complicated now, but it is easier after you get the gist of it.
Kinda like using event variables.
@palatkorn
On the second row you have 1,0 and 7,0 repeated. They should be 1,1 and 7,1
oh I understand. I will make the correct table and revise it so others can come and see. thank you


@palatkorn
On the second row you have 1,0 and 7,0 repeated. They should be 1,1 and 7,1
@palatkorn but besides that that @Dread_Nyanak pointed out, you got it right. first number is column starting from 0, second number is row starting from 0.
I take the time to understand the values. Yes, I think that a good plug-in might take time to understand and also. I think it's worth it for others to understand more easily.
RSEpkI.png
@palatkorn
That second image is very helpful. I've already understood how those values work but I think it'll be useful for others as well.

I took a look at the door events in the demo and it had this notetag attached to it:

<mv3d:shape(fence),z(0),y(-0.51),scale(0.9,1.3),rot(180)>

Can someone break it down for me? Why is it set as a fence for example? What does "rot(180)" mean? Is it the rotation of the door (north, west, south, east? And if so, which is which? I guess the "Scale" is resizing the original tile? Not sure why that was needed but maybe there's some reason behind it. And what's the "z" value representing here? It's usually used for depth though what is it in this plugin? Height?

The values in that tag is also very specific. Stuff like "-0.51" and "0.9, 1.3" etc.Is that arbitrary or is it the "optimal" settings for placing a door (as far as the plugin maker is concerned)?
@Parallax Panda
Fence is just the name I've given to the shape. Come to think of it wall would probably be a better name for the shape. I might add that as an alias.

shape(flat) will lie flat on the ground.
shape(sprite) will rotate both horizontally and vertically to face the camera.
shape(tree) will stand up vertically but rotate horizontally with camera.
shape(fence) when used with events will stand up vertically and will not rotate with camera.
shape(cross) will use a cross mesh.

rot() sets the rotation of the event, but doesn't work with sprite or tree shapes since they rotate with the camera.
0 is south, 90 is east, 180 is north, and 270 is west.
You can also set the rotation to 45 or 20 or anything like that.

x() and y() are the x and y offset for the event's model. Depending on if you're placing the event outside or inside the wall, you'll either want to offset it by x(0.49) or x(0.51) to move the model just outside the edge of the wall.

z() and height() are similar, but height() will position the event a certain height above the ground. z() sets the absolute z position, ignoring ground level.

scale() isn't really needed here. It just adjusts the size.
@Dread_Nyanak
That's a very helpful list of short commands.

I've been studying the treasure chest event from the demo as well. I see it's set to "shape(sprite)" which makes it always face the player but while it kinda works, to me, it makes the treasure chest seem alive and I'd say it's not that unlikely the player might think that all treasure chests are mimics, heh.

But I understand that there might not be many better ways to make chests at the moment. Or is there some alternative solution that someone has figured out?

As far as I understand it's not possible to have an object with 4 unique sides to it. And this goes for bookshelves and other square objects as well.
@Parallax Panda
The tree shape also works well for chests. It's a matter of preference.
The RTP treasure chests only have one facing direction, Sheets starting with ! have dirfix(true) by default, but you can turn it off with dirfix(false). You'd have to use custom graphics though, and probably have the frames set to different character indexes instead of directions.
Oh, so it is possible to give a tile or event different images for each side, as long as you have the graphics? Which shape and tags would be used for this?
Yes it is the direction

You should choose the option
shape (fence)
It will not rotate


6Ki9


@Dread_Nyanak
That's a very helpful list of short commands.

I've been studying the treasure chest event from the demo as well. I see it's set to "shape(sprite)" which makes it always face the player but while it kinda works, to me, it makes the treasure chest seem alive and I'd say it's not that unlikely the player might think that all treasure chests are mimics, heh.

But I understand that there might not be many better ways to make chests at the moment. Or is there some alternative solution that someone has figured out?

As far as I understand it's not possible to have an object with 4 unique sides to it. And this goes for bookshelves and other square objects as well.
Okay, so if I use 4 events like that, I can make one treasure chest with unique sides. Right? That’s pretty smart!
It does force some distance between chests and other such “objects” with unquie sides, as events can’t overlap in the map editor, but I guess it’s good enough for a “hack”.

Although, @Dread_Nyanak , if we could get a shape where you could specifically set the texture of each side in a future update that’s would be much easier to work with. Not sure how hard that would be though.

In either case, syncing an animation for “opening” a chest (or something similar) for each side, could be slightly problematic. Possible, I think, but tedious.
Okay, so if I use 4 events like that, I can make one treasure chest with unique sides. Right? That’s pretty smart!
It does force some distance between chests and other such “objects” with unquie sides, as events can’t overlap in the map editor, but I guess it’s good enough for a “hack”.

Although, @Dread_Nyanak , if we could get a shape where you could specifically set the texture of each side in a future update that’s would be much easier to work with. Not sure how hard that would be though.

In either case, syncing an animation for “opening” a chest (or something similar) for each side, could be slightly problematic. Possible, I think, but tedious.
No, no. that was to put the event on the wall.
You... do not need to do anything to make a 4-sided event change side seen when you change the camera. As you can see in the plugin settings, the player themselves are set as "sprite" (but you can change that).
The thing with the chest is that the default mv character set for chests only has one side, the others are it opening, as you can see, the event has "direction fix" turned on.
@Parallax Panda
You can sort of fake complex shapes right now by combining a bunch of events. I plan on making it easier in the future by adding a way to define custom meshes for events. Right now I'm focused on working on the movement stuff though.
This is good stuff!
Thank you for developing this.
By the way, for some reason, all my actors, and other events looks like this:
3Dsprite.png
@WesdrasLink
Others have had this problem too, but I don't know what causes it. It seems to happen on some devices and not others. If you can test it on any other computers does it happen on those too? Can you tell me anything about your system? What operating system, graphics card etc?


Update 0.4:
events can be vertically rotated now.
Fixed pit visibility.
control slope direction with configuration function or shadow pen.
wall shape is alias for fence shape
Characters now have a z property. $gamePlayer.z
Overhauled movement and collision. Now it's possible to create platforms that you can walk both over and under.
Events can be walked on.

Movement rules :
X means you can't walk on the tile
O means you can walk on the tile
☆ means you can walk through the tile

Terrain tag 1 now sets fringe(0) by default .


Previously you could make cross tiles that you could walk through with O passage. Now they need to be star passage.
I also added a pass() function for tiles which can change the tile's passability. This can be used to get star passage on A tiles, or to have different passage rules depending on if 3D is enabled.
Examples: pass(o), pass(x), pass(*)
Yes, I did it again. For something such as dead people, I think it always faces me. The ark is the same, so I create a new image. And make it look different from The image I created is more than Because no matter what you do The hosts that come out of the single composition, it probably doesn't look any better than this.



@Dread_Nyanak
That's a very helpful list of short commands.

I've been studying the treasure chest event from the demo as well. I see it's set to "shape(sprite)" which makes it always face the player but while it kinda works, to me, it makes the treasure chest seem alive and I'd say it's not that unlikely the player might think that all treasure chests are mimics, heh.

But I understand that there might not be many better ways to make chests at the moment. Or is there some alternative solution that someone has figured out?

As far as I understand it's not possible to have an object with 4 unique sides to it. And this goes for bookshelves and other square objects as well.
@WesdrasLink
Others have had this problem too, but I don't know what causes it. It seems to happen on some devices and not others. If you can test it on any other computers does it happen on those too? Can you tell me anything about your system? What operating system, graphics card etc?


Update 0.4:
events can be vertically rotated now.
Fixed pit visibility.
control slope direction with configuration function or shadow pen.
wall shape is alias for fence shape
Characters now have a z property. $gamePlayer.z
Overhauled movement and collision. Now it's possible to create platforms that you can walk both over and under.
Events can be walked on.

Movement rules :
X means you can't walk on the tile
O means you can walk on the tile
☆ means you can walk through the tile

Terrain tag 1 now sets fringe(0) by default .


Previously you could make cross tiles that you could walk through with O passage. Now they need to be star passage.
I also added a pass() function for tiles which can change the tile's passability. This can be used to get star passage on A tiles, or to have different passage rules depending on if 3D is enabled.
Examples: pass(o), pass(x), pass(*)
Error.png

Getting this error while walking randomly.
Also my walls are getting flattened by the star tiles I used as floors for alpha now.
It doesn't seem to be HitboxResize, it seems to happen whenever I walk in the direction of an event even blank or unpassable.
Disabled all yanfly and still happened, disabled half of others and still happened, disabled other half of others and still happened. Doesn't happen in demo though.
In playtest if I hold control to walk through it I get no error even though I should be able to anyway.
@WesdrasLink
Others have had this problem too, but I don't know what causes it. It seems to happen on some devices and not others. If you can test it on any other computers does it happen on those too? Can you tell me anything about your system? What operating system, graphics card etc?

I see, i can ask some friends to run in they computers.
I have a AMD FX 6350 - Six COre Processor
GPu is a ATI Radeon 3000
Windows 10

Original thread: https://forums.rpgmakerweb.com/threads/mv3d-3d-rendering-for-rmmv-with-babylon-js.114971/