Index: ps/trunk/binaries/data/config/default.cfg
===================================================================
--- ps/trunk/binaries/data/config/default.cfg
+++ ps/trunk/binaries/data/config/default.cfg
@@ -128,6 +128,9 @@
sharpening = "disabled"
sharpness = 0.3
+; Quality used for actors.
+max_actor_quality=200
+
; Quality level of shader effects (set to 10 to display all effects)
materialmgr.quality = 2.0
Index: ps/trunk/binaries/data/mods/public/art/actors/actor.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/actors/actor.rnc
+++ ps/trunk/binaries/data/mods/public/art/actors/actor.rnc
@@ -1,71 +0,0 @@
-namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
-##
-# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
-# and use a converter tool like trang to generate the Relax NG XML (.rng) file
-##
-
-element actor {
- attribute version { xsd:positiveInteger }, (
- element group {
- element variant {
- attribute name { text }? &
- attribute file { text }? &
- attribute frequency { xsd:nonNegativeInteger }? &
- element mesh {
- text
- }? &
- element textures {
- element texture {
- attribute file { text }? &
- attribute name { text }
- }*
- }? &
- element decal {
- attribute width { xsd:float } & # X
- attribute depth { xsd:float } & # Z
- attribute angle { xsd:float } &
- attribute offsetx { xsd:float } &
- attribute offsetz { xsd:float }
- }? &
- element particles {
- attribute file { text }
- }? &
- element color { list {
- xsd:nonNegativeInteger, # R
- xsd:nonNegativeInteger, # G
- xsd:nonNegativeInteger # B
- } }? &
- element animations {
- element animation {
- attribute name { text } &
- attribute id { text }? &
- attribute frequency { xsd:nonNegativeInteger }? &
- attribute file { text }? &
- attribute speed { xsd:nonNegativeInteger } &
- attribute event { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
- attribute load { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
- attribute sound { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }?
- }*
- }? &
- element props {
- element prop {
- (attribute actor { text }? &
- attribute attachpoint { text } &
- attribute minheight { xsd:float }? &
- attribute maxheight { xsd:float }? &
- attribute selectable { "true" | "false" }?)
- }*
- }?
- }*
- }* &
- element castshadow { # flag; true if present
- empty
- }? &
- element float { # flag; true if present
- empty
- }? &
- element material {
- text
- }?
- )
-}
Index: ps/trunk/binaries/data/mods/public/art/actors/actor.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/actors/actor.rng
+++ ps/trunk/binaries/data/mods/public/art/actors/actor.rng
@@ -1,194 +1,263 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 255
+ 0
+
+
+ low
+ medium
+ high
+
+
+
+
+
+
+ Minimum quality - this is inclusive.
+
+
+
+
+
+ Maximum quality - this is exclusive.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 0
- 1
-
-
-
-
-
-
- 0
- 1
-
-
-
-
-
-
- 0
- 1
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- false
-
-
-
-
-
-
-
+
+ The quality level to use for this actor. This is the maximum value at which this version of the actor will be used. If not specified, the maximum possible value is assumed.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
Index: ps/trunk/binaries/data/mods/public/gui/options/options.json
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/options/options.json
+++ ps/trunk/binaries/data/mods/public/gui/options/options.json
@@ -153,6 +153,17 @@
"max": 1
},
{
+ "type": "dropdown",
+ "label": "Model quality",
+ "tooltip": "Model quality setting.",
+ "config": "max_actor_quality",
+ "list": [
+ { "value": 100, "label": "Low", "tooltip": "Simpler models for better performance." },
+ { "value": 150, "label": "Medium", "tooltip": "Average quality and average performance." },
+ { "value": 200, "label": "High", "tooltip": "High quality models." }
+ ]
+ },
+ {
"type": "slider",
"label": "Shader effects",
"tooltip": "Number of shader effects. REQUIRES GAME RESTART",
Index: ps/trunk/source/graphics/Model.cpp
===================================================================
--- ps/trunk/source/graphics/Model.cpp
+++ ps/trunk/source/graphics/Model.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2020 Wildfire Games.
+/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -499,10 +499,6 @@
m_Anim = source->m_Anim;
m_AnimTime = source->m_AnimTime;
- m_Flags &= ~MODELFLAG_CASTSHADOWS;
- if (source->m_Flags & MODELFLAG_CASTSHADOWS)
- m_Flags |= MODELFLAG_CASTSHADOWS;
-
m_ObjectBounds.SetEmpty();
InvalidateBounds();
}
Index: ps/trunk/source/graphics/ObjectBase.h
===================================================================
--- ps/trunk/source/graphics/ObjectBase.h
+++ ps/trunk/source/graphics/ObjectBase.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2019 Wildfire Games.
+/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -22,7 +22,9 @@
#include "ps/CStr.h"
#include "ps/CStrIntern.h"
+class CActorDef;
class CModel;
+class CObjectEntry;
class CObjectManager;
class CSkeletonAnim;
class CXeromyces;
@@ -30,12 +32,24 @@
#include
#include