feat(materials): masonry coursing, glass/banner materials, per-slot assignment, telephoto elevations
0.1.4 materials pass plus the camera fix levelling exposed. Materials (Tools/ue_build_demo_map.py): - ensure_material() gains optional masonry coursing (world-space course height, joint band, joint tint) and roughness variation, so facades read as coursed stone/stucco instead of one flat specular plane. - WorldPosition is in centimetres: course heights in metres are scaled by 100 (the first attempt divided by 0.55 and the coursing was invisible). - connect_material_expressions returns False rather than raising, so every link now goes through a link() helper that logs failures; UE has no MaterialExpressionLess, so the joint mask is Frac -> Divide -> OneMinus -> Clamp. - New materials: M_FacadeStoneShadow, M_FacadeGlass (specular 0.62 ~ IOR 1.5), M_FacadeBanner. - Material assignment is now per SLOT keyed on the imported slot material name. It was slot-0 only, which on the hero is the banner, so stone, shadow stone and glazing still wore flat Blender materials. Hero now 4/4 slots. Cameras (GigLineShotActor + ue_build_review_map): - Optional per-shot ShotFieldOfView; the shot tuples take a 4th element. - Elevations use a 42-55 deg lens from across the street: with the cameras levelled (0.1.2 follow-up) the building was small in frame, and tilting to fill it is what breaks the verticals. hero-facade-front sky 39% -> 20%, demo-spawn-view 23% -> 16%. Screenshots re-rendered for the whole set.
This commit is contained in:
1 parent
d6d3d54810
commit
9a3784683f
32 files changed
+243
-57
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#include "GigLineShotActor.h"
|
||||
|
||||
#include "Camera/CameraActor.h"
|
||||
#include "Camera/CameraComponent.h"
|
||||
#include "Engine/World.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "UnrealClient.h"
|
||||
@@ -83,6 +84,15 @@ void AGigLineShotActor::NextShot()
|
||||
Params.ObjectFlags |= RF_Transient;
|
||||
CurrentCamera = GetWorld()->SpawnActor<ACameraActor>(
|
||||
ACameraActor::StaticClass(), ShotLocations[CurrentShot], ShotRotations[CurrentShot], Params);
|
||||
if (ShotFieldOfView.IsValidIndex(CurrentShot) && ShotFieldOfView[CurrentShot] > 0.0f)
|
||||
{
|
||||
if (UCameraComponent* Cam = CurrentCamera->GetCameraComponent())
|
||||
{
|
||||
// Long lens for elevations: fills the frame from across the street
|
||||
// without pitching the camera, so verticals stay parallel.
|
||||
Cam->SetFieldOfView(ShotFieldOfView[CurrentShot]);
|
||||
}
|
||||
}
|
||||
PlayerController->SetViewTarget(CurrentCamera);
|
||||
|
||||
SettleCountdown = SettleSeconds;
|
||||
|
||||
@@ -36,6 +36,16 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<FString> ShotNames;
|
||||
|
||||
/**
|
||||
* Optional per-shot field of view (degrees), same index as ShotLocations.
|
||||
* Zero or missing entries keep the engine default (90 deg). Elevation shots
|
||||
* taken from across the street need a long lens: a level camera 45 m out with
|
||||
* the default FOV leaves the building small in frame, and tilting it up to fill
|
||||
* the frame is what breaks the verticals.
|
||||
*/
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TArray<float> ShotFieldOfView;
|
||||
|
||||
/** Seconds to let the view target settle before the capture. Resolution comes from the runner's -ResX/-ResY. */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
float SettleSeconds = 0.35f;
|
||||
|
||||
Reference in new issue
Block a user