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

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Yep, you'll be able to do that soon-ish. I'll be waiting a while before updating my mainline mods though. I want to at least give folks ample time to acquire builds that support this drawtype, if not just wait until 0.4.11 is about ready to go out.

Update: v0.18, just fixed a typo.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

VanessaE wrote: ExeterDad: Among these new shapes should be everything that's needed for those 12/6 pitch roofs you wanted. Maybe I should add these to Home Decor also?

See first post for download.
A lady knows how to get to a ex-contractors heart! And yes added to Home Decor would be huge. (for us anyway)

Joz
Member
Posts: 41
Joined: Fri Oct 25, 2013 21:37

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

by Joz » Post

@LinuxDirk:
Yes, minetest is a voxel game, but also only an engine, and now there is space for subgames with realistic approaches where you don't have to jump one meter in height every 3 seconds when running over hills :)
Also, round trees will look more realistic then quadratic ones. But that's a question of subgame.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Update: the nodebox conversion script in the first post now requires 'bc' to do its job, because I've updated it to handle basic math expressions in nodebox coordinates (e.g. measures of 1/16 versus multiples of 0.0625), since so many of us use those in our mods.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

TG-MyinaWD
Member
Posts: 356
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .
Location: Far Eden

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

by TG-MyinaWD » Post

Joz wrote:@LinuxDirk:
Yes, minetest is a voxel game, but also only an engine, and now there is space for subgames with realistic approaches where you don't have to jump one meter in height every 3 seconds when running over hills :)
Also, round trees will look more realistic then quadratic ones. But that's a question of subgame.
I am, making a Real Life subgame. I just know the mesh nodes will make it look, more like real trees and such.
Just might need do something for the leaves. but for time been they are fine.

But I plan create a real life Minetest Build. It might be the most longest game I ever made to.
So if anyone like help they can. So there lots I need make sure just right to.

But so far anyone like help can send me a PM.
I might make a Topic later on.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

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

by addi » Post

hi VanessaE i think i found a bug in your convert script,
if there is no empty line after the nodebox in the input file it does not convert the last line of the nodebox

for example:

Code: Select all

{-0.2, 0.2, -0.7, 0.2, -0.2, 0.9},
{0.53, -0.1, 0.1, -0.53, 0.1, -0.1}
-->not full convert

Code: Select all

{-0.2, 0.2, -0.7, 0.2, -0.2, 0.9},
{0.53, -0.1, 0.1, -0.53, 0.1, -0.1}

-->full convert

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Ah well, it IS experimental :-)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
fireuser
Member
Posts: 21
Joined: Wed Jul 02, 2014 21:05

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

by fireuser » Post

How many faces does the UV sphere have!? I can't get that many faces on an object without the game crashing. If you are using some wired code could you post it or give a link to a post with information on how to use so many faces. Thanks!

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

It's actually just derived from the default sphere provided by Blender. I believe I set it for 64 segments (longitude) and 32 rings (latitude), so only 2048 faces, and of course you can only see about 1024 of those at any one time at most.

Since it's only a test/demo mod, I wouldn't expect a modder to actually create/generate a sphere with nearly as much detail as that if they're putting it into a node that people will have any likelyhood of using lots of.

In practice, it would have probably been sufficient to use 16 segments and 8 rings. That would make 128 faces, of which around 64 would be visible from any particular angle. Even THAT many might still be overkill, depending on the displayed size of the sphere relative to other objects in the model (and the rest of the scene it's expected to be used in).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Update: revision 19 of this mod: fixed lighting/shadow glitches in all of the "_onetexture" models (as far as I can tell i.e. unless I missed one). Also fixed a z-fighting issue that kahrl spotted in the quarter round corner. HUGE thanks to acerspyro for figuring out what was wrong with the lighting!

See first post for download link.

EDIT: revision 20, fixed a similar lighting glitch in the two wooden quarter-round models.

EDIT: revision 21, fixed the same sort of lighting glitch on the two "onetexture"/stone quarter-round models (somehow missed it on the first pass).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

Is it too much to ask if you could make an inside and outside corner for the long slope? I tried to figure it out but blender just isn't my friend.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

I probably won't be making any further changes to this mod. The point of it was as a launching point for other modders who want to learn how to add mesh nodes to their mods (and learning how UV mapping in a model works).

That said, I believe this mod already has the shapes you're looking for (each corner type comes is in two parts, one for the "back" half and one for the "front" half of the slope, for a total of four nodes, all in the stone "onetexture" variety).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

VanessaE wrote:I probably won't be making any further changes to this mod. The point of it was as a launching point for other modders who want to learn how to add mesh nodes to their mods (and learning how UV mapping in a model works).

That said, I believe this mod already has the shapes you're looking for (each corner type comes is in two parts, one for the "back" half and one for the "front" half of the slope, for a total of four nodes, all in the stone "onetexture" variety).
My mistake. I have anolder version of this mod. Thanks for your reply and all your hard work. I am loving the mesh nodes. I already have a couple mods made with them. They look so much better then nodeboxes.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

@Don
I started working on your hips and valleys last night. Those blocks will be useful for roof systems as well as your paths so I decided to bang em out. I'll let you know soon when they're finished.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

ExeterDad wrote:@Don
I started working on your hips and valleys last night. Those blocks will be useful for roof systems as well as your paths so I decided to bang em out. I'll let you know soon when they're finished.
I am working on the one node roof hips and valleys right now. Can you go on my server so we can chat?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Meanwhile, no sooner do I say "no more changes", and I've put an improved "sphere" model and texture up (see rev. 22). That is, the one with the earth/worldmap texture. Less distortion than previously, higher resolution image.

EDIT: rev. 23 includes an improved one-texture (stone) version of the sphere also.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

ExeterDad did the long slope corners. They are in the mywoodslopes mod if you want to add them to this.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

@Don
She already has inside and outside corners for the long slopes in there. Just hard to spot as they are two piece. (front and back)

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Post

ExeterDad wrote:@Don
She already has inside and outside corners for the long slopes in there. Just hard to spot as they are two piece. (front and back)
I see that. Just thought she might want the full version too.

The new sphere looks really nice VanessaE
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

TG-MyinaWD
Member
Posts: 356
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .
Location: Far Eden

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

by TG-MyinaWD » Post

So is there an way make mesh nodes to use an animated textures? or has it not been added?
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

Easily. Just supply an animated texture like you would with any other node, if you want most of the model to display an animation, or if you're using very small, simple texture files. That is, you can just tile the texture vertically for however many frames you need, modify the parts that need to be animated (just like with any other node), and reference it as an animated image in your code, like you would for, say, a torch (you can see a good example of this practice in the texture for the steel 3d-ish nodebox-based torch that Home Decor got from the old 3dforniture mod).

For models with complex shapes (and hence, complex UV maps), or with high resolution texture files, you'll probably want to split the animated part off into its own file. This is especially true if you want to reference a generic, animated texture that someone else has already prepared or which is included in the default game. That way, you can use a single, static image for the non-animated parts of the model. For example, this campfire mod does this, and in fact its files are how I learned how it works so that I could do the same sort of thing in Pipeworks' pouring spigot model, detailed below.

To do this, you need to put two or more materials in your model, one for each part of the model that needs a separate texture file, and make sure "Objects as OBJ Groups" and "Material Groups" are both enabled when you export the model. Then in your mod code, simply assign separate texture files by putting more than one image filename in the tiles={} field of the node def, like this:

Code: Select all

minetest.register_node("pipeworks:spigot_pouring", {
	description = "Spigot outlet",
	drawtype = "mesh",
	mesh = "pipeworks_spigot_pouring.obj",
	tiles = {
		{
			name = "default_water_flowing_animated.png",
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 0.8,
			},
		},
		{ name = "pipeworks_spigot.png" }
	},
	-- .... more stuff for the node here
})
Model file to go with this code: https://github.com/VanessaE/pipeworks/b ... ouring.obj

Here, I call upon the standard animated, flowing water texture, which in this particular node is assigned to the material that's wrapped around a static, ordinary cylinder that sticks down out of the bottom of the spigot model. The second texture is assigned to the other material, which is wrapped around the rest of the spigot model.

The order of textures matters, but it's not well-defined in Blender just which material will appear first in the model's list, so if the textures are swapped when you load your new node in the game, just swap them in your tiles={} definition.

Depending on the model, it may be a good idea to separate the animated parts from the non-animated parts, putting each into their own separate Blender objects. Each still gets its own material. For some people, this will make the model easier to handle.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

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

by 12Me21 » Post

Is it possible to have the mesh be changing shape? like have some parts of the node moving all the time.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

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

by VanessaE » Post

No, this is not yet possible in a standard mesh node. However, an entity can have animated/moving model parts. Jordach figured out a "hybrid" setup, which he uses in a few mods, where you place a regular node that contains all of the static parts, and it in turn spawns an entity over the static parts, which contains the animated parts. He contributed one such hybrid node to Home Decor - the desk fan.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests