FBC: NIGHT SHIFT - fixed actor facing and the launch-path crash, and added the Hiss Ghost enemy
This commit is contained in:
parent
a3d06e30c7
commit
46ab750256
18 changed files with 126 additions and 64 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/models/hiss_ghost.glb
Normal file
BIN
assets/models/hiss_ghost.glb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 622 KiB After Width: | Height: | Size: 607 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 589 KiB After Width: | Height: | Size: 577 KiB |
|
|
@ -7,6 +7,7 @@ namespace {
|
|||
constexpr SpawnCard kCards[] = {
|
||||
{EnemyType::MoldSpore, 6.0f, 15.0f},
|
||||
{EnemyType::HissStaff, 10.0f, 0.0f},
|
||||
{EnemyType::HissGhost, 8.0f, 0.0f},
|
||||
{EnemyType::HissBrute, 30.0f, 40.0f},
|
||||
};
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ void Director::update(float dt, const Corruption& corruption, float run_time,
|
|||
|
||||
if (pick == nullptr) {
|
||||
// Normal case: affordable cards, weighted away from too-cheap ones.
|
||||
const SpawnCard* candidates[3] = {};
|
||||
const SpawnCard* candidates[4] = {};
|
||||
const SpawnCard* cheapest = nullptr;
|
||||
int candidate_count = 0;
|
||||
for (const SpawnCard& card : kCards) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ const EnemyDef& enemy_def(EnemyType type) {
|
|||
{"Hiss Corrupted Staff", 34.0f, 3.4f, 9.0f, 0.75f, 1.0f},
|
||||
{"Mold Spore", 16.0f, 6.2f, 6.0f, 0.55f, 1.0f},
|
||||
{"Hiss Brute", 120.0f, 2.4f, 18.0f, 1.15f, 4.0f},
|
||||
{"Hiss Ghost", 24.0f, 4.6f, 7.0f, 0.70f, 1.5f},
|
||||
};
|
||||
return defs[static_cast<int>(type)];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include "game/corruption.hpp"
|
||||
#include "game/player.hpp"
|
||||
|
||||
enum class EnemyType { HissStaff, MoldSpore, HissBrute };
|
||||
enum class EnemyType { HissStaff, MoldSpore, HissBrute, HissGhost };
|
||||
|
||||
struct EnemyDef {
|
||||
const char* name;
|
||||
|
|
|
|||
29
src/main.cpp
29
src/main.cpp
|
|
@ -7,6 +7,7 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
|
|
@ -100,40 +101,38 @@ int main(int argc, char** argv) {
|
|||
const int bloom_h = GetScreenHeight() / 2;
|
||||
RenderTexture2D bloom_a = LoadRenderTexture(bloom_w, bloom_h);
|
||||
RenderTexture2D bloom_b = LoadRenderTexture(bloom_w, bloom_h);
|
||||
auto shader_path_for = [](const char* rel) -> const char* {
|
||||
auto shader_path_for = [](const char* rel) -> std::string {
|
||||
if (FileExists(rel)) return rel;
|
||||
static char buf[3][512];
|
||||
static int slot = 0;
|
||||
char* out = buf[slot++ % 3];
|
||||
std::snprintf(out, 512, "%s../%s", GetApplicationDirectory(), rel);
|
||||
return FileExists(out) ? out : nullptr;
|
||||
char path[512];
|
||||
std::snprintf(path, sizeof(path), "%s../%s", GetApplicationDirectory(), rel);
|
||||
return FileExists(path) ? path : std::string();
|
||||
};
|
||||
Shader bright_shader{};
|
||||
Shader blur_shader{};
|
||||
bool bloom_ok = false;
|
||||
if (const char* p = shader_path_for("assets/shaders/bloom_bright.fs")) {
|
||||
bright_shader = LoadShader(nullptr, p);
|
||||
if (const std::string p = shader_path_for("assets/shaders/bloom_bright.fs"); !p.empty()) {
|
||||
bright_shader = LoadShader(nullptr, p.c_str());
|
||||
bloom_ok = bright_shader.id != 0;
|
||||
}
|
||||
if (const char* p = shader_path_for("assets/shaders/bloom_blur.fs")) {
|
||||
blur_shader = LoadShader(nullptr, p);
|
||||
if (const std::string p = shader_path_for("assets/shaders/bloom_blur.fs"); !p.empty()) {
|
||||
blur_shader = LoadShader(nullptr, p.c_str());
|
||||
bloom_ok = bloom_ok && blur_shader.id != 0;
|
||||
}
|
||||
const int loc_blur_dir = bloom_ok
|
||||
? GetShaderLocation(blur_shader, "uDirection") : -1;
|
||||
|
||||
const char* shader_path = FileExists("assets/shaders/post_fx.fs")
|
||||
const std::string shader_path = FileExists("assets/shaders/post_fx.fs")
|
||||
? "assets/shaders/post_fx.fs"
|
||||
: TextFormat("%s../assets/shaders/post_fx.fs", GetApplicationDirectory());
|
||||
: std::string(GetApplicationDirectory()) + "../assets/shaders/post_fx.fs";
|
||||
Shader post_shader{};
|
||||
bool post_ok = FileExists(shader_path);
|
||||
bool post_ok = FileExists(shader_path.c_str());
|
||||
if (post_ok) {
|
||||
post_shader = LoadShader(nullptr, shader_path);
|
||||
post_shader = LoadShader(nullptr, shader_path.c_str());
|
||||
post_ok = post_shader.id != 0;
|
||||
}
|
||||
if (!post_ok) {
|
||||
TraceLog(LOG_WARNING, "POST: %s missing, rendering without post FX",
|
||||
shader_path);
|
||||
shader_path.c_str());
|
||||
}
|
||||
const int loc_time = GetShaderLocation(post_shader, "uTime");
|
||||
const int loc_corruption = GetShaderLocation(post_shader, "uCorruption");
|
||||
|
|
|
|||
|
|
@ -4,26 +4,27 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
namespace {
|
||||
|
||||
const char* resolve(const char* rel) {
|
||||
std::string resolve(const char* rel) {
|
||||
if (FileExists(rel)) return rel;
|
||||
static char path[512];
|
||||
char path[512];
|
||||
std::snprintf(path, sizeof(path), "%s../%s", GetApplicationDirectory(), rel);
|
||||
return FileExists(path) ? path : nullptr;
|
||||
return FileExists(path) ? path : std::string();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void CorruptionAura::init() {
|
||||
const char* vs = resolve("assets/shaders/aura.vs");
|
||||
const char* fs = resolve("assets/shaders/aura.fs");
|
||||
if (vs == nullptr || fs == nullptr) {
|
||||
const std::string vs = resolve("assets/shaders/aura.vs");
|
||||
const std::string fs = resolve("assets/shaders/aura.fs");
|
||||
if (vs.empty() || fs.empty()) {
|
||||
TraceLog(LOG_WARNING, "AURA: wave shader missing, ground waves disabled");
|
||||
return;
|
||||
}
|
||||
shader_ = LoadShader(vs, fs);
|
||||
shader_ = LoadShader(vs.c_str(), fs.c_str());
|
||||
if (shader_.id == 0) {
|
||||
TraceLog(LOG_WARNING, "AURA: wave shader failed to compile");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -5,23 +5,24 @@
|
|||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
namespace {
|
||||
|
||||
const char* resolve(const char* rel) {
|
||||
std::string resolve(const char* rel) {
|
||||
if (FileExists(rel)) return rel;
|
||||
static char path[512];
|
||||
char path[512];
|
||||
std::snprintf(path, sizeof(path), "%s../%s", GetApplicationDirectory(), rel);
|
||||
return FileExists(path) ? path : nullptr;
|
||||
return FileExists(path) ? path : std::string();
|
||||
}
|
||||
|
||||
Texture2D load_map(const char* name) {
|
||||
const char* path = resolve(name);
|
||||
if (path == nullptr) {
|
||||
const std::string path = resolve(name);
|
||||
if (path.empty()) {
|
||||
TraceLog(LOG_WARNING, "CONCRETE: %s missing", name);
|
||||
return Texture2D{};
|
||||
}
|
||||
Texture2D tex = LoadTexture(path);
|
||||
Texture2D tex = LoadTexture(path.c_str());
|
||||
SetTextureFilter(tex, TEXTURE_FILTER_ANISOTROPIC_8X);
|
||||
SetTextureWrap(tex, TEXTURE_WRAP_REPEAT);
|
||||
return tex;
|
||||
|
|
@ -73,18 +74,18 @@ void ConcreteMaterial::add_box(Vector3 center, Vector3 size, float rough_mult) {
|
|||
}
|
||||
|
||||
void ConcreteMaterial::init(float arena) {
|
||||
const char* vs = resolve("assets/shaders/concrete.vs");
|
||||
const char* fs = resolve("assets/shaders/concrete.fs");
|
||||
const std::string vs = resolve("assets/shaders/concrete.vs");
|
||||
const std::string fs = resolve("assets/shaders/concrete.fs");
|
||||
albedo_ = load_map("assets/textures/concrete/concrete_albedo.png");
|
||||
normal_ = load_map("assets/textures/concrete/concrete_normal.png");
|
||||
roughness_ = load_map("assets/textures/concrete/concrete_roughness.png");
|
||||
|
||||
if (vs == nullptr || fs == nullptr || albedo_.id == 0 || normal_.id == 0
|
||||
if (vs.empty() || fs.empty() || albedo_.id == 0 || normal_.id == 0
|
||||
|| roughness_.id == 0) {
|
||||
TraceLog(LOG_WARNING, "CONCRETE: assets missing, falling back to flat colours");
|
||||
return;
|
||||
}
|
||||
shader_ = LoadShader(vs, fs);
|
||||
shader_ = LoadShader(vs.c_str(), fs.c_str());
|
||||
if (shader_.id == 0) {
|
||||
TraceLog(LOG_WARNING, "CONCRETE: shader compile failed");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,15 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
namespace {
|
||||
|
||||
// Same resolution strategy as the old sprite loader: repo root first (running
|
||||
// ./build/cntrl), then a path relative to the executable.
|
||||
const char* resolve(const char* rel) {
|
||||
std::string resolve(const char* rel) {
|
||||
if (FileExists(rel)) return rel;
|
||||
static char path[512];
|
||||
char path[512];
|
||||
std::snprintf(path, sizeof(path), "%s../%s", GetApplicationDirectory(), rel);
|
||||
return FileExists(path) ? path : nullptr;
|
||||
return FileExists(path) ? path : std::string();
|
||||
}
|
||||
|
||||
// hipY, shoulderY, legX, armX — rough rig pivots per actor (model-local metres).
|
||||
|
|
@ -31,6 +30,7 @@ Rig rig_for(ActorModel id) {
|
|||
case ActorModel::Guard: return {0.90f, 1.45f, 0.18f, 0.43f, 1.0f, 1.0f};
|
||||
case ActorModel::HissStaff: return {0.60f, 1.40f, 0.20f, 0.38f, 0.85f, 1.0f};
|
||||
case ActorModel::HissBrute: return {1.05f, 2.10f, 0.40f, 0.95f, 1.0f, 1.0f};
|
||||
case ActorModel::HissGhost: return {0.60f, 1.35f, 0.22f, 0.36f, 0.9f, 1.0f};
|
||||
case ActorModel::MoldSpore: return {0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 2.0f};
|
||||
case ActorModel::Shard: return {0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 3.0f};
|
||||
default: return {};
|
||||
|
|
@ -40,10 +40,10 @@ Rig rig_for(ActorModel id) {
|
|||
} // namespace
|
||||
|
||||
void ModelBank::init() {
|
||||
const char* vs = resolve("assets/shaders/actor.vs");
|
||||
const char* fs = resolve("assets/shaders/actor.fs");
|
||||
if (vs != nullptr && fs != nullptr) {
|
||||
shader_ = LoadShader(vs, fs);
|
||||
const std::string vs = resolve("assets/shaders/actor.vs");
|
||||
const std::string fs = resolve("assets/shaders/actor.fs");
|
||||
if (!vs.empty() && !fs.empty()) {
|
||||
shader_ = LoadShader(vs.c_str(), fs.c_str());
|
||||
shader_ok_ = shader_.id != 0;
|
||||
if (shader_ok_) {
|
||||
loc_time_ = GetShaderLocation(shader_, "uTime");
|
||||
|
|
@ -59,9 +59,9 @@ void ModelBank::init() {
|
|||
loc_rig_ = GetShaderLocation(shader_, "uRig");
|
||||
loc_rig_scale_ = GetShaderLocation(shader_, "uRigScale");
|
||||
loc_rig_mode_ = GetShaderLocation(shader_, "uRigMode");
|
||||
const char* ramp = resolve("assets/textures/actor/actor_ramp.png");
|
||||
if (ramp != nullptr && loc_ramp_ >= 0) {
|
||||
ramp_ = LoadTexture(ramp);
|
||||
const std::string ramp = resolve("assets/textures/actor/actor_ramp.png");
|
||||
if (!ramp.empty() && loc_ramp_ >= 0) {
|
||||
ramp_ = LoadTexture(ramp.c_str());
|
||||
SetTextureWrap(ramp_, TEXTURE_WRAP_CLAMP);
|
||||
SetTextureFilter(ramp_, TEXTURE_FILTER_BILINEAR);
|
||||
// raylib binds material maps to texture units on every model
|
||||
|
|
@ -81,14 +81,14 @@ void ModelBank::init() {
|
|||
|
||||
for (int i = 0; i < static_cast<int>(ActorModel::Count); ++i) {
|
||||
const ActorModel id = static_cast<ActorModel>(i);
|
||||
const char* path = resolve(file_name(id));
|
||||
if (path == nullptr) {
|
||||
const std::string path = resolve(file_name(id));
|
||||
if (path.empty()) {
|
||||
TraceLog(LOG_WARNING, "ACTOR: %s missing, using primitive fallback", file_name(id));
|
||||
continue;
|
||||
}
|
||||
Model model = LoadModel(path);
|
||||
Model model = LoadModel(path.c_str());
|
||||
if (model.meshCount == 0) {
|
||||
TraceLog(LOG_WARNING, "ACTOR: %s failed to load", path);
|
||||
TraceLog(LOG_WARNING, "ACTOR: %s failed to load", path.c_str());
|
||||
UnloadModel(model);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -134,6 +134,7 @@ void ModelBank::begin_frame(float time, float corruption, Vector3 camera_pos) {
|
|||
void ModelBank::draw(ActorModel id, Vector3 pos, float yaw, float scale,
|
||||
Color tint, float flash, bool outline, float walk,
|
||||
float stagger, float phase) {
|
||||
const float yaw_degrees = yaw * RAD2DEG;
|
||||
const int index = static_cast<int>(id);
|
||||
if (index < 0 || index >= static_cast<int>(ActorModel::Count)) return;
|
||||
if (!entries_[index].loaded) {
|
||||
|
|
@ -164,7 +165,7 @@ void ModelBank::draw(ActorModel id, Vector3 pos, float yaw, float scale,
|
|||
const float off = 0.0f;
|
||||
SetShaderValue(shader_, loc_outline_, &on, SHADER_UNIFORM_FLOAT);
|
||||
rlSetCullFace(RL_CULL_FACE_FRONT);
|
||||
DrawModelEx(entries_[index].model, pos, Vector3{0.0f, 1.0f, 0.0f}, yaw,
|
||||
DrawModelEx(entries_[index].model, pos, Vector3{0.0f, 1.0f, 0.0f}, yaw_degrees,
|
||||
Vector3{scale, scale, scale}, tint);
|
||||
rlSetCullFace(RL_CULL_FACE_BACK);
|
||||
SetShaderValue(shader_, loc_outline_, &off, SHADER_UNIFORM_FLOAT);
|
||||
|
|
@ -174,7 +175,7 @@ void ModelBank::draw(ActorModel id, Vector3 pos, float yaw, float scale,
|
|||
const float f = flash > 0.0f ? 1.0f : 0.0f;
|
||||
SetShaderValue(shader_, loc_flash_, &f, SHADER_UNIFORM_FLOAT);
|
||||
}
|
||||
DrawModelEx(entries_[index].model, pos, Vector3{0.0f, 1.0f, 0.0f}, yaw,
|
||||
DrawModelEx(entries_[index].model, pos, Vector3{0.0f, 1.0f, 0.0f}, yaw_degrees,
|
||||
Vector3{scale, scale, scale}, tint);
|
||||
}
|
||||
|
||||
|
|
@ -184,6 +185,7 @@ float ModelBank::height(ActorModel id) {
|
|||
case ActorModel::HissStaff: return 1.9f;
|
||||
case ActorModel::MoldSpore: return 1.3f;
|
||||
case ActorModel::HissBrute: return 2.9f;
|
||||
case ActorModel::HissGhost: return 1.9f;
|
||||
case ActorModel::Shard: return 0.55f;
|
||||
case ActorModel::Hotline: return 1.3f;
|
||||
case ActorModel::TV: return 2.3f;
|
||||
|
|
@ -203,6 +205,7 @@ const char* ModelBank::file_name(ActorModel id) {
|
|||
case ActorModel::HissStaff: return "assets/models/hiss_staff.glb";
|
||||
case ActorModel::MoldSpore: return "assets/models/mold_spore.glb";
|
||||
case ActorModel::HissBrute: return "assets/models/hiss_brute.glb";
|
||||
case ActorModel::HissGhost: return "assets/models/hiss_ghost.glb";
|
||||
case ActorModel::Shard: return "assets/models/shard.glb";
|
||||
case ActorModel::Hotline: return "assets/models/props/hotline.glb";
|
||||
case ActorModel::TV: return "assets/models/props/tv.glb";
|
||||
|
|
@ -218,33 +221,38 @@ const char* ModelBank::file_name(ActorModel id) {
|
|||
|
||||
void ModelBank::draw_fallback(ActorModel id, Vector3 pos, float yaw,
|
||||
float scale, Color tint) {
|
||||
(void)yaw;
|
||||
rlPushMatrix();
|
||||
rlTranslatef(pos.x, pos.y, pos.z);
|
||||
rlRotatef(yaw * RAD2DEG, 0.0f, 1.0f, 0.0f);
|
||||
switch (id) {
|
||||
case ActorModel::Guard:
|
||||
DrawCylinder(pos, 0.38f * scale, 0.3f * scale, 1.5f * scale, 7, tint);
|
||||
DrawCube(Vector3{pos.x, pos.y + 1.7f * scale, pos.z},
|
||||
DrawCylinder(Vector3{0.0f, 0.0f, 0.0f}, 0.38f * scale, 0.3f * scale,
|
||||
1.5f * scale, 7, tint);
|
||||
DrawCube(Vector3{0.0f, 1.7f * scale, 0.0f},
|
||||
0.4f * scale, 0.35f * scale, 0.35f * scale, tint);
|
||||
break;
|
||||
case ActorModel::HissStaff:
|
||||
DrawCylinder(pos, 0.15f * scale, 0.42f * scale, 1.5f * scale, 7, tint);
|
||||
DrawCylinder(Vector3{0.0f, 0.0f, 0.0f}, 0.15f * scale, 0.42f * scale,
|
||||
1.5f * scale, 7, tint);
|
||||
break;
|
||||
case ActorModel::MoldSpore:
|
||||
DrawSphere(pos, 0.55f * scale, tint);
|
||||
DrawSphere(Vector3{0.0f, 0.0f, 0.0f}, 0.55f * scale, tint);
|
||||
break;
|
||||
case ActorModel::HissBrute:
|
||||
DrawCube(Vector3{pos.x, pos.y + 1.2f * scale, pos.z},
|
||||
DrawCube(Vector3{0.0f, 1.2f * scale, 0.0f},
|
||||
1.5f * scale, 2.4f * scale, 1.0f * scale, tint);
|
||||
break;
|
||||
case ActorModel::Shard:
|
||||
DrawSphere(pos, 0.3f * scale, tint);
|
||||
DrawSphere(Vector3{0.0f, 0.0f, 0.0f}, 0.3f * scale, tint);
|
||||
break;
|
||||
case ActorModel::Switch: {
|
||||
// Small wall plate at the lightswitch, near the dead beam strip (§2.3).
|
||||
DrawCube(Vector3{pos.x, pos.y + 0.45f, pos.z}, 0.12f * scale,
|
||||
DrawCube(Vector3{0.0f, 0.45f, 0.0f}, 0.12f * scale,
|
||||
0.6f * scale, 0.4f * scale, tint);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
rlPopMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// All models are metres, origin at the feet, facing +Z (the game camera).
|
||||
// The set-dressing models share the same one-mesh / painted-vertex pipeline.
|
||||
enum class ActorModel {
|
||||
Guard, HissStaff, MoldSpore, HissBrute, Shard,
|
||||
Guard, HissStaff, MoldSpore, HissBrute, HissGhost, Shard,
|
||||
Hotline, TV, Pedestal, Duck, Cabinet, Crate, Debris, Switch,
|
||||
Count
|
||||
};
|
||||
|
|
|
|||
|
|
@ -462,7 +462,8 @@ void Presenter::draw_scene(Game& game) {
|
|||
const float bob = std::sin(e.bob_phase) * (mold ? 0.02f : 0.08f);
|
||||
const ActorModel model = mold ? ActorModel::MoldSpore
|
||||
: (e.type == EnemyType::HissBrute ? ActorModel::HissBrute
|
||||
: ActorModel::HissStaff);
|
||||
: (e.type == EnemyType::HissGhost ? ActorModel::HissGhost
|
||||
: ActorModel::HissStaff));
|
||||
const float flash = actor_flash(e.hit_flash, 6.0f);
|
||||
const float walk = std::min(1.0f, e.speed / 4.5f);
|
||||
models_.draw(model, {e.pos.x, bob, e.pos.y}, yaw, 1.0f, WHITE,
|
||||
|
|
@ -532,7 +533,8 @@ void Presenter::draw_scene(Game& game) {
|
|||
if (e.hp >= e.max_hp) continue;
|
||||
const ActorModel model = e.type == EnemyType::MoldSpore ? ActorModel::MoldSpore
|
||||
: (e.type == EnemyType::HissBrute ? ActorModel::HissBrute
|
||||
: ActorModel::HissStaff);
|
||||
: (e.type == EnemyType::HissGhost ? ActorModel::HissGhost
|
||||
: ActorModel::HissStaff));
|
||||
const Vector2 screen = GetWorldToScreen(
|
||||
{e.pos.x, ModelBank::height(model) + 0.25f, e.pos.y}, camera_);
|
||||
const float w = 46.0f;
|
||||
|
|
|
|||
|
|
@ -490,10 +490,59 @@ def build_shard():
|
|||
return r
|
||||
|
||||
|
||||
def build_hiss_ghost():
|
||||
r=K.new_actor("HissGhost")
|
||||
# Floating tattered shroud: narrow waist, flared hem, ragged folds.
|
||||
K.loft(r,"shroud",[
|
||||
{"z":0.05,"r":(0.34,0.30),"n":16,"fold":(0.16,10),"cap":False},
|
||||
{"z":0.18,"r":(0.32,0.28),"n":16,"fold":(0.14,9)},
|
||||
{"z":0.32,"r":(0.30,0.26),"n":16,"fold":(0.12,8)},
|
||||
{"z":0.48,"r":(0.28,0.24),"n":16,"fold":(0.10,7)},
|
||||
{"z":0.64,"r":(0.26,0.22),"n":16,"fold":(0.08,6)},
|
||||
{"z":0.80,"r":(0.24,0.20),"n":16},
|
||||
{"z":0.94,"r":(0.22,0.18),"n":16},
|
||||
{"z":1.06,"r":(0.20,0.16),"n":16},
|
||||
],P["navy_dk"],ao=0.18)
|
||||
# Ethereal torso core (pale, translucent-ish vertex color)
|
||||
K.blob(r,"core",(0,0,0.95),(0.22,0.18,0.30),P["paper"],subdiv=3,seed=7,warp=0.12,ao=0.06)
|
||||
# Head: pale mask-like face
|
||||
K.blob(r,"head",(0,0,1.42),(0.17,0.16,0.19),P["skin"],subdiv=3,seed=8,ao=0.05)
|
||||
K.blob(r,"hood",(0,0.02,1.48),(0.20,0.19,0.12),P["navy_dk"],subdiv=2,seed=9,warp=0.08)
|
||||
# Hiss eyes
|
||||
K.crystal(r,"eye_hot",(-0.06,-0.15,1.43),0.06,P["hiss_hot"],sides=5,seed=10,tilt=(math.pi/2,0,0))
|
||||
K.crystal(r,"eye_dead",(0.06,-0.15,1.43),0.05,P["redaction"],sides=4,seed=11,tilt=(math.pi/2,0,0))
|
||||
# Reaching arms / trailing tendrils
|
||||
K.tube(r,"arm_reach",[(0.26,-0.05,1.15),(0.38,-0.28,0.98),(0.42,-0.55,0.82)],[0.09,0.07,0.05],P["navy_lt"],sides=7)
|
||||
K.blob(r,"hand_reach",(0.43,-0.60,0.79),(0.08,0.09,0.08),P["skin"],subdiv=2,seed=12)
|
||||
K.tube(r,"arm_trail",[(-0.26,0.0,1.10),(-0.34,-0.05,0.90),(-0.36,-0.08,0.68)],[0.09,0.07,0.05],P["navy_lt"],sides=7)
|
||||
# Hiss rot growths
|
||||
hiss_rot(r,210,
|
||||
growths=[
|
||||
((-0.24,0.10,1.20),0.20,(0.3,-0.2,0.5),False),
|
||||
((0.26,0.12,1.18),0.18,(-0.2,0.3,-0.4),True),
|
||||
((0.0,0.22,1.32),0.16,(0.1,-0.3,0.1),True),
|
||||
((-0.18,0.18,0.95),0.14,(0.5,0.1,0.2),False),
|
||||
],
|
||||
tendrils=[
|
||||
([(-0.20,0.14,1.18),(-0.34,0.24,1.32),(-0.46,0.30,1.48)],[0.04,0.025,0.01]),
|
||||
([(0.22,0.16,1.05),(0.36,0.26,1.18),(0.48,0.34,1.30)],[0.035,0.022,0.01]),
|
||||
],
|
||||
veins=[
|
||||
[(-0.12,-0.20,1.20),(-0.10,-0.22,1.05),(-0.08,-0.21,0.90)],
|
||||
],
|
||||
masses=[
|
||||
((-0.22,0.12,1.12),(0.13,0.12,0.16)),
|
||||
],size_scale=1.1)
|
||||
# Base disc (ghostly, no feet)
|
||||
K.ring(r,"base_ring",(0,0,0.06),0.42,0.04,P["hiss"],segments=16)
|
||||
K.plate(r,"base_disc",K.octagon(0.46),0.0,0.02,1.0,P["redaction"])
|
||||
return r
|
||||
|
||||
BUILDERS = [
|
||||
("guard", build_guard, 6000),
|
||||
("hiss_staff", build_hiss_staff, 2500),
|
||||
("mold_spore", build_mold_spore, 1500),
|
||||
("hiss_ghost", build_hiss_ghost, 2000),
|
||||
("hiss_brute", build_hiss_brute, 3150),
|
||||
("shard", build_shard, 400),
|
||||
]
|
||||
|
|
@ -512,7 +561,7 @@ for name, builder, cap in BUILDERS:
|
|||
|
||||
# ------------------------------------------------------------ lineup render
|
||||
SLOTS = {"Guard": -6.5, "HissStaff": -2.5, "MoldSpore": 1.3,
|
||||
"HissBrute": 5.6, "Shard": 9.0}
|
||||
"HissGhost": 3.4, "HissBrute": 5.6, "Shard": 9.0}
|
||||
for obj in bpy.data.objects:
|
||||
if obj.name in SLOTS:
|
||||
obj.location.x = SLOTS[obj.name]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue