Tutorial for model use

Post Reply
ThorfinnS
Member
Posts: 288
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Tutorial for model use

by ThorfinnS » Post

Is there a good tutorial somewhere I can point a student to that explains how to use models in minetest? He was inspired by the desert_life mod's prickly pear, and can make tweaks to that, but is having making it work from scratch. I'm able to find errors after he makes them, but he's getting frustrated about that way of learning, and how I'm explaining it is obviously falling short.

User avatar
TalkLounge
Member
Posts: 318
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

Re: Tutorial for model use

by TalkLounge » Post

Youtube?
3D Modelling with Blender is very frustrating. I stopped, because it's so complicated to learn. Maybe some videos from here are useful. GreenDimond needed 3 hours to create a walking pinguin...
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

Eran
Member
Posts: 123
Joined: Fri May 03, 2019 16:46

Re: Tutorial for model use

by Eran » Post

Blender is really hard to get into but once you kind of know your way around it it's really fun.
To get started with Blender in general I suggest youtube videos. This one and its successors helped me a lot. There are also videos on the MinetestVideos channel that show mobs being made.
There is also a Minetest wiki page on using Blender. It contains some useful information specific to modeling for minetest (especially the file format section). It's definetely worth reading but I feel like video tutorials are better for actually learning how Blender works.

ThorfinnS
Member
Posts: 288
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: Tutorial for model use

by ThorfinnS » Post

I didn't explain very well. He's already got a pretty good grasp of Blender. His problem is how to integrate his models into minetest.

As an example, here's the code he's borrowing from:

Code: Select all

minetest.register_node('desert_life:prickly_pear', {
   description = 'Prickly Pear Pad',
   drawtype = 'mesh',
   mesh = 'dl_pp_1.obj',
   tiles = {name='dl_prickly_pear.png'},
   groups = {dig_immediate = 3},
   paramtype = 'light',
   paramtype2 = 'facedir',
   selection_box = {
      type = 'fixed',
      fixed = {{-.2, -.5, -.2, .2, .0, .2}}
   },
   collision_box = {
      type = 'fixed',
      fixed = {{-.2, -.5, -.2, .2, .0, .2}} -- left bottom front right top back
   },
   drop = 'desert_life:prickly_pear',
   after_place_node = function(pos, placer, itemstack)
      local under = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
      local node = minetest.get_node(pos)
      if under.name == 'default:sand' or under.name == 'default:desert_sand' then
         minetest.set_node(pos, {name = 'desert_life:prickly_pear_1', param2 = node.param2})
      end
   end,
})
Just changing out the .obj and .png references, it's working fine, though it's still called "desert_life:prickly_pear". Once he tries to define the node in his own mod directory, it no longer "works". I'm not sure why; I have not had a chance to review his code. And he would prefer to figure it out himself, but doesn't know where to go from here.

All he needs to define his own node is:

Code: Select all

minetest.register_node('mymod:mynode', {
   description = 'Whatever',
   drawtype = 'mesh',
   mesh = 'mynode.obj',
   tiles = {name='mynode.png'}
})
right?

Eran
Member
Posts: 123
Joined: Fri May 03, 2019 16:46

Re: Tutorial for model use

by Eran » Post

ThorfinnS wrote: All he needs to define his own node is:

Code: Select all

minetest.register_node('mymod:mynode', {
   description = 'Whatever',
   drawtype = 'mesh',
   mesh = 'mynode.obj',
   tiles = {name='mynode.png'}
})
right?
Yes, that's enough. Defining a node to use a mesh if fairly easy. He might be best off with a lua tutorial and/or the minetest modding book.
ThorfinnS wrote:Once he tries to define the node in his own mod directory, it no longer "works". I'm not sure why; I have not had a chance to review his code.
Sadly I'm no fortune teller either. I suspect there might be a syntax error like he forgot a comma in the table or to close brackets.

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: Tutorial for model use

by sirrobzeroone » Post

does his depends.txt in his custom mod contain default?

I got some really weird behavior when i missed default in my depends.txt

ThorfinnS
Member
Posts: 288
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: Tutorial for model use

by ThorfinnS » Post

Thanks, all. He got it working, and says it was a stupid mistake, but won't say what it was. I fiddled around trying to find any mistake that wouldn't have thrown at least a warning, but couldn't find anything. Misnamed directories, typo for filename, missing dependency, etc. Maybe that was what he doesn't want to say -- that he didn't bother to look at the debug.txt...

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

Re: Tutorial for model use

by TumeniNodes » Post

ThorfinnS wrote:Maybe that was what he doesn't want to say -- that he didn't bother to look at the debug.txt...
sounds about right xD

Good for him though for being determined to resolve the issue for himself.. and then doing it.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests