Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ along with the property that takes the normal map:

A theme whose material has no normal map empties the normal map property: the
bumps of the starter's texture would not match the theme's. A theme model keeps
the other properties of the object, like the size of the scattered copies.
the other properties of the object, like the density of the scattered copies.
Custom objects don't have to be mapped, except those drawing a 3D model (like
scattered models), which are mapped or listed in `ignoredObjects` like 3D
models. The children of a custom object that are 3D models or cubes are mapped
Expand Down Expand Up @@ -147,6 +147,57 @@ only offered once its copies are there.
A theme only re-skins what it has an asset for. Anything else keeps the
starter's placeholder art.

A theme model takes the place of the placeholder as drawn in the starter, at
the size its slot means. Each model slot of the root `theme-slots.json` says
it with `fit`:

- `height`: the model is as tall as the placeholder (characters, trees,
grass), so a player is never a giant or a dwarf next to the level. The
character slots also have a `scale` of 1.2: a person is much thinner than
the capsule standing for it, and looks smaller at the same height;
- `length`: the model is as long as the placeholder (vehicles), so a truck
fills the lane of a car;
- `volume`: the model takes the volume of the placeholder (projectiles, rocks),
for objects whose shape varies a lot: a ball in the place of a missile, a
boulder in the place of a flat rock;
- `contain`: the model is as large as it fits in the *room* of the object
(props, buildings...), so it never overlaps what stands next to it. Models
don't all face the same direction: a prop is fit whichever way it faces.

This uses the real dimensions of the theme model, published with the themes,
and the size of the placeholder model (its `.glb`) as drawn in its object. The
same goes for an instance given its own size, and for the copies of scattered
models (their "Height of a copy" changes for a model not sized by its height).

The room of an object is its size (width, height and depth). A model keeping
its proportions is drawn as large as it fits in it, and its object takes that
size in the game, so the room can be larger than the placeholder on an axis it
does not fill, without changing the starter. Give the room a theme model may
need: the market of the RTS is flat, but a house can stand where it is, so its
object is as deep as it is wide; the gun of the FPS is thin, but a blaster is
not.

Slots are split by shape when objects of one role differ too much: a
`prop.obstacle` (a cone) and a `prop.barrier` (a long barrier), a
`building.house` and a `building.tower`. Their descriptions say the shape a
theme should give them.

A model of another shape than its placeholder (a squarish house on a long
lot) ends up much smaller, and the build reports it, along with a vehicle much
broader than its placeholder (and the themes giving no real dimensions, whose
models are sized by the volume of the placeholder object):

```
⚠️ starting-expanded-3d-grand-theft-auto: scene:Game Scene/Building_K
(building.house, sized by contain) is drawn at a size far from its placeholder
with 26 themes: battle-royale (60% of the largest dimension of the placeholder), ...
```

It is not an error, but it says what is to fix: a placeholder with too little
room, a slot grouping objects of too different shapes, or a theme model of the
wrong shape. A theme can also give a model a `scale` (0.5 to 2, see the assets
repository) to draw it larger or smaller on purpose: that is not reported.

The copies are rebuilt on every deploy of this repository, and every night by
the `nightly-rebuild` workflow of the CircleCI configuration, which is how they
catch up with a theme or an asset published by the assets repository. A new
Expand Down
4 changes: 2 additions & 2 deletions examples/starting-expanded-3d-car-racing/theme-slots.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"top": "env.finish",
"bottom": "env.finish"
},
"scene:Game Scene/Barrier": "prop.obstacle",
"scene:Game Scene/BarrierRed": "prop.obstacle",
"scene:Game Scene/Barrier": "prop.barrier",
"scene:Game Scene/BarrierRed": "prop.barrier",
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
Expand Down
10 changes: 5 additions & 5 deletions examples/starting-expanded-3d-driving/theme-slots.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"scene:Game Scene/Road_3D": "env.road",
"scene:Game Scene/PlayerCar": "vehicle.car",
"scene:Game Scene/TrafficCone": "prop.obstacle",
"scene:Game Scene/Barrier": "prop.obstacle",
"scene:Game Scene/House_A": "building.tower",
"scene:Game Scene/House_B": "building.tower",
"scene:Game Scene/House_C": "building.tower",
"scene:Game Scene/House_D": "building.tower",
"scene:Game Scene/Barrier": "prop.barrier",
"scene:Game Scene/House_A": "building.house",
"scene:Game Scene/House_B": "building.house",
"scene:Game Scene/House_C": "building.house",
"scene:Game Scene/House_D": "building.house",
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/starting-expanded-3d-flight-sim/theme-slots.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
"scene:Game Scene/House": "building.tower",
"scene:Game Scene/House": "building.house",
"scene:Game Scene/Terrain": {
"Layer1Texture": {
"slot": "terrain.ground",
Expand Down
20 changes: 10 additions & 10 deletions examples/starting-expanded-3d-grand-theft-auto/theme-slots.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"scene:Game Scene/Car": "vehicle.car",
"scene:Game Scene/Driven_Car": "vehicle.car",
"scene:Game Scene/PushableBox": "env.crate",
"scene:Game Scene/Building_A": "building.tower",
"scene:Game Scene/Building_C": "building.tower",
"scene:Game Scene/Building_E": "building.tower",
"scene:Game Scene/Building_A": "building.house",
"scene:Game Scene/Building_C": "building.house",
"scene:Game Scene/Building_E": "building.house",
"scene:Game Scene/Building_G": "building.tower",
"scene:Game Scene/Building_H": "building.tower",
"scene:Game Scene/Building_K": "building.tower",
"scene:Game Scene/Building_H": "building.house",
"scene:Game Scene/Building_K": "building.house",
"scene:Game Scene/Skyscraper_A": "building.tower",
"scene:Game Scene/Skyscraper_C": "building.tower",
"scene:Game Scene/Skyscraper_E": "building.tower",
"scene:Game Scene/House_A": "building.tower",
"scene:Game Scene/House_D": "building.tower",
"scene:Game Scene/House_N": "building.tower",
"scene:Game Scene/House_T": "building.tower",
"scene:Game Scene/House_A": "building.house",
"scene:Game Scene/House_D": "building.house",
"scene:Game Scene/House_N": "building.house",
"scene:Game Scene/House_T": "building.house",
"scene:Game Scene/Cone": "prop.obstacle",
"scene:Game Scene/Barrier": "prop.obstacle",
"scene:Game Scene/Barrier": "prop.barrier",
"scene:Game Scene/TownTree": "nature.tree",
"scene:Game Scene/PineForest": {
"Model": "nature.tree"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@
"content": {
"centerLocation": "BottomCenterZ",
"crossfadeDuration": 0,
"depth": 102.1,
"depth": 225,
"height": 225.4,
"isCastingShadow": true,
"isReceivingShadow": true,
Expand Down Expand Up @@ -1598,7 +1598,7 @@
"content": {
"centerLocation": "BottomCenterZ",
"crossfadeDuration": 0,
"depth": 145.4,
"depth": 269,
"height": 280,
"isCastingShadow": true,
"isReceivingShadow": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"objects": {
"scene:Game Scene/RTSUnit": "character.player",
"scene:Game Scene/Grass": "nature.grass",
"scene:Game Scene/TownCenter": "building.tower",
"scene:Game Scene/House": "building.tower",
"scene:Game Scene/HouseTall": "building.tower",
"scene:Game Scene/HouseSmall": "building.tower",
"scene:Game Scene/Barracks": "building.tower",
"scene:Game Scene/Market": "building.tower",
"scene:Game Scene/Storage": "building.tower",
"scene:Game Scene/TownCenter": "building.house",
"scene:Game Scene/House": "building.house",
"scene:Game Scene/HouseTall": "building.house",
"scene:Game Scene/HouseSmall": "building.house",
"scene:Game Scene/Barracks": "building.house",
"scene:Game Scene/Market": "building.house",
"scene:Game Scene/Storage": "building.house",
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/starting-expanded-3d-tank/theme-slots.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"object:TankConfiguration::CombinedTank/TankBase": "vehicle.tank.base",
"object:TankConfiguration::TankTop/TankTop": "vehicle.tank.turret",
"object:TankConfiguration::TankTop/TankCanon": "vehicle.tank.cannon",
"scene:Game Scene/SackTrench": "prop.obstacle",
"scene:Game Scene/Container": "prop.container",
"scene:Game Scene/SackTrench": "prop.barrier",
"scene:Game Scene/Container": "prop.barrier",
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/starting-expanded-3d-top-down-rpg/theme-slots.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"scene:Game Scene/GrassTufts": {
"Model": "nature.grass"
},
"scene:Game Scene/House": "building.tower",
"scene:Game Scene/HouseLarge": "building.tower",
"scene:Game Scene/Inn": "building.tower",
"scene:Game Scene/Blacksmith": "building.tower",
"scene:Game Scene/House": "building.house",
"scene:Game Scene/HouseLarge": "building.house",
"scene:Game Scene/Inn": "building.house",
"scene:Game Scene/Blacksmith": "building.house",
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"scene:Game Scene/Beet": "crop.b",
"scene:Game Scene/Harvest_Seed_Beet": "prop.container",
"scene:Game Scene/Harvest_Seed_Carrot": "prop.container",
"scene:Game Scene/Barn": "building.tower",
"scene:Game Scene/SmallBarn": "building.tower",
"scene:Game Scene/ChickenCoop": "building.tower",
"scene:Game Scene/Barn": "building.house",
"scene:Game Scene/SmallBarn": "building.house",
"scene:Game Scene/ChickenCoop": "building.house",
"scene:Game Scene/Trees": {
"Model": "nature.tree"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"objects": {
"scene:Game Scene/PushableBox": "env.crate",
"scene:Game Scene/Monster": "character.monster",
"scene:Game Scene/Cabin": "building.tower",
"scene:Game Scene/Cabin": "building.house",
"scene:Game Scene/PineTrees": {
"Model": "nature.tree"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@
"centerLocation": "ModelOrigin",
"crossfadeDuration": 0.10000000149011612,
"depth": 415.9,
"height": 153.9,
"height": 600,
"isCastingShadow": false,
"isReceivingShadow": false,
"keepAspectRatio": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"scene:Game Scene/PushableBox": "env.crate",
"scene:Game Scene/Enemy": "character.enemy",
"scene:Game Scene/Gun": "weapon.handheld",
"scene:Game Scene/Sandbags": "prop.obstacle",
"scene:Game Scene/Barrier": "prop.obstacle",
"scene:Game Scene/Container": "prop.container",
"scene:Game Scene/Sandbags": "prop.barrier",
"scene:Game Scene/Barrier": "prop.barrier",
"scene:Game Scene/Container": "prop.barrier",
"scene:Game Scene/Crate": "prop.container",
"scene:Game Scene/Rock": "nature.rock.big",
"scene:Game Scene/SmallRocks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@
"centerLocation": "ModelOrigin",
"crossfadeDuration": 0.10000000149011612,
"depth": 415.9,
"height": 153.9,
"height": 600,
"isCastingShadow": false,
"isReceivingShadow": false,
"keepAspectRatio": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"scene:Game Scene/PushableBox": "env.crate",
"scene:Game Scene/Monster": "character.monster",
"scene:Game Scene/Gun": "weapon.handheld",
"scene:Game Scene/Crypt": "building.tower",
"scene:Game Scene/CryptSmall": "building.tower",
"scene:Game Scene/Crypt": "building.house",
"scene:Game Scene/CryptSmall": "building.house",
"scene:Game Scene/PineTrees": {
"Model": "nature.tree"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"scene:Game Scene/FallenLog": "resource.log",
"scene:Game Scene/Stump": "nature.rock.small",
"scene:Game Scene/Tent": "building.tower",
"scene:Game Scene/Tent": "building.house",
"scene:Game Scene/Terrain": {
"Layer1Texture": {
"slot": "terrain.ground",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@
"centerLocation": "ModelOrigin",
"crossfadeDuration": 0.10000000149011612,
"depth": 415.9,
"height": 153.9,
"height": 600,
"isCastingShadow": false,
"isReceivingShadow": false,
"keepAspectRatio": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@
"centerLocation": "ModelOrigin",
"crossfadeDuration": 0.10000000149011612,
"depth": 415.9,
"height": 153.9,
"height": 600,
"isCastingShadow": false,
"isReceivingShadow": false,
"keepAspectRatio": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@
"centerLocation": "ModelOrigin",
"crossfadeDuration": 0.10000000149011612,
"depth": 415.95,
"height": 153.89,
"height": 600,
"isCastingShadow": false,
"isReceivingShadow": false,
"keepAspectRatio": true,
Expand Down
Loading
Loading