Page 1 of 3

[Mod] Mesh primitive objects [0.22] [slope_test]

Posted: Tue Oct 21, 2014 03:48
by VanessaE
Here's a simple mod that uses the new mesh draw type to supply some geometric primitives and a few shapes derived from them, suitable for roof shingles, columns, etc.

These aren't entities, they're nodes, and unlike the old method of using tons of small nodeboxes to create shapes, they are perfectly flat and/or diagonal and/or round (well, as much so as a computer is capable of anyway). The slopes consist of only a few faces/polygons each, while the more rounded objects have far more (though enormously less than a nodebox-based equivalent at a passable resolution would have).

All of the objects are based on Blender's built-in primitives. Why re-invent the wheel, right? :-)

Image
Some of the shapes that can be made with this mod. The inventory at the bottom shows the full set of primitives.

Usage:

Nothing special to using them really. Get a few (creative or /giveme, see list below) and place them. Note that a few of these only have the "_onetexture" variety. The one-piece "long" slope takes up two nodes; point at where the back/thick end should go. The code does not check for adequate space before placing. Also, the code does not attempt to auto-place the front/back halves of the two-node version of the long slope..
+ Spoiler
Technical info:
+ Spoiler
Convert and update old stuff!

Got nodebox models you want to import into Blender for further editing? Try my bash script below to help out.
+ Spoiler
Depends: minetest_game/default and Minetest engine development build from commit d2219171 or later (anything older will either just show cubes, or models that are way too small).

Download:
slope_test-23.zip
(2.76 MiB) Downloaded 351 times
License: WTFPL for code and models, CC-By-SA for the textures.

Re: [Mod] Meshes Slope test [0.1][slope_test]

Posted: Tue Oct 21, 2014 04:09
by philipbenr
Cool. /me searches for the download... :(

This will help speed the learning process. I need to learn UV texturing for my Subgame. Thanks VanessaE!

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Tue Oct 21, 2014 10:26
by ExeterDad
Thanks VanessaE
Valuable learning tool. Totally re-invents the wheel... errr Block.

At the time I was just getting off my butt and mastering a nodebox or two. :D

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Tue Oct 21, 2014 10:44
by Linuxdirk
Looks great! I hope all requirements for this will make it in Minetest 0.5.x and the new technique will make it into home decor and thus into Carbone game :)

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Tue Oct 21, 2014 11:29
by TriBlade9
Awesome Vanessa! That looks absolutely wonderful, and it has so many more implications for the game. Keep up the good work!

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Tue Oct 21, 2014 14:13
by Minetestforfun
Wow, good work VanessaE !

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Tue Oct 21, 2014 14:37
by Hashlime
Really cool but the collision/selection box can't be defined with the .obj ?

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Tue Oct 21, 2014 15:23
by Nathan.S
Looking very cool. Just in time to add 3d models to my new mod.

Re: [Mod] Mesh slopes test [0.1][slope_test]

Posted: Wed Oct 22, 2014 02:56
by VanessaE
New version, fixes the texture errors some folks had with the previous one (Irrlicht rounding errors at the edges of the UV objects?). Also got rid of some redundant/leftover files.

This required that I rearrange the texture maps slightly and enlarge them to 64x64px, to allow for some added space between the various objects so that there is room to lay down some border pixels around them.

See first post attachment.

Re: [Mod] Mesh slopes test [0.6][slope_test]

Posted: Wed Oct 22, 2014 04:18
by Don
Wow. That's all I can say is wow

Re: [Mod] Mesh slopes test [0.6][slope_test]

Posted: Wed Oct 22, 2014 15:35
by VanessaE
Update: new version. Now there are versions of these models in the mod that use ordinary texture files (these just happen to point to default_stone.png), so they'll work with any texture or texture packs you want. These secondary models should be suitable as drop-in replacements for all those nodebox-based slopes that were derived from the ones Jeija's "irregular" mod.

...and this time the screenshot shows the original wood texture on the neighboring cubes instead of the tweaked one that my game uses. ;-)

Re: [Mod] Mesh slopes test [0.7][slope_test]

Posted: Wed Oct 22, 2014 16:40
by Don
I just compiled the latest minetest. was playing with your slopes. They look awesome.

One thing I did notice is when bumpmapping is turned on the texture looks blury. I don't usually use bumpmapping so it isnt a big deal to me. Just though I would let you know.

Besides that I am very impressed.

screenshot

Re: [Mod] Mesh slopes test [0.7][slope_test]

Posted: Wed Oct 22, 2014 18:14
by VanessaE
Try the stone-based ones. They use the original default textures, so they'll do whatever a stone block does. Feel free to edit the code to swap in, say, wood or sandstone, or any other standard texture.

Re: [Mod] Mesh slopes test [0.7][slope_test]

Posted: Wed Oct 22, 2014 18:30
by Don
VanessaE wrote:Try the stone-based ones. They use the original default textures, so they'll do whatever a stone block does. Feel free to edit the code to swap in, say, wood or sandstone, or any other standard texture.
The stone works great with bumpmapping.
I plan on doing some swapping and playing. I just wish I knew Blender so I can make more models.

Thanks for your hard work!

Re: [Mod] Mesh slopes test [0.7][slope_test]

Posted: Wed Oct 22, 2014 19:51
by VanessaE
New version, just moved the .blend files to their own folder to keep them out of the way (some folks' Minetest clients were throwing warnings because of their presence in the models/ folder).

Re: [Mod] Mesh primitive objects [0.10] [slope_test]

Posted: Thu Oct 23, 2014 19:58
by VanessaE
New version, includes blender's cylinder primitive now.

EDIT: updated to v0.10, made the texture for the UV-map version of the cylinder 64x64 px so that the pixels don't look stretched out.

Re: [Mod] Mesh primitive objects [0.10] [slope_test]

Posted: Thu Oct 23, 2014 20:56
by Don
VanessaE wrote:New version, includes blender's cylinder primitive now.

EDIT: updated to v0.10, made the texture for the UV-map version of the cylinder 64x64 px so that the pixels don't look stretched out.
You're on a roll! Great work.

Re: [Mod] Mesh primitive objects [0.10] [slope_test]

Posted: Fri Oct 24, 2014 09:19
by Topywo
Thanks VanessaE :-)
I tested the versions before cylinders and they looked good (I prefer the full collison box by the way).

I have one (very general) question you may know the answer.
What impact have the meshnodes on the performance of minetest compared with other node types?

Re: [Mod] Mesh primitive objects [0.10] [slope_test]

Posted: Fri Oct 24, 2014 10:05
by jp
Topywo wrote:What impact have the meshnodes on the performance of minetest compared with other node types?
Equivalent or even better. All meshes (nodeboxes included) are directly handled by Irrlicht.

Re: [Mod] Mesh primitive objects [0.11] [slope_test]

Posted: Fri Oct 24, 2014 12:05
by VanessaE
Update: Version 0.11, added models equivalent to the various shapes found in Technic's CNC machine. Specifically, only those shapes where a model is actually needed: the quarter-rounded blocks, their corresponding corners, pyramids, and one other object I can only describe as a squared-sphere "blob". Meshes/models would be overkill for the other shapes provided by that machine.

See first post for download link and node list.

Re: [Mod] Mesh primitive objects [0.11] [slope_test]

Posted: Fri Oct 24, 2014 13:02
by Inocudom
VanessaE wrote:Update: Version 0.11, added models equivalent to the various shapes found in Technic's CNC machine. Specifically, only those shapes where a model is actually needed: the quarter-rounded blocks, their corresponding corners, pyramids, and one other object I can only describe as a squared-sphere "blob". Meshes/models would be overkill for the other shapes provided by that machine.

See first post for download link and node list.
Nodebox models draw all faces of all cubes that they are made of, which is in contrast to the fact that meshes do not have this flaw. Of course, very simple nodebox models shouldn't need to become meshes, unless a gain in fps could come from doing so.

Re: [Mod] Mesh primitive objects [0.11] [slope_test]

Posted: Fri Oct 24, 2014 14:38
by rubenwardy
All nodeboxes are converted to mesh nodes now when the game is loading, iirc.

Re: [Mod] Mesh primitive objects [0.11] [slope_test]

Posted: Fri Oct 24, 2014 15:54
by Krock
Yay! Totally round nodes exist now!

Re: [Mod] Mesh primitive objects [0.11] [slope_test]

Posted: Fri Oct 24, 2014 15:59
by Esteban
Krock wrote:Yay! Totally round nodes exist now!
Could smooth grass hills can be done using meshnodes? :D
+ Spoiler

Re: [Mod] Mesh primitive objects [0.11] [slope_test]

Posted: Fri Oct 24, 2014 18:42
by Evergreen
For some reason, the new meshnodes aren't working for me. I have the latest git version, but they just appear as cubes.