[Mod] 3D Players [3d_player]
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
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?
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?
My Twitch Channel - https://www.twitch.tv/brandonreese81/profile
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
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.
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.
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
Ok I think I know what I did wrong now. Thank you.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.
My Twitch Channel - https://www.twitch.tv/brandonreese81/profile
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
Would it be possible to have animations to the 3d player? for example a turning head.PilzAdam wrote: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).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?
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
- Neuromancer
- Member
- Posts: 964
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
Can you make them any thicker, say like 5 pixels thick?
Mods:Immersive Sounds
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
You can change it yourself:Neuromancer wrote:Can you make them any thicker, say like 5 pixels thick?
Code: Select all
--- 3d_player/init.lua 2012-11-03 14:09:51.542665223 +0100
+++ 3d_player_thick/init.lua 2012-11-03 14:09:18.406664423 +0100
@@ -40,7 +40,7 @@ for i=1,#pix do
if pix[i][j] == 1 then
local y = (i-16)*-1+1
local x = j-16
- table.insert(box, {(x-1)/32, (y-1)/32, -0.5/32, x/32, y/32, 0.5/32})
+ table.insert(box, {(x-1)/32, (y-1)/32, -2.5/32, x/32, y/32, 2.5/32})
end
end
end
- terminalerror
- Member
- Posts: 33
- Joined: Tue Oct 30, 2012 22:46
- Location: The Sar-Chasm
Oh man! Could you please implement this in your simple mobs mod?PilzAdam wrote:You can change it yourself:Neuromancer wrote:Can you make them any thicker, say like 5 pixels thick?Code: Select all
--- 3d_player/init.lua 2012-11-03 14:09:51.542665223 +0100 +++ 3d_player_thick/init.lua 2012-11-03 14:09:18.406664423 +0100 @@ -40,7 +40,7 @@ for i=1,#pix do if pix[i][j] == 1 then local y = (i-16)*-1+1 local x = j-16 - table.insert(box, {(x-1)/32, (y-1)/32, -0.5/32, x/32, y/32, 0.5/32}) + table.insert(box, {(x-1)/32, (y-1)/32, -2.5/32, x/32, y/32, 2.5/32}) end end end
ERROR[main]: ModError: Failed to load and run a sarcastic remark.
- InfinityProject
- Member
- Posts: 1009
- Joined: Sat Mar 17, 2012 00:52
- Location: World of Infinity, US
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
There are at least two nodebox editors out there: http://minetest.net/forum/viewtopic.php?id=2840 from rubenwardy and
http://minetest.net/forum/viewtopic.php?id=3162 from sapier. Maybe you can get one of them running.
http://minetest.net/forum/viewtopic.php?id=3162 from sapier. Maybe you can get one of them running.
A list of my mods can be found here.
- InfinityProject
- Member
- Posts: 1009
- Joined: Sat Mar 17, 2012 00:52
- Location: World of Infinity, US
Here's a nodebox for a "somewhat minecraft" shape. This has not been tested so I don't know what it looks like yet.
Code: Select all
local pix = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8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,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0},
}
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
After experimenting a bit with sapiers Wielditem editor I came up with this:
The texture is that of wood (I'm not good at textures!). The collection of nodeboxes is modelled after the image of players on Redcrabs server combined with the default green shape. It looks a bit as if the players are severely undernourished. The image above was taken on the testserver of King Arthurs Land (difficult to do in singleplayer) and works fine if inserted into PilzAdam's mod here.
Can someone come up with a texture for it? Or improve the model? The wood texture doesn't look that great...
You can find the model and a working modified version of PilzAdams mod here: https://github.com/Sokomine/3d_player
The texture is that of wood (I'm not good at textures!). The collection of nodeboxes is modelled after the image of players on Redcrabs server combined with the default green shape. It looks a bit as if the players are severely undernourished. The image above was taken on the testserver of King Arthurs Land (difficult to do in singleplayer) and works fine if inserted into PilzAdam's mod here.
Can someone come up with a texture for it? Or improve the model? The wood texture doesn't look that great...
You can find the model and a working modified version of PilzAdams mod here: https://github.com/Sokomine/3d_player
A list of my mods can be found here.
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
I don't think copying Minecraft would be such a good idea. Plus the Minecraft player is a figure that is much simpler in construction. I'm afraid it won't look good as a static model. Arms, legs, head...none of these can move yet! For that we'll need the patches MirceaKitsune is working on. But if you really want a character that looks like the one in Minecraft then get the wielditem editor and construct your own set of nodeboxes :-) It's not that difficult.
A list of my mods can be found here.
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
No. But Taoki's 3D player branch includes attachment (anchor) code. I have made a branch of my carts mod that uses this. To test it you have to compile Taoki's 3D player branch and install the attachment branch of my carts mod. Its realy aweseome!jordan4ibanez wrote:Can you anchor entities to other entities either through lua or some strange lua hack?
Some people is still on 0.4.3PilzAdam wrote:This mod is rather useless since 0.4.4-dev has real 3D models.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).
See also the MT-Faithful texture pack (work in progress).
Who is online
Users browsing this forum: No registered users and 9 guests