MV3D - 3D rendering for RMMV with Babylon.js

● ARCHIVED · READ-ONLY
Started by Cutievirus 1560 posts Page 19 of 78 View original ↗
  1. ...I don't think I get what you mean then...
    images to help explain?
  2. Waterguy said:
    ...I don't think I get what you mean then...
    images to help explain?
    Here is incomplete map with just alpha at .92.
    Old.png
    Here is incomplete map with changes I made above.
    New.png
  3. ah, I get it now. you want walls semi-transparent but not the parallax on the ground under it.
    I remember the reason pits were not showing properly some time ago was because the ground it was put over was covering it, since the ground had height 0 and the pit had depth and thus negative height and was covered. maybe if you put a ground under the wall?
    that *may* mean you need to make a tile B-E turn into the wall like the ceiling/tree tops on the demo's Inside D tiles though, in case it doesn't work with actual wall tiles...
  4. Waterguy said:
    ah, I get it now. you want walls semi-transparent but not the parallax on the ground under it.
    I remember the reason pits were not showing properly some time ago was because the ground it was put over was covering it, since the ground had height 0 and the pit had depth and thus negative height and was covered. maybe if you put a ground under the wall?
    that *may* mean you need to make a tile B-E turn into the wall like the ceiling/tree tops on the demo's Inside D tiles though, in case it doesn't work with actual wall tiles...

    Yeah that's how I solved it. Without the extra tiles it looks like this.
    NoTile.png
    Using this character for side walls Wall.png
    and single tile on tileset sheet to fix it.
  5. Waterguy said:
    ...but now I am curious on what would happen if I turn it off...
    The game would definitely take up more resources and probably lag. Mipmaps are used for performance optimization.
  6. I'm thankful for all the help, but I have some problems setting up my water tiles (among other things, but let's focus on the water).

    So here's something I copy-pasted from the demo project:

    A1,4,0:top(A1,24,72,48,48),side(A1,5,0),inside(A1,31,54,31,14),depth(0.3),float(0.1)

    I understand that "A1, 4, 0" refers to the tile that's positioned at x4, y0 on the A1 tilesheet. But after that it gets a bit confusing. The help file mentions using 5 parameters which in this case would be:

    top(A1,24,72,48,48)

    But I'm not sure exactly what these numbers refers to. "A1" is probably refering to the same tilesheet again. Okay. But what EXACTLY does the "24", "72" and "48" mean?

    I understand that water tiles that are lowered half a tile into the ground is a more complex shape than say... what you'd do for walls. But it would be super nice if I could make this work somehow.

    [EDIT; This is the only explanation I've found in the documentation: "With 5 parameters, you specify a region with pixel coordinates on the specified tileset image. For example, top(A1,24,72,48,48).". It's not enough to make me understand though. Pixel coordinates? ]
  7. @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.
    1577889787790.png

    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:
    1577889962491.png

    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.
  8. Hm, i see.

    It’s a bit different but I think I understand how it works. Have to get back home and try it to k of for sure though

    Will it automatically know that it’s an animated water/waterfall?

    Also, is there a way to tag a tile so it can be placed on a wall? Like with you’d want to do with windows, etc
  9. Parallax Panda said:
    Will it automatically know that it’s an animated water/waterfall?
    Only if they already were. If not, you'll have to set it as them with the proper tag.
  10. @Waterguy
    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?
  11. Parallax Panda said:
    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.
  12. 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

    Waterguy said:
    @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.
  13. @palatkorn
    On the second row you have 1,0 and 7,0 repeated. They should be 1,1 and 7,1
  14. oh I understand. I will make the correct table and revise it so others can come and see. thank you


    Dread_Nyanak said:
    @palatkorn
    On the second row you have 1,0 and 7,0 repeated. They should be 1,1 and 7,1
  15. @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.
  16. 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
  17. @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)?
  18. @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.
  19. @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.
  20. @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.