Static simple 3d meshes

Badger436
New member
 
Posts: 4
Joined: Sat Feb 16, 2013 23:12

Static simple 3d meshes

by Badger436 » Mon Feb 18, 2013 06:57

Hi everyone, first of all, I'm glad to be here. I just joined the forums and I think that this is a really neat game. I am curious to learn how to add simple low-poly static meshes into the game. For example, I have made a model of an anvil, and would like it to be able to be placed in the world. I have added many different 2D items without any problems. I would like to now attempt a 3D version of one of my items. There is no animation involved, just the item itself, which (the plan is) will be possible to interact with in the place of a block-- similar to the furnace.

What I am unsure of:

--best format to use for static, non-animated meshes?
--how to implement these items in the lua script to where they are placeable in the world?

Thank you in advance!
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Feb 18, 2013 07:13

Nodes cant have meshes. There are predefined drawtypes wich hare handled by the engine.
One of the drawtype is called "nodebox". You can define multiple little boxes wich are drawn (see stairs for example).
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Mon Feb 18, 2013 16:27

Clarifiying PilzAdam's answer: You can have a node that draws a mesh as its drawtype (see player.lua in the default mod). It doesn't allow you to have collision detection though, so you would want to make a nodebox (but don't set the drawtype as nodebox, if you want the mesh to be drawn).

EDIT: Okay, apparently not...
Last edited by lkjoel on Mon Feb 18, 2013 16:30, edited 1 time in total.
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Feb 18, 2013 16:29

lkjoel wrote:Clarifiying PilzAdam's answer: You can have a node that draws a mesh as its drawtype (see player.lua in the default mod). It doesn't allow you to have collision detection though, so you would want to make a nodebox (but don't set the drawtype as nodebox, if you want the mesh to be drawn).

The player is an object. Nodes cant have meshes, only active objects can.
 

lkjoel
Member
 
Posts: 778
Joined: Wed Feb 29, 2012 19:27

by lkjoel » Mon Feb 18, 2013 16:30

PilzAdam wrote:
lkjoel wrote:Clarifiying PilzAdam's answer: You can have a node that draws a mesh as its drawtype (see player.lua in the default mod). It doesn't allow you to have collision detection though, so you would want to make a nodebox (but don't set the drawtype as nodebox, if you want the mesh to be drawn).

The player is an object. Nodes cant have meshes, only active objects can.

Oh really? I thought they could... Why can't they?
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
 

Badger436
New member
 
Posts: 4
Joined: Sat Feb 16, 2013 23:12

by Badger436 » Thu Feb 21, 2013 03:59

Thank you very much for the clarification!
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Thu Feb 21, 2013 13:13

It is kind of easy to create an object that behaves like a block
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 12 guests

cron