[Mod] Angled Stairs [1.2] [angledstairs]

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

[Mod] Angled Stairs [1.2] [angledstairs]

by TumeniNodes » Wed Jun 01, 2016 01:12

License = DWYWPL
Depends = Default

Adds a new and unique style of stairs to Minetest.
Useful for angled elevations, as well as to build spiral-like-ish staircases!
They can also be manipulated with the screwdriver, so they add some other options for building.

My thanks to everyone who took the time to help and advise (as well as time spent working on portions of this mod)
Napiophelios, for all the help adding support for default textures.
sofar, for putting time into helping with models.
pithy, for putting time into helping with models (models provided by pithy).
Nathan S, for offering help with Lua.
azekill_DIABLO, for adding some advice regarding performance.

Also, if anyone wishes to add crafting recipes for them, that would be awesome. I don't use them, I just build stuff : )

Image

Image
sawtooth look has been fixed since this pic, just showing spiral-ish-like ability :D

Image


Source https://github.com/TumeniNodes/angledstairs
Download https://github.com/TumeniNodes/angledstairs/archive/master.zip
Install Instructions http://wiki.minetest.net/Installing_Mods

Updates:

02/03/2017: Updated with _block nodes from 0.04.15 / Updated version to [1.1]

06/10/2017: Update for 0.4.16, added mod.conf / Update version to [1.2]
Attachments
angled_stairs_inventory.png
(207.51 KiB) Not downloaded yet
angled_stairs_final.png
(326.8 KiB) Not downloaded yet
Angled Stairs Preview.png
(762.69 KiB) Not downloaded yet
Last edited by TumeniNodes on Sat Jun 10, 2017 19:30, edited 10 times in total.
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
ErrorNull
Member
 
Posts: 199
Joined: Thu Mar 03, 2016 00:43
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Wed Jun 01, 2016 16:17

Thank you folks : )

There are two shapes ? I they could be easily added to Calinou's moreblocks.

Hmmm, I'll look into this. Thank you
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Wed Jun 01, 2016 21:35

with help from Napiophelios, I finally added support for default textures.
https://forum.minetest.net/viewtopic.php?f=47&t=14804

Image

So, as soon as I make some little tweaks, the new code/changes will be uploaded to github soon. As long as I don;t mess it all up :P
Please hold....
Attachments
angled stairs inv.png
(160.13 KiB) Not downloaded yet
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Thu Jun 02, 2016 04:36

Updated init.lua now includes support for default textures.

Thank you Napiophelios for the help, it is greatly appreciated.

Thank you rubenwardy (again) for the nodebox editor https://forum.minetest.net/viewtopic.php?f=14&t=2840&hilit=nodebox+editor

I "may" make some other tweaks at a later date but for now..., it is what it is : )
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Thu Jun 02, 2016 16:20

Updated / edited init.lua to provide 2 angles of each node.
Now there are left & right of both angled stair, and angled slab.
This fixes an issue with texture alignment with woods and stone bricks.
To be completely "perfect" would require 4 variants of each node and IMO is just far too much. Using 2 variants each resolves this texture issue enough to pass.
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Thu Jun 02, 2016 17:18

azekill_DIABLO wrote:cool


Thanks
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

sofar
Developer
 
Posts: 1633
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Angled Stairs[angledstairs]

by sofar » Sun Jun 05, 2016 04:44

TumeniNodes wrote:Useful for angled elevations, as well as to build spiral-like-ish staircases!

Image


You should really make mesh nodes out of these nodes: Right now these have 16+ nodeboxes (which is 192 triangles!!!) per node, while it can be done in a mesh node in 8-14(!) triangles.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod]Angled Stairs[angledstairs]

by azekill_DIABLO » Sun Jun 05, 2016 10:07

i prefer nodebox! look's more.... polished!
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Sun Jun 05, 2016 15:50

sofar wrote:
TumeniNodes wrote:Useful for angled elevations, as well as to build spiral-like-ish staircases!

Image


You should really make mesh nodes out of these nodes: Right now these have 16+ nodeboxes (which is 192 triangles!!!) per node, while it can be done in a mesh node in 8-14(!) triangles.


I plan on it. I am not extremely skilled with Blender, I have used it only here an there..., and that was mostly back in 2008/2009 when I made a 3d text for Granular Linux with some cool blended graphics on it.
I attempted it like 2 days ago but do not remember how to make all into 1 group, as well as the meshes had no texture, and I do not know how to get the coords from Blender.
my wish, is to group them, but not have the entire node outline when the object is pointed at, I'd like the outline to follow the shape of the mesh
This is part of the reason I am keeping it in "WIP". The other reason is I am thinkng about adding angled slopes as well
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Sun Jun 05, 2016 15:54

azekill_DIABLO wrote:i prefer nodebox! look's more.... polished!


The issue is that it shows a very fractured outline, as well as it sucks up resources to render : / (makes the pc work harder) It may not be very noticeable but, if there are enough similar objects within field of view, then it will be a noticeable diff
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

sofar
Developer
 
Posts: 1633
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Angled Stairs[angledstairs]

by sofar » Mon Jun 06, 2016 00:54

Optimized high stair blender model and obj file, feel free to use this in your mod with proper attribution:

License: CC-BY-SA-4.0 - Auke Kok <sofar@foo-projects.org>

I can do the low model as well if you want.
Attachments
angled_stair_high.zip
optimized blender model for angled stair
(77.85 KiB) Downloaded 31 times
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Mon Jun 06, 2016 02:44

sofar wrote:Optimized high stair blender model and obj file, feel free to use this in your mod with proper attribution:

License: CC-BY-SA-4.0 - Auke Kok <sofar@foo-projects.org>

I can do the low model as well if you want.


Very awesome of you to take the time to do this sofar, thank you very much.
I do, however have a few of issues with the object though (please do not think me unappreciative, because I am extremely appreciative)
The first issue is, I produced 2 separate nodes for each object, being (angled_stair_right, angled_stair_left then angled_slab_right, and angled_slab_left) to slightly fix a texture alignment problem.
The second issue (may be something I am doing wrong code-wise) is that I can only climb the stairs from one angle (to the side). I still have the same node_box coords in place, and I think they are supposed to be diff when using a mesh?
The third issue is, in inventory, the top of the bottom step is transparent

Other than those, the stair does look 150% better..., and I would love to use if I can resolve those issues.
I am still a complete novice with these things, but trying to learn as best I can.
I would also very much appreciate any sort of "how to" steps to be able to, try to learn how to do this for myself, as I always feel bad pestering others. But, at the same time YES! I would love if you could do the 4 meshes :P cuz they look great. And I smuck with Blender, and hopefully I can return the favor if you ever need something graphics related (aside from Blender haha)
I really hope none of this seems offensive, because I am beyond grateful and it does look awesome as a mesh. As I stated, the issues I am running into are most likely on my end
Here is the way I have it coded:

Code: Select all
function angledstairs.register_angled_stair(subname, recipeitem, groups, images, description, sounds)
   groups.angledstair = 1
minetest.register_node(":angledstairs:angled_stair_right" .. subname, {
   description = description,
   drawtype = "mesh",
   mesh = "angled_stair_high.obj",
   tiles = images,
   paramtype = "light",
   paramtype2 = "facedir",
   is_ground_content = false,
   groups = groups,
   sounds = sounds,
   node_box = {
      type = "fixed",
      fixed = {
         {-0.5, -0.5, 0, 0.0625, 0.5, 0.5},
         {0.0625, -0.5, 0.0625, 0.125, 0.5, 0.5},
         {0.125, -0.5, 0.125, 0.1875, 0.5, 0.5},
         {0.1875, -0.5, 0.1875, 0.25, 0.5, 0.5},
         {0.25, -0.5, 0.25, 0.3125, 0.5, 0.5},
         {0.3125, -0.5, 0.3125, 0.375, 0.5, 0.5},
         {0.375, -0.5, 0.375, 0.4375, 0.5, 0.5},
         {0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5},
         {-0.5, -0.5, -0.5, -0.4375, 0.5, -0.4375},
         {-0.5, -0.5, -0.4375, -0.375, 0.5, -0.375},
         {-0.5, -0.5, -0.375, -0.3125, 0.5, -0.3125},
         {-0.5, -0.5, -0.3125, -0.25, 0.5, -0.25},
         {-0.5, -0.5, -0.25, -0.1875, 0.5, -0.1875},
         {-0.5, -0.5, -0.1875, -0.125, 0.5, -0.125},
         {-0.5, -0.5, -0.125, -0.0625, 0.5, -0.0625},
         {-0.5, -0.5, -0.0625, 0, 0.5, 0},
         {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
      }
   }
})
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: [Mod]Angled Stairs[angledstairs]

by pithy » Tue Jun 07, 2016 02:03

Use collision_box instead of node_box when use meshes.
Use selection_box to define the selection box.
All of the ?_box have the same format.
sofar: I thought only apple could copyright basic shapes.
 

sofar
Developer
 
Posts: 1633
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Angled Stairs[angledstairs]

by sofar » Tue Jun 07, 2016 14:15

pithy wrote:sofar: I thought only apple could copyright basic shapes.


I put fairly permissive licenses on most of my work, so it shouldn't pose any problem for anyone. I'm not a fan of WTFPL or Public Domain, as it potentially can do the exact opposite of what was intended by the licenser.

I'm also receptive to requests for relicensing, but the bottom line is that I think that everyone should get credit for what they do, no matter how small the change is.
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: [Mod]Angled Stairs[angledstairs]

by pithy » Tue Jun 07, 2016 15:36

I find it easier to understand lua code than legal code.
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Tue Jun 07, 2016 15:42

pithy wrote:Use collision_box instead of node_box when use meshes.
Use selection_box to define the selection box.
All of the ?_box have the same format..


(sigh) Ok..., now I'm confused again haha.
I walked away from this for a bit because I was getting frustrated.
So now, only about 1/2 hr into attempting to set it up right..., I'm getting frustrated again, at my stupidity.

Do I leave the nodebox table the same? I tried using collision box and selection box in every which way, but no changes. I have no idea where in the script I am supposed to insert these lines?
This is the way I have it set right now..., and I am unable to climb the stair in any other way than the side where the wood texture runs side to side

Code: Select all
minetest.register_node(":angledstairs:angled_stair_right" .. subname, {
   description = description,
   drawtype = "mesh",
   mesh = "angled_stair_high.obj",
   tiles = images,
   paramtype = "light",
   paramtype2 = "facedir",
   is_ground_content = false,
   groups = groups,
   sounds = sounds,
   node_box = {
      type = "fixed",
      fixed = {
         {-0.5, -0.5, 0, 0.0625, 0.5, 0.5},
         {0.0625, -0.5, 0.0625, 0.125, 0.5, 0.5},
         {0.125, -0.5, 0.125, 0.1875, 0.5, 0.5},
         {0.1875, -0.5, 0.1875, 0.25, 0.5, 0.5},
         {0.25, -0.5, 0.25, 0.3125, 0.5, 0.5},
         {0.3125, -0.5, 0.3125, 0.375, 0.5, 0.5},
         {0.375, -0.5, 0.375, 0.4375, 0.5, 0.5},
         {0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5},
         {-0.5, -0.5, -0.5, -0.4375, 0.5, -0.4375},
         {-0.5, -0.5, -0.4375, -0.375, 0.5, -0.375},
         {-0.5, -0.5, -0.375, -0.3125, 0.5, -0.3125},
         {-0.5, -0.5, -0.3125, -0.25, 0.5, -0.25},
         {-0.5, -0.5, -0.25, -0.1875, 0.5, -0.1875},
         {-0.5, -0.5, -0.1875, -0.125, 0.5, -0.125},
         {-0.5, -0.5, -0.125, -0.0625, 0.5, -0.0625},
         {-0.5, -0.5, -0.0625, 0, 0.5, 0},
         {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
      }
   }
})


I tried collison_box =
type = "selection_box",
fixed = {
???? Oh, wait.... maybe selectionbox = {
?????
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: [Mod]Angled Stairs[angledstairs]

by pithy » Tue Jun 07, 2016 16:21

use it like this

Code: Select all
collision_box = {
      type = "fixed",
      fixed = {
         {-0.5, -0.5, 0, 0.0625, 0.5, 0.5},
         {0.0625, -0.5, 0.0625, 0.125, 0.5, 0.5},
         {0.125, -0.5, 0.125, 0.1875, 0.5, 0.5},
         {0.1875, -0.5, 0.1875, 0.25, 0.5, 0.5},
         {0.25, -0.5, 0.25, 0.3125, 0.5, 0.5},
         {0.3125, -0.5, 0.3125, 0.375, 0.5, 0.5},
         {0.375, -0.5, 0.375, 0.4375, 0.5, 0.5},
         {0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5},
         {-0.5, -0.5, -0.5, -0.4375, 0.5, -0.4375},
         {-0.5, -0.5, -0.4375, -0.375, 0.5, -0.375},
         {-0.5, -0.5, -0.375, -0.3125, 0.5, -0.3125},
         {-0.5, -0.5, -0.3125, -0.25, 0.5, -0.25},
         {-0.5, -0.5, -0.25, -0.1875, 0.5, -0.1875},
         {-0.5, -0.5, -0.1875, -0.125, 0.5, -0.125},
         {-0.5, -0.5, -0.125, -0.0625, 0.5, -0.0625},
         {-0.5, -0.5, -0.0625, 0, 0.5, 0},
         {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
      }
   }


Code: Select all
selection_box = {
      type = "fixed",
      fixed = {
         {-0.5, -0.5, 0, 0.0625, 0.5, 0.5},
         {0.0625, -0.5, 0.0625, 0.125, 0.5, 0.5},
         {0.125, -0.5, 0.125, 0.1875, 0.5, 0.5},
         {0.1875, -0.5, 0.1875, 0.25, 0.5, 0.5},
         {0.25, -0.5, 0.25, 0.3125, 0.5, 0.5},
         {0.3125, -0.5, 0.3125, 0.375, 0.5, 0.5},
         {0.375, -0.5, 0.375, 0.4375, 0.5, 0.5},
         {0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5},
         {-0.5, -0.5, -0.5, -0.4375, 0.5, -0.4375},
         {-0.5, -0.5, -0.4375, -0.375, 0.5, -0.375},
         {-0.5, -0.5, -0.375, -0.3125, 0.5, -0.3125},
         {-0.5, -0.5, -0.3125, -0.25, 0.5, -0.25},
         {-0.5, -0.5, -0.25, -0.1875, 0.5, -0.1875},
         {-0.5, -0.5, -0.1875, -0.125, 0.5, -0.125},
         {-0.5, -0.5, -0.125, -0.0625, 0.5, -0.0625},
         {-0.5, -0.5, -0.0625, 0, 0.5, 0},
         {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
      }
   }
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: [Mod]Angled Stairs[angledstairs]

by pithy » Tue Jun 07, 2016 16:26

Is there any reason for the saw tooth pattern?

With mesh you can remove it, but the selection box will still have it.
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Tue Jun 07, 2016 16:45

pithy wrote:Is there any reason for the saw tooth pattern?

With mesh you can remove it, but the selection box will still have it.


The sawtooth is the result of creating it as a nodebox (using the NBE)
sofar created a mesh for me of the stair (which looks beautiful) but..., I do not know how to set it up in the script, using the mesh .obj file
That is the problem I am having. It is the result of my limited knowledge / experience with Lua (coding in general)
The only part I do know, is to use drawtype = mesh, and then to use mesh = to add a link to the .obj file.
From there..., I'm clueless : /
My only way for learning, is to look at other scripts, and tinker with them. But with using mesh I have not been very lucky. I have looked at other mods which use meshes, I have looked through the mod handbook, and even Lua sites with no luck.
So, at this point, I am of the opinion that (although mesh looks superior...) nodebox, sawtooth, and triangles rock! :D
When I tried both ways which you set... I simply bump into the stair and cannot climb it at all. Those are two ways I tried, among 5 other ways
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: [Mod]Angled Stairs[angledstairs]

by pithy » Tue Jun 07, 2016 20:23

I found a bug, you can't use spaces in your file names.
 

User avatar
TumeniNodes
Member
 
Posts: 2385
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod]Angled Stairs[angledstairs]

by TumeniNodes » Tue Jun 07, 2016 21:00

pithy wrote:I found a bug, you can't use spaces in your file names.

I used a space? where?

Do you mean a "bug" which is causing the mod to not load? Because it has been running fine for me
Just thought about it..., maybe you are referring to the models names? Because I just realized when I was messing around with all this, that i used spaces such as "angled stairL.obj" (I have to fix those) But even when I did to test, the game crashed trying to use the .obj's produced from NBE.
My brain, is AES256 encrypted, even I don't know wth I'm thinking...
 

User avatar
Nathan.S
Member
 
Posts: 793
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod]Angled Stairs[angledstairs]

by Nathan.S » Tue Jun 07, 2016 22:19

The collision box will still be the nodeboxes data. You can't use an obj for the collisions. Use the old code you had from the collisions and just the mesh for the visiuals.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: davidthecreator, twoelk and 7 guests