Page 1 of 2
[Mod] 3D Players [3d_player]

Posted:
Thu Nov 01, 2012 13:28
by PilzAdam
Hello everyone!
This mod adds simple 3D, 1px thick players.
Screenshots:
License:See
README.txt.
Dependencies:None.
GitHub:https://github.com/PilzAdam/3d_playerDownload:https://github.com/PilzAdam/3d_player/zipball/master

Posted:
Thu Nov 01, 2012 14:08
by rubenwardy
Awesome, and they said it was not possible in Lua...
Do you have any screen shots?

Posted:
Thu Nov 01, 2012 14:29
by PilzAdam
rubenwardy wrote:Do you have any screen shots?
Its just the default player textures.

Posted:
Thu Nov 01, 2012 14:35
by Jordach
WINNING!

Posted:
Thu Nov 01, 2012 14:38
by rubenwardy
PilzAdam wrote:rubenwardy wrote:Do you have any screen shots?
Its just the default player textures.
As in, how the player look to other players, like this:
http://krisi12345.lima-city.de/Screen-Pics/3D-Player.png

Posted:
Thu Nov 01, 2012 14:51
by PilzAdam
Screenshots added.

Posted:
Thu Nov 01, 2012 15:30
by BrandonReese
Could this be used to set different textures for each player on the server, or do they all have to be the same?

Posted:
Thu Nov 01, 2012 15:41
by PilzAdam
BrandonReese wrote:Could this be used to set different textures for each player on the server, or do they all have to be the same?
Nice idea, I will test it.

Posted:
Thu Nov 01, 2012 16:03
by PilzAdam
BrandonReese wrote:Could this be used to set different textures for each player on the server, or do they all have to be the same?
http://minetest.net/forum/viewtopic.php?id=3587But its not compatible with this mod.

Posted:
Thu Nov 01, 2012 16:21
by MirceaKitsune
This is a good idea, until my 3D models code will be ready. Hope all important servers will install it in the meantime, the fully flat players are weird :P

Posted:
Thu Nov 01, 2012 16:49
by BrandonReese
It would work if you defined a nodebox for each player texture.
- Offer 2,3,4 or so textures, define nodeboxes for all
- Use chat commands (ie /settexture 1), or special blocks they can punch to allow player to select texture
- Save the name or number of the texture they selected to file
- When they log in get the texture they selected from file
- set their texture to appropriate nodebox

Posted:
Thu Nov 01, 2012 17:02
by PilzAdam
BrandonReese wrote:- Offer 2,3,4 or so textures, define nodeboxes for all
You know that I worked 30 mins. on this nodebox?

Posted:
Thu Nov 01, 2012 17:37
by BrandonReese
PilzAdam wrote:BrandonReese wrote:- Offer 2,3,4 or so textures, define nodeboxes for all
You know that I worked 30 mins. on this nodebox?
That's a big time investment

Posted:
Thu Nov 01, 2012 18:38
by Mito551
do this for your mobs, maybe, please?

Posted:
Thu Nov 01, 2012 18:43
by PilzAdam
Mito551 wrote:do this for your mobs, maybe, please?
Maybe...

Posted:
Thu Nov 01, 2012 18:46
by terminalerror
Yes, please do this for mobs! Sheep are not meant to be flat...

Posted:
Thu Nov 01, 2012 19:37
by Mito551
terminalerror wrote:Yes, please do this for mobs! Sheep are not meant to be flat...
rats bug me more...

Posted:
Fri Nov 02, 2012 02:06
by Josh
This look's cool! great job PilzAdam. I thought i could only be made in c++ how did you make it in lua?

Posted:
Fri Nov 02, 2012 07:00
by sfan5
Nice Mod!
You could make real 3d players with this

Posted:
Fri Nov 02, 2012 09:14
by PilzAdam
Josh wrote:This look's cool! great job PilzAdam. I thought i could only be made in c++ how did you make it in lua?
With the same "wielditem" hack as for animals. You can use player:set_object_proberties() to change the visuals of the player (somehow like Lua entities).

Posted:
Fri Nov 02, 2012 09:14
by PilzAdam
sfan5 wrote:Nice Mod!
You could make real 3d players with this
Without animation...

Posted:
Fri Nov 02, 2012 13:03
by breinzter11
Do you have another texture ??

Posted:
Fri Nov 02, 2012 13:06
by PilzAdam
breinzter11 wrote:Do you have another texture ??
With other textures you have to change the nodebox. Its easy (but very time intensive) so you can do it yourself. Go to the init.lua and put a 1 in the 2D table at the top for every pixel that is not transparent and a 0 for transparent pixels.

Posted:
Fri Nov 02, 2012 13:14
by breinzter11
i got error

Posted:
Fri Nov 02, 2012 13:15
by PilzAdam
breinzter11 wrote:i got error
This post is not very useful. Try to give more information.

Posted:
Fri Nov 02, 2012 15:28
by BrandonReese
PilzAdam,
I was working on multiple textures for your 3d players. I noticed the player texture is 'squished' from 32x64 to 32x32. How would I use a 32x64 texture? I setup a couple different textures, setting up the 2d table pixel for pixel (32x64) that had odd results, so I made the textures 32x32 but they lose any detail once they are stretched in game. With this method am I stuck using 32x32 textures and having the game stretch them?

Posted:
Fri Nov 02, 2012 15:53
by PilzAdam
The code first creates a node that has the texture and the nodebox and then a entity that has drawtype "wielditem" and is set to the node.
A node needs square textures so I resized the 16x32 texture to 32x32. You should also choose the higher width/height to not loose pixels. The table for the nodebox has to be done for this resized texture.
If you use higher resolutions you may have to change some other parts of the code.
Feel free to ask me if you have any questions.

Posted:
Fri Nov 02, 2012 16:44
by BrandonReese
PilzAdam wrote:The code first creates a node that has the texture and the nodebox and then a entity that has drawtype "wielditem" and is set to the node.
A node needs square textures so I resized the 16x32 texture to 32x32. You should also choose the higher width/height to not loose pixels. The table for the nodebox has to be done for this resized texture.
If you use higher resolutions you may have to change some other parts of the code.
Feel free to ask me if you have any questions.
Ok I think I know what I did wrong now. Thank you.

Posted:
Sat Nov 03, 2012 00:33
by cornernote
can you make 2 other nodeboxes, the same but with the legs and arms moved a little forward? Then when pos is changing, swap the nodeboxes so it looks like walking is animated.

Posted:
Sat Nov 03, 2012 02:07
by Josh
PilzAdam wrote:Josh wrote:This look's cool! great job PilzAdam. I thought i could only be made in c++ how did you make it in lua?
With the same "wielditem" hack as for animals. You can use player:set_object_proberties() to change the visuals of the player (somehow like Lua entities).
Would it be possible to have animations to the 3d player? for example a turning head.