-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jump space transformation matrix is relative to origin. #13
Comments
It was unbelievably frustrating to get the jump fields to rotate correctly, to boot (needing a field offset, etc.) But, now that they are working, it is necessary to do it in the C/C++ side of things, so I think a utility function to create the jumps would be super helpful. |
Why was it so complicated? Shouldn't the transformation just be single multiplication of the ray with a matrix? |
The problem with transformations is that upon entrance of a specific cell, you have to do a transformation. Figuring out the actual offset/position of where that cell should be put out is a pain because it would nominally be different for each cell provided you're not only doing a translation instead of a translation + rotation. New thought: I wonder how arbitrary the matrix can be and still work - could we have portals that give an isometric view? (how weird would that be?) |
To be fair, I think as long as it's built on top of the existing system, it should be relatively easy. |
I don't fully understand yet how it works and why it's hard, I just noticed when passing a 3x3 rotation matrix into JumpSpace() it rotates the whole world around (http://youtu.be/nEpnNfgPB6w).
I think the matrix has to be extended to 4x4 to allow for every kind of transformation. |
That is acceptable. It appears we are truncating the existing 4-wide floats for the Rotxyz, move. Also, there is little need to keep that packed... We should be fine extending the matrix. It would need to be changed both places in Pass1.frag and Pass1Physics.frag. I have no idea how one could use the bizarre matrix transformations, but I am confident kooky uses could be found. Also, animating the transform. Brilliant! |
O.O Ok... I now understand why we need to be able to have arbitrary matricies instead of jump + rotation. |
Also, what happens when you walk through? |
I do sometime in the video.. nothing spectacular, looks kinda wrong. Also I had to remove the part where you also apply the matrix to the current ray location for this to work, otherwise it's exits at some other world location. |
I think you are going to have to use more words to explain the thing that people have never had to explain to one another before. If you are talking about handling if the ray is already in the jumpspace correctly (first texture lookup) that is relatively important -- at least it was. Maybe it's OBE? |
:D By the way I moved it into an extra function because you used the same code twice. |
I just realized, I've been updating your branch most of the time, as per why I didn't see anything new. Re the matricies: To be fair, I could believe anything that messes with the frustum matrix values (that bottom row) would not be displayable upon a jump. That doesn't mean I wouldn't want to totally mess with it anyway. I guess there are situations where a game designer would want to have something that is displayed that one could not actually jump to. I.e. switching to an orthographic view. Upon a jump, the view would reset. Second though: Right now we are mixing the quaternions after a jump. I wonder if we could probe more stuff to get 'view' back from the shader, then mix the matricies? Third thought: That is an awful idea. If you would have to turn around, or upside down, everything would break on the process from "here" to "there." P.S. I agree with the not a permanent solution. There is a lot of difficulty with handling rotation through jumps, but we have to be careful to maintain it. I am not entirely sure how to fix it at the moment. |
P.P.S. The current repo still seems to fully work. Impressive. If I were you, I'd have broken things by now considering how seriously you've rearchitected everything. |
I deleted my copy of the repo for now. Yes I'm also not sure how to fix the Rotation, but I'm sure it's possible.
Well I am pushing to your master, so I can't really break everything can I ;). |
Maybe create a proxy function to allow rotation around center of the jump field.
The text was updated successfully, but these errors were encountered: