Compare commits
5 Commits
c498cac8a1
...
10826d68cc
Author | SHA1 | Date |
---|---|---|
poikilos | 10826d68cc | |
poikilos | 24085ebbef | |
poikilos | 8f12d03154 | |
poikilos | eb98605845 | |
poikilos | d1d90e5466 |
|
@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a
|
||||
Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [git] - 2020-02-12
|
||||
### Changed
|
||||
- The UVs for the entire fabric part and inside are now, where
|
||||
applicable, square and aligned with pixels (as if the bag is made of a
|
||||
single piece of fabric).
|
||||
- The left side is aligned with the right side so that making or using
|
||||
an existing rectangular seamless texture is now possible (see
|
||||
"Re-texturing" in README.md)
|
||||
|
||||
## [git] - 2020-02-10
|
||||
### Added
|
||||
- Low-poly version: "prestibags_bag.blend"
|
||||
|
|
52
README.md
52
README.md
|
@ -11,6 +11,58 @@ interfere with any mods that do.
|
|||
- The model is much lighter, without sacrificing significant details.
|
||||
- The license is viable (see "License" below).
|
||||
|
||||
### Re-texturing
|
||||
The following assume a 256x256 texture resolution (the locations under
|
||||
"UV Map details" do not). Also, to avoid texture edge artifacts, the UV
|
||||
map is actually 2px shy of the outline of the texture (4px total on each
|
||||
dimension), so expect up to 2px of the textures below to be cropped if
|
||||
they touch the edge (fabric: 2px left, 2px right, 4px bottom). There
|
||||
will also be warping due to the bag shape, but due to the improved UV
|
||||
map, large text or decals will still be legible.
|
||||
- To add a decal, the following location will place it on the "front"
|
||||
(The side seen upon placing the bag; The height can be anything, but y
|
||||
may have to be adjusted for different heights):
|
||||
- `[combine:112x112:40,112=texture.png]`
|
||||
- To replace the entire "fabric" of the bag (including visible inner
|
||||
part of top):
|
||||
- `[combine:224x224:0,32=texture.png]`
|
||||
- To replace the entire "outside" of the bag (not visible inner part of
|
||||
top) like in a "full-bleed" wrap-around print on an IRL bag:
|
||||
- `[combine:224x192:0,64=texture.png]`
|
||||
- None of the above replace the "contents" of the bag. To replace that
|
||||
part:
|
||||
- `[combine:248x64:0,0=texture.png]`
|
||||
- To replace the entire rectangle that makes up the texture, including
|
||||
the contents and only excluding the rope, you can use
|
||||
any 224x256 image and place it at 0,0.
|
||||
- `[combine:224x256:0,0=texture.png]`
|
||||
|
||||
#### UV Map details
|
||||
- If you want a decal on the same side of the bag as the rope's ends,
|
||||
place it on the first 7/16ths of the image. However, since the rope
|
||||
is on the left when placed, a decal should probably be about 1/2 of
|
||||
the image width and centered at 7/16ths.
|
||||
- The left 7/8ths of the image is the bag.
|
||||
- The top 1/8th of the image is the contents of the bag.
|
||||
- The next 1/8th is the inside of the top part of the bag.
|
||||
- The other 6/8ths are the outside of the bag.
|
||||
- Including a bottom margin of 1/64.
|
||||
- The left edge of the region and right edge (at 7/8ths of width) are
|
||||
"sewn" together to make the "seam" of the bag.
|
||||
- Halfway between 0 and 7/8ths (which is 7/16ths) is the "fold"
|
||||
of the bag (At this division, the left part of the bottom is "sewn"
|
||||
to the right part of the bottom).
|
||||
- Rope:
|
||||
- The right 1/8th of the image is the rope, including a margin of 1/64.
|
||||
However, since the rope is a separate manifold object in the mesh
|
||||
file, the rope can be anywhere on the 3D model and be posed without
|
||||
negative effects.
|
||||
- The rope is currently over the left part of the bag relative to
|
||||
the halves described above, but this can be changed in future
|
||||
revisions.
|
||||
- The specifications above should remain the same for any future
|
||||
revisions of the UV map in the 3d model files.
|
||||
|
||||
## Main Features
|
||||
- Retain their inventory when picked up or unloaded/reloaded by the
|
||||
server.
|
||||
|
|
6
init.lua
6
init.lua
|
@ -150,7 +150,7 @@ entityInv = minetest.create_detached_inventory(
|
|||
|
||||
local function bag_envUpdate(self, dt)
|
||||
end
|
||||
|
||||
prestibags_bag_collisionbox = {-0.33, 0.00, -0.33, 0.33, 0.64, 0.33}
|
||||
minetest.register_entity(
|
||||
"prestibags:bag_entity",
|
||||
{
|
||||
|
@ -158,7 +158,7 @@ minetest.register_entity(
|
|||
{
|
||||
hp_max = BAG_MAX_HP,
|
||||
physical = false,
|
||||
collisionbox = { -0.44, -0.5, -0.425, 0.44, 0.35, 0.425 },
|
||||
collisionbox = prestibags_bag_collisionbox,
|
||||
visual = "mesh",
|
||||
visual_size = { x = 1, y = 1 },
|
||||
mesh = "prestibags_bag.b3d",
|
||||
|
@ -398,7 +398,7 @@ minetest.register_tool(
|
|||
nodeType = node and minetest.registered_nodes[node.name]
|
||||
end
|
||||
if not pos then pos = player:getpos() end
|
||||
|
||||
pos.y = pos.y - .5
|
||||
return rezEntity(stack, pos, player)
|
||||
end,
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 34 KiB |
Loading…
Reference in New Issue