x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't rotate a USceneCaptureComponentCube for Rendering

Hey All,

I'm attempting to use a modified USceneCaptureComponentCube to create quick 360 monoscopic renders with post processing, which works fine, but for some reason I can't change rotation of the 360 capture to choose a specific direction to be in the center of the render. Rotating the component or the actor does nothing, and I'm wondering if always renders from a set rotation. Any one have any ideas? I'd rather not manually remake the bit array of the rendered image if I don't have to.

Product Version: UE 4.14
Tags:
more ▼

asked May 23 '17 at 06:00 PM in C++ Programming

avatar image

Regalith
156 12 9 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Came up with an alternate solution. I can just modify the order of the FColor data array that is pulled from the CaptureCube render data to fake rotation. Worked like a charm.

more ▼

answered May 24 '17 at 08:18 PM

avatar image

Regalith
156 12 9 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I needed to do this and came up with another solution, and thought i would post it here.

If you are building UE4 from source, a small edit to \Engine\Source\Runtime\Renderer\Private\SceneCaptureRendering.cpp

 void FScene::UpdateSceneCaptureContents(USceneCaptureComponentCube* CaptureComponent)

can change USceneCaptureComponentCube to use the orientation of the component.

just change (line ~818)

 const FMatrix ViewRotationMatrix = FLocal::CalcCubeFaceTransform(TargetFace);

to

 FTransform Transform = CaptureComponent->GetComponentToWorld();
 Transform.SetTranslation(FVector::ZeroVector);
 Transform.SetScale3D(FVector::OneVector);
 const FMatrix ViewRotationMatrix = Transform.ToInverseMatrixWithScale() * Local::CalcCubeFaceTransform(TargetFace);

its kind of a hack, but it works

note that you have to be building from source (ie. github) or changes you make to ue4 source won't be compiled

more ▼

answered Feb 01 '19 at 01:15 AM

avatar image

nickNedieon
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question