[mod] Woolen Mesh Creator (not only wool!) [wesh]

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

[mod] Woolen Mesh Creator (not only wool!) [wesh]

by entuland » Tue May 15, 2018 23:02

Hello there,
I've just published my second mod, it allows for capturing builds made out of most of the default minetest_game nodes and create small reproduction of such builds (one-block sized) made out of "mini-voxels", so to say. Only wool colors available but many more nodes will be captured.

Allows for rebuilding captures immediately either as wool blocks or with the original nodes, rotated at will.

Repo: https://github.com/entuland/wesh

Download link:
V.1.0 https://github.com/entuland/wesh/archive/1.0.zip

Dependencies: [matrix]

Code License: MIT

Media License: CC0

Important: this mod started with only capturing wool blocks, this isn't the case anymore! You don't need to rebuild your creations with wool in order to capture them cause the mod is able to capture any kind of block (this can be customized in the nodecolors.conf file).

Canvases available in sizes of 2, 4, 8, 16 and 32 (side of the captured cube). Added size 64 as well, which can potentially produce invisible meshes. Invisible meshes will not happen though, cause there is an optional cap in the number of faces (you can change that for each capture if you want to push the limits).

The readme file there has all instructions and screenshots, here I'll post just a few.

You start from something like this...
Image

...and you end up with something like this:
Image

or like this:
Image

Sample of natural terrain capture:
Image

Sample of non-full nodes (automatic collision box):
Image
Image

Since new nodes / meshes can't be picked up while the world is running, you'll need a world restart in order to see and use the blocks you'll create. Once the world gets restarded you can obtain new meshes from the "Giveme Meshes" button in the capture interface.

Finally, when you save a capture the mod also saves a copy of the build (if so you wish). Only nodes and their orientation will be stored, no metadata.

As usual, all comments, bug reports and feature requests will be more than welcome, hope you'll enjoy this second contribution of mine.

And, hopefully, we'll get some more eyes on the code for allowing us to register new nodes or to alter existing ones while a world is running (short of that, this mod of mine will _always_ require a world reboot in order to use the new captures).

In the meantime, have fun :)

Update 16/05/2018
Meshes were all looking funky cause my code failed to specify normals for each vertex in each face definition, now the final result looks way better. Existing meshes can be fixed importing them in Blender, flipping normals and exporting them again - or simply deleting them and capturing them again.

Bonus update, same day, additional canvas sizes :P

Update 17/05/2018
Added support for capturing and customizing colors of most of the default minetest_game nodes.

Update 02/06/2018
- implemented automatic collision box as simple cuboids so you cannot create stairs (but you can create slabs, frames, carpets and so forth)
- added ability to specify custom node properties to be passed to register_node() from .obj.dat structure (details in https://github.com/entuland/wesh#specif ... properties)

Update 03/06/2018
Split collision box into up to 8 sub boxes to allow for stairs, stair corners and slopes (sort of, they'll feel like stairs).

Update 05/06/2018
Added a canvas of size 64
Added facilities to merge collision boxes together when fitting
Merged contributions from TwistedGate (new canvas meshes and textures)

Update 08/06/2018
Added separated privileges to limit ability to capture meshes, place meshes and delete meshes
Added ability to omit backup matrices at capture time
Added ability to choose variants at capture time
Added ability to obtain/delete meshes from the capture interface
Capped number of faces to avoid crashes and invisible meshes

Update 09/06/2018
Added importing and vacuuming features that allow to import matrix files and use them as temporary / permanent blueprints
Some minor tweaks here and there

Update 10/06/2018
Added transformations to allow canvases to work properly with any rotation (capture your house, place the canvas up in the air, rotate it upside down and reimport the house :P)

Added invert / mononode modes to import matrices (you can rebuild a matrix out of cobblestone, or carve its negative with air inside the ground and so forth)

Update 06/07/2018
Added support for colorfacedir nodes.
Published version 1.0 release
Last edited by entuland on Fri Jul 06, 2018 10:43, edited 19 times in total.
 

Chem871
Member
 
Posts: 864
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Nyx Serris

Re: [mod] Woolen Mesh Creator [wesh]

by Chem871 » Tue May 15, 2018 23:42

That is adorable.
What is SCP-055 again? I forgot.
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Wed May 16, 2018 00:07

Chem871 wrote:That is adorable.

Glad you like it :)

I look forward for seeing what other people could do with it, I suck at building :)

One could also build stuff larger than 16 cubed by capturing separate sections and joining the resulting small blocks :P
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Wed May 16, 2018 12:53

Pushed new commit to the repo to fix the missing normals that made meshes look funky. Details in the "Update" section at the bottom of the first post, updated screenshots.
 

twoelk
Member
 
Posts: 1257
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Wed May 16, 2018 14:03

twoelk wrote:ooooh, love this

Glad you like it :)

I pushed yet another commit: adding the vertex normals wasn't really enough, cause I had horizontal faces darker than vertical ones... seems like the rendering uses both vertex normals _and_ face normals computed according to the rotation used to define them... I switched from counter-clockwise to clockwise and now everything look correct.

As above, fixing existing meshes require flipping the normals from Blender or something, or to delete and capture them again.
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland
 

User avatar
LegoLogger
Member
 
Posts: 37
Joined: Thu Sep 01, 2016 16:08
Location: Somewhere on mars.....
GitHub: BakerPrime
IRC: BakerPrime
In-game: BakerPrime

Re: [mod] Woolen Mesh Creator [wesh]

by LegoLogger » Thu May 17, 2018 02:41

Thanks so much for this mod! I was thinking about something like this the other day, and wanted a mod that did it. Now I have a mod. Haven't tested it yet, I probably will tomorrow.
~~BakerPrime
For those who complain about radiation, I should remind you that every time you leave your house, you step into
the worlds largest radiation beam. (Why else do you think us programmers hide in basements? ;P )

if you need to speak to me, you can catch me on #VE-Minetest-Servers, #RRH-Servers, ##Minetestwithunk, or #Minetest
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Thu May 17, 2018 11:59

LegoLogger wrote:Thanks so much for this mod! I was thinking about something like this the other day, and wanted a mod that did it. Now I have a mod. Haven't tested it yet, I probably will tomorrow.
~~BakerPrime

You're welcome, let me know if you stumble on any problems.

Upcoming stuff: I'm mapping minetest_game blocks to colors in order to let canvases capture any kind of build made with them. The result will be pretty simpler than the original builds / landscapes of course, but I'll make such mapping available as a separate file in order to tweak or extend it.
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Thu May 17, 2018 13:55

Updated the repo with the new feature for capturing and customizing colors of the default minetest_game nodes, screenshot and link in the updated first post.
 

User avatar
RSLRedstonier
Member
 
Posts: 443
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [mod] Woolen Mesh Creator [wesh]

by RSLRedstonier » Fri May 18, 2018 23:53

this makes building small structures much easier than micronode or its variants because their building is a little finicky
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

User avatar
v-rob
Member
 
Posts: 560
Joined: Thu Mar 24, 2016 03:19
Location: Right behind you.
GitHub: v-rob

Re: [mod] Woolen Mesh Creator [wesh]

by v-rob » Sat May 19, 2018 01:16

And done without a single entity. Simply awesome.
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Sat May 19, 2018 11:26

RSLRedstonier wrote:this makes building small structures much easier than micronode or its variants because their building is a little finicky

Glad you like it :)

v-rob wrote:And done without a single entity. Simply awesome.

Thanks :) Main point of not using them is that I wasn't even aware of them probably, inspecting the worldedit mod I've seen how they're used to create area markers, and I think I'll need them for the next version.

The next version will be more likely a separate mod, probably with a different name, or I'll mark this version as a release on github and I'll start working on a new release allowing for a single canvas with customizable capture sizes (non-cubic) and eventually also splitting a capture in multiple meshes. This is where I'll most likely need entities to visually mark the extent of the captures and the splits in the world. The reason for a different name or a different major release is that I'll most likely have to break the compatibility with the current export of the matrix data (right now I'm saving only computed colors, the plan for the new version would be saving actual node names with their orientation, eventually with their metas as well). Another thing that would be nice to have is automatically computing the collision and target boundaries of the resulting nodes, allowing for creating, say, frames or carpets or small decorations to be put on or on top of a chest, stuff you can walk on or that in any case don't get in the way of aiming at nearby nodes.

Not really sure about any of the above, that's just a gathering of ideas that popped out speaking about this mod here and there.

Unfortunately I'll have to postpone all of this a bit cause of work (well, lack thereof... I need to find one and preparing my coding portfolio requires me to fix an old and pretty large PHP project of mine).
 

cybervision
Member
 
Posts: 31
Joined: Wed Jan 10, 2018 05:45
GitHub: tonsb
In-game: cybervision
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Sat May 19, 2018 23:17

cybervision wrote:wow i tried this and i already love it

Glad you like it :)

By the way, if anyone has any cool miniature to show off please do so! A friend on discord shown me sort of an industrial crane made out of about a dozen miniatures of side 8, it's pretty neat.
 

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [mod] Woolen Mesh Creator [wesh]

by Lone_Wolf » Sun May 20, 2018 01:47

entuland wrote:
cybervision wrote:wow i tried this and i already love it

Glad you like it :)

By the way, if anyone has any cool miniature to show off please do so! A friend on discord shown me sort of an industrial crane made out of about a dozen miniatures of side 8, it's pretty neat.

You have Discord? You may be interested in this Minetest Discord server (Unofficial but hopefully that will change soon)
https://discord.gg/Wr6eXU3
Awesome mod btw
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Sun May 20, 2018 02:04

Lone_Wolf wrote:
entuland wrote:
cybervision wrote:wow i tried this and i already love it

Glad you like it :)

By the way, if anyone has any cool miniature to show off please do so! A friend on discord shown me sort of an industrial crane made out of about a dozen miniatures of side 8, it's pretty neat.

You have Discord? You may be interested in this Minetest Discord server (Unofficial but hopefully that will change soon)
https://discord.gg/Wr6eXU3
Awesome mod btw

Thank you for the link! Just joined :)

Glad you like the mod :)
 

User avatar
RSLRedstonier
Member
 
Posts: 443
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [mod] Woolen Mesh Creator [wesh]

by RSLRedstonier » Mon May 21, 2018 19:55

wait this doesn't use ANY entities? how tf did you get it to work without a quintillion nodeboxes? are you registering a new node everytime a player creates a small model?
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [mod] Woolen Mesh Creator [wesh]

by Lone_Wolf » Tue May 22, 2018 03:19

RSLRedstonier wrote:wait this doesn't use ANY entities? how tf did you get it to work without a quintillion nodeboxes? are you registering a new node everytime a player creates a small model?

Try looking at the code https://github.com/entuland/wesh
 

User avatar
LMD
Member
 
Posts: 681
Joined: Sat Apr 08, 2017 08:16
Location: Somewhere over the Rainbow : Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [mod] Woolen Mesh Creator [wesh]

by LMD » Tue May 22, 2018 12:03

Apparently, you are creating OBJS(so this works pretty similar like my Model Creator)
Are you removing unnecessary faces+merging faces ? (Some features of my Model Creator)
EDIT : I looked and your code and assume the answer is no.
Magic-CTF(soon)MTPCFractal-SuiteModel Creator Schematic CreatorColorfulXmas BallsWebsite • Never judge me by my age
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland

Re: [mod] Woolen Mesh Creator [wesh]

by entuland » Tue May 22, 2018 13:03

LMD wrote:Apparently, you are creating OBJS(so this works pretty similar like my Model Creator)
Are you removing unnecessary faces+merging faces ? (Some features of my Model Creator)
EDIT : I looked and your code and assume the answer is no.

Yep, I'm creating .obj files but I didn't have a chance to inspect your code or test your Model Creator - in all honesty I came to know about it just here cause you mentioned it, there is an incredible amount of contributions around, I simply can't cope with them all :)

As for your question: yes, I'm somewhat optimizing the resulting meshes by removing unneded faces, but only to the point of checking whether a specific face is against an occupied position (in which case it doesn't get added to the mesh). Creating a filled cube would result in a mesh with only external faces, whereas a hollow one would result in the internal faces as well, even though they can't be normally seen in the game (working out whether a face is visible through a hole or something requires far more checks).

I thought about merging faces but there, as well, it requires quite a bit of additional work to optimize it depending on the convex / concave shape of a set of co-planar faces (not to speak about the fact that being able to have such merged faces "pretend" to be mini-voxels would require custom textures, whereas my approach makes them work with a default one).

As with everything, this mod can be improved as well. In all honesty though I'm not really sure it would be really worth taking the extra effort of merging faces and creating custom textures for each created model, also because that would make it way more complex for end users to swap the texture with a different one and obtain different version of them - my approach lets you create a new texture with custom colors or custom patterns and apply it to any of the created meshes by simply adding a line to their .dat file.
 

User avatar
LMD
Member
 
Posts: 681
Joined: Sat Apr 08, 2017 08:16
Location: Somewhere over the Rainbow : Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

entuland
Member
 
Posts: 111
Joined: Wed May 09, 2018 15:47
GitHub: entuland
IRC: entuland
In-game: entuland
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [mod] Woolen Mesh Creator [wesh]

by ChimneySwift » Sun May 27, 2018 10:12

This actually really cool. xD
A spoon is basically a tiny bowl with a stick on it
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: sirrobzeroone and 4 guests