3D meshes for players and creatures [Models are now upstream!]

Post Reply
OdnetninI
Member
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Post

You can add a fuction in inventory plus to change the skin of the player in game. See every player with their own texture.
Last edited by OdnetninI on Thu Nov 15, 2012 14:59, edited 1 time in total.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

Mesh and texture are now called "character" instead of "player" to fix the conflict discussed above. I also removed the bent limbs and made them whole boxes, since I didn't like how those deformations looked like. Now there's a good reason to be accused of having a mesh exactly like MineCraft's and copying it :P Obviously people can make their own models... this is just the default.

As a reminder, a scripter's help is needed at this point to make the player mesh usable! I need two lua functions that run for each player: One that knows if the player is walking, in which direction (based on where the player is facing) and with what speed. Second is a function that knows when the player is punching (holding the left mouse button). From that I should be able to make players loop the proper animation based on what they are doing.

Also needed next is license compatible player skin to be used by default. Feel free to look one up on http://www.minecraftskins.com/ (but make sure it's explicitly GPL or Public Domain) or draw your own for MineTest if you're good at that.
OdnetninI wrote:You can add a fuction in inventory plus to change the skin of the player in game. See every player with their own texture.
Theoretically that should be possible, if lua scripts can send custom menus to a player (and IIRC they can). But a better scripter than me would have to make a player selection menu for this. Note that in MineTest's case, skins are not the only ones that can be changed and should be selectable, but also models. My suggested implementation to anyone willing to do this is adding a model selector, and each model can have its own list of textures.
Last edited by MirceaKitsune on Thu Nov 15, 2012 15:10, edited 1 time in total.

OdnetninI
Member
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Post

I only see this:
Image

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

I have some experience with the lua api so I'll try and work on that. Most of what you said that you needed though is already in the api. To get a players looking direction you can use "get_look_dir()" and to get velocity use "getvelocity()". The only one is how to tell if the user has clicked the mouse button. I have ideas on how to get that to work but I'll have to test them out.

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

by PilzAdam » Post

ashenk69 wrote:I have some experience with the lua api so I'll try and work on that. Most of what you said that you needed though is already in the api. To get a players looking direction you can use "get_look_dir()" and to get velocity use "getvelocity()". The only one is how to tell if the user has clicked the mouse button. I have ideas on how to get that to work but I'll have to test them out.
There is no getvelocity() for players; its for Lua entities only.

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Sorry about that I forgot it divides some functions to Lua Entities and not the Player.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

That's because no skin is included in GIT for this model yet. I'm testing with the MC skin, which is not license compatible. Like I said, if someone knows a free MineCraft skin that looks good I will include that (must be either GPL or Public Domain I believe).

If you want a texture until then, get the default skin from here, rename it to character.png, and put it in the same folder as the model. That will work out of the box.
PilzAdam wrote:
ashenk69 wrote:I have some experience with the lua api so I'll try and work on that. Most of what you said that you needed though is already in the api. To get a players looking direction you can use "get_look_dir()" and to get velocity use "getvelocity()". The only one is how to tell if the user has clicked the mouse button. I have ideas on how to get that to work but I'll have to test them out.
There is no getvelocity() for players; its for Lua entities only.
It really sucks this function doesn't exist for players as well. Maybe I'll see if I can implement it... should be only a few lines of code I imagine. But I'm bad with the lua API, so it might be best to leave this part to someone else. If anyone wishes to help, feel free to clone my code branch and implement the necessary additional hooks there.

Also important: In an IRC discussion, someone suggested letting C++ handle player animations. Personally I think this is a bad idea, because different player models would have different animation ranges, plus that special mods could have special actions adding their own animations to the player. At worst, this could be done in builtin (the default lua scripts), but it's very important that each MineTest game can define the frame ranges of any model plus specify their own animations if needed. The lua functions already in my code should stay as they are so they can be usable by any script in their current form.

Other than that, I'd leave better scripters decide what to do here. Ask me anytime if there's a question about this, either here or on IRC.
Last edited by MirceaKitsune on Thu Nov 15, 2012 19:09, edited 1 time in total.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

Would this be compatible with this: http://minetest.net/forum/viewtopic.php?id=3587 ?
if it is not, i would be a good thing to see happen
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

OdnetninI
Member
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Post

MirceaKitsune wrote:
That's because no skin is included in GIT for this model yet. I'm testing with the MC skin, which is not license compatible. Like I said, if someone knows a free MineCraft skin that looks good I will include that (must be either GPL or Public Domain I believe).

If you want a texture until then, get the default skin from here, rename it to character.png, and put it in the same folder as the model. That will work out of the box.

I've done, but I see the same.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

rubenwardy wrote:Would this be compatible with this: http://minetest.net/forum/viewtopic.php?id=3587 ?
if it is not, i would be a good thing to see happen
Like I said on IRC, yes. The script function can customize each player at any time, and set visuals to anything. This means a player can choose any mesh or sprite, and set it to any texture (if a lua script for a visuals selector is also made). That would also allow using the sprite player MineTest had until now, or any other sprite... while someone else on the same server can be wearing the mesh.
OdnetninI wrote:I've done, but I see the same.
Weird, it works here. Make sure the texture is named "character.png" (lower case characters only) and is in the same folder as character.x (meaning the models folder). If not check the script, the image for the mesh is also specified there. Might mean something is broken locally for you.

OdnetninI
Member
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Post

all is correct. I don't know why it is making error. I'm goin to wait to improved version of these to make another test. Good Luck.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

We have a new default skin, which has been added to the GIT. Credits go to Jordach for making it. The texture is licensed as CC BY-SA 3.0 with specific permission for MineTest only. See the original here: http://www.planetminecraft.com/skin/greed-plaid-shirt/

Image

OdnetninI, please update minetest_game from my GIT and try it now. If you still get no texture it's a local bug and I don't know sadly.
Last edited by MirceaKitsune on Thu Nov 15, 2012 21:24, edited 1 time in total.

Doc
Member
Posts: 75
Joined: Sun Nov 04, 2012 00:21

by Doc » Post

Awesome! Now to add some new features like knockback, etc. It'll be good to see some nicer models.

User avatar
celeron55
Administrator
Posts: 533
Joined: Tue Apr 19, 2011 10:10
GitHub: celeron55
IRC: celeron55

by celeron55 » Post

MirceaKitsune wrote:with specific permission for MineTest only
That will make a lot of problems in terms of forks and whatnot. Only plain open licenses can go upstream.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

celeron55 wrote:That will make a lot of problems in terms of forks and whatnot. Only plain open licenses can go upstream.
Needs to be discussed with Jordach then, I'll ask him when he's back on IRC. If he's not ok with making it fully CC I'll ask someone else to make a new skin.

OdnetninI
Member
Posts: 38
Joined: Sun Oct 21, 2012 08:20

by OdnetninI » Post

Yes now it works, Thanks.

MirceaKitsune wrote:We have a new default skin, which has been added to the GIT. Credits go to Jordach for making it. The texture is licensed as CC BY-SA 3.0 with specific permission for MineTest only. See the original here: http://www.planetminecraft.com/skin/greed-plaid-shirt/

http://i50.tinypic.com/ic6337.png

OdnetninI, please update minetest_game from my GIT and try it now. If you still get no texture it's a local bug and I don't know sadly.

User avatar
babe223
Member
Posts: 141
Joined: Mon Nov 14, 2011 13:36
Location: Brasil,Rio de Janeiro

by babe223 » Post

how about this player skin for minetest
Image
site where I got the skin of the player
http://minecraft.novaskin.me/#http://i. ... /rx9jL.png
Bem vindos Brasileiros,eu sou primeiro brasileiro daqui do forum, espero que tragam bastante mods

[MOD] torch http://minetest.net/forum/viewtopic.php?id=3021
[MOD]HATCHE:http://minetest.net/forum/viewtopic.php?id=3458

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

babe223 wrote:how about this player skin for minetest
Image
site where I got the skin of the player
http://minecraft.novaskin.me/#http://i. ... /rx9jL.png
Is that skin explicitly under a free license? Doesn't look quite like the style we might want for a default player, but it is of good quality.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

Bumped protocol version in the code to fix connections for older clients. If I understand right, those who don't have the models code should now be able to connect to a server that does and at least see the old sprite players or not crash. No idea, needs to be tested.

Anyway, RealBadAngel decided to try these HD skins with the model, and posted these screenshots of what he got. Fun fun fun :)

Image Image

User avatar
Menche
Member
Posts: 1001
Joined: Sat Jul 02, 2011 00:43
IRC: Menchers
In-game: Menche
Location: An island in a lava lake.

by Menche » Post

Is there supposed to be a walking or digging animation? I'm not seeing any.
An innocent kitten dies every time you top-post.

User avatar
Mito551
Member
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Post

textures work neither for me.

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

MirceaKitsune wrote:
celeron55 wrote:That will make a lot of problems in terms of forks and whatnot. Only plain open licenses can go upstream.
Needs to be discussed with Jordach then, I'll ask him when he's back on IRC. If he's not ok with making it fully CC I'll ask someone else to make a new skin.
A) I planned on having it FOR ALL FORKS, that’s why it is CC 0 for Minetest only.
B) I will create a special metadata Version to id the GIT from PMC.

P.S Taoki, the left arms textures are flipped, do fix it.

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

Menche wrote:Is there supposed to be a walking or digging animation? I'm not seeing any.
They exist in the model, but new lua hooks and functions are needed to actually apply them based on what the player is doing.
Mito551 wrote:textures work neither for me.
If you have the latest code branch and minetest_game branch from GIT, it should work. Likely a local issue if not.
Jordach wrote: A) I planned on having it FOR ALL FORKS, that’s why it is CC 0 for Minetest only.
B) I will create a special metadata Version to id the GIT from PMC.

P.S Taoki, the left arms textures are flipped, do fix it.
From what I understand, the skin needs to be one license everywhere, or at least any license should be a free one (CC). So I think it's necessary to release it as one everywhere, without a special clause for MineTest.

An idea: If you don't want to release the whole skin under a free license, you could make some small modifications to the MineTest one so it's a different texture entirely. Like a tiny logo on the back of the shirt or something... not sure if that's a good idea.

And yeah... flipping the UV's properly is harder to test. I'll re-create the left arm from mirroring the right one. Are the leg UV's ok?

User avatar
Mito551
Member
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Post

works now... somewhy. anyway, thanks. from what you wrote it means that animations don't work at the moment, correct? what is needed for it to work?

User avatar
MirceaKitsune
Member
Posts: 936
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

Mito551 wrote:works now... somewhy. anyway, thanks. from what you wrote it means that animations don't work at the moment, correct? what is needed for it to work?
Animation does work, but you can only loop one animation currently. You can't change animations based on what the player is doing (walking, mining, etc) since there's no way to detect that. RealBadAngel is going to look at this... what's needed are script hooks to get the velocity of the player, or get what keys the player is pressing. Pressed keys is the best option IMO, but new hooks have to be implemented in C++

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests