Reverb and Ambient zone visualizations are now exposed through the debug interface.
Colliders are now imported with a prefix of collider#_ instead of collider_#_ --HG-- extra : source : 3fe036b138659b88a903859578ec9099e5ec353c
This commit is contained in:
@@ -90,7 +90,7 @@ void KRAmbientZone::render(KRCamera *pCamera, std::vector<KRPointLight *> &point
|
|||||||
|
|
||||||
KRNode::render(pCamera, point_lights, directional_lights, spot_lights, viewport, renderPass);
|
KRNode::render(pCamera, point_lights, directional_lights, spot_lights, viewport, renderPass);
|
||||||
|
|
||||||
bool bVisualize = false;
|
bool bVisualize = pCamera->settings.debug_display == KRRenderSettings::KRENGINE_DEBUG_DISPLAY_SIREN_AMBIENT_ZONES;
|
||||||
|
|
||||||
if(renderPass == KRNode::RENDER_PASS_FORWARD_TRANSPARENT && bVisualize) {
|
if(renderPass == KRNode::RENDER_PASS_FORWARD_TRANSPARENT && bVisualize) {
|
||||||
KRMat4 sphereModelMatrix = getModelMatrix();
|
KRMat4 sphereModelMatrix = getModelMatrix();
|
||||||
|
|||||||
@@ -1091,6 +1091,11 @@ std::string KRCamera::getDebugText()
|
|||||||
break;
|
break;
|
||||||
case KRRenderSettings::KRENGINE_DEBUG_DISPLAY_BONES:
|
case KRRenderSettings::KRENGINE_DEBUG_DISPLAY_BONES:
|
||||||
stream << "Bone Visualization";
|
stream << "Bone Visualization";
|
||||||
|
case KRRenderSettings::KRENGINE_DEBUG_DISPLAY_SIREN_REVERB_ZONES:
|
||||||
|
stream << "Siren - Reverb Zones";
|
||||||
|
break;
|
||||||
|
case KRRenderSettings::KRENGINE_DEBUG_DISPLAY_SIREN_AMBIENT_ZONES:
|
||||||
|
stream << "Siren - Ambient Zones";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return stream.str();
|
return stream.str();
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ public:
|
|||||||
KRENGINE_DEBUG_DISPLAY_OCTREE,
|
KRENGINE_DEBUG_DISPLAY_OCTREE,
|
||||||
KRENGINE_DEBUG_DISPLAY_COLLIDERS,
|
KRENGINE_DEBUG_DISPLAY_COLLIDERS,
|
||||||
KRENGINE_DEBUG_DISPLAY_BONES,
|
KRENGINE_DEBUG_DISPLAY_BONES,
|
||||||
|
KRENGINE_DEBUG_DISPLAY_SIREN_REVERB_ZONES,
|
||||||
|
KRENGINE_DEBUG_DISPLAY_SIREN_AMBIENT_ZONES,
|
||||||
KRENGINE_DEBUG_DISPLAY_NUMBER
|
KRENGINE_DEBUG_DISPLAY_NUMBER
|
||||||
} debug_display;
|
} debug_display;
|
||||||
|
|
||||||
|
|||||||
@@ -1521,13 +1521,13 @@ KRNode *LoadMesh(KRNode *parent_node, FbxScene* pFbxScene, FbxGeometryConverter
|
|||||||
return new KRCollider(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), KRAKEN_COLLIDER_PHYSICS, 0.0f);
|
return new KRCollider(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), KRAKEN_COLLIDER_PHYSICS, 0.0f);
|
||||||
} else if(strncmp(node_name, "audio_collider_", strlen("audio_collider_")) == 0) {
|
} else if(strncmp(node_name, "audio_collider_", strlen("audio_collider_")) == 0) {
|
||||||
return new KRCollider(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), KRAKEN_COLLIDER_AUDIO, 1.0f);
|
return new KRCollider(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), KRAKEN_COLLIDER_AUDIO, 1.0f);
|
||||||
} else if(strncmp(node_name, "collider_", 9) == 0) { // 9 == strlen("collider_")
|
} else if(strncmp(node_name, "collider", 8) == 0) { // 8 == strlen("collider")
|
||||||
// Colliders can have a prefix of collider_##_, where ## indicates the layer mask
|
// Colliders can have a prefix of collider_##_, where ## indicates the layer mask
|
||||||
// Colliders with a prefix of only collider_ will have a default layer mask of KRAKEN_COLLIDER_PHYSICS | KRAKEN_COLLIDER_AUDIO
|
// Colliders with a prefix of only collider_ will have a default layer mask of KRAKEN_COLLIDER_PHYSICS | KRAKEN_COLLIDER_AUDIO
|
||||||
|
|
||||||
// Scan through the characters of the name until we no longer see digit characters (or see a '\0' indicating the end of the string)
|
// Scan through the characters of the name until we no longer see digit characters (or see a '\0' indicating the end of the string)
|
||||||
unsigned int layer = 0;
|
unsigned int layer = 0;
|
||||||
const char *szNodeName = node_name + 9; // 9 == strlen("collider_")
|
const char *szNodeName = node_name + 8; // 8 == strlen("collider")
|
||||||
const char *source_char = szNodeName;
|
const char *source_char = szNodeName;
|
||||||
while(*source_char >= '0' && *source_char <= '9') {
|
while(*source_char >= '0' && *source_char <= '9') {
|
||||||
layer = layer * 10 + (*source_char++ - '0');
|
layer = layer * 10 + (*source_char++ - '0');
|
||||||
@@ -1537,7 +1537,13 @@ KRNode *LoadMesh(KRNode *parent_node, FbxScene* pFbxScene, FbxGeometryConverter
|
|||||||
// No layer mask number was found, use the default
|
// No layer mask number was found, use the default
|
||||||
layer = KRAKEN_COLLIDER_PHYSICS | KRAKEN_COLLIDER_AUDIO;
|
layer = KRAKEN_COLLIDER_PHYSICS | KRAKEN_COLLIDER_AUDIO;
|
||||||
}
|
}
|
||||||
return new KRCollider(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), layer, 1.0f);
|
if(*source_char == '_') {
|
||||||
|
// Pattern has matched
|
||||||
|
return new KRCollider(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), layer, 1.0f);
|
||||||
|
} else {
|
||||||
|
// This is just a normal node, which happened to be prefixed with "collider" but didn't have a number and underscore
|
||||||
|
return new KRModel(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), light_map, 0.0f, true, false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return new KRModel(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), light_map, 0.0f, true, false);
|
return new KRModel(parent_node->getScene(), GetFbxObjectName(pNode), pSourceMesh->GetNode()->GetName(), light_map, 0.0f, true, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ void KRReverbZone::render(KRCamera *pCamera, std::vector<KRPointLight *> &point_
|
|||||||
|
|
||||||
KRNode::render(pCamera, point_lights, directional_lights, spot_lights, viewport, renderPass);
|
KRNode::render(pCamera, point_lights, directional_lights, spot_lights, viewport, renderPass);
|
||||||
|
|
||||||
bool bVisualize = false;
|
bool bVisualize = pCamera->settings.debug_display == KRRenderSettings::KRENGINE_DEBUG_DISPLAY_SIREN_REVERB_ZONES;
|
||||||
|
|
||||||
if(renderPass == KRNode::RENDER_PASS_FORWARD_TRANSPARENT && bVisualize) {
|
if(renderPass == KRNode::RENDER_PASS_FORWARD_TRANSPARENT && bVisualize) {
|
||||||
KRMat4 sphereModelMatrix = getModelMatrix();
|
KRMat4 sphereModelMatrix = getModelMatrix();
|
||||||
|
|||||||
Reference in New Issue
Block a user