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"

ViewLocation & ViewRotation are not initialised in FSceneView in realtime editor viewport.

Hi, I am writing an Custom render pass to do some custom OpenGL code into the engine. In order to do this I need to convert the matrix space (similar to the stereoscopic matrix). This math depends on FSceneView having a correct ViewLocation and ViewRotation. It appears that these are not set (as the comments say) by the creation of the ViewMatrix, but by the ULocalPlayer::CalcSceneView function. Which means the ViewLocation & ViewRotation values are undefined values while the editor is in realtime view mode.

I can happily create a patch to fix this, but I am curious if this is the intended use of those variables or not.

Product Version: Not Selected
Tags:
more ▼

asked Feb 27 '15 at 04:25 AM in Bug Reports

avatar image

luckyneko
1 1 1

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

1 answer: sort voted first

I'm curious where you're seeing this. The code changed a bit in main (what will become 4.8) but all the needed values are initialized in the FSceneViewInitOptions that are passed to the FSceneView constructor.

In the case of realtime editor viewports, this happens in FEditorViewportClient::CalcSceneView.

If there is a case where they are uninitialized can you provide a callstack? That will give me more context as to what the code is doing.

more ▼

answered Mar 20 '15 at 08:23 PM

avatar image

senress STAFF
201 7 5 13

avatar image luckyneko Mar 24 '15 at 07:39 PM

Hi, Sorry I forgot to mention I am running 4.7.1 from the Github release branch. Here is a call stack of where i think the variable should be getting initialised: Callstack

The reason I want access to these variables is because I have written a custom render pass that needs a different layout for its matrices. So I need to reconstruct the matrix during the render pass. Here is a callstack for where I would be accessing the viewlocation and viewrotation: Render thread callstack

In my fork I have manually added a patch to fix this. I am not sure if I should post that here or not. I can send it through if you want it.

Thanks

avatar image senress STAFF Mar 24 '15 at 08:51 PM

CalcSceneView should initialize those variables but it's certainly possible we've missed something :)

If you can make a pull request on GitHub that's the easiest way for us to take a code change. I'd love to get your fix integrated in to main!

(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