These are chat archives for highfidelity/hifi

7th
Jul 2014
Clément Brisset
@Atlante45
Jul 07 2014 00:00
Did you mean a direction? Meaning that doesn’t have it’s own frame of reference but is just a directionnal vector?
@AlericInglewood ^
AlericInglewood
@AlericInglewood
Jul 07 2014 00:09
@Atlante45 I was thinking (and playing with) the "orientation" of a single vector. Ie, V1 = orientation * V0, where V1 is the current "oriented" vector that is at V0 in rest.
In that case you can choose any rotation axis you want in the plane through V0 x V1 and V0 + V1
Only if you use V0 X V1 itself you rotate over the shortest route, but that isn't necessarily what you did to get V1.
Ie: v1 = q * v0; (arbitrary stuff), then in most cases q != glm::rotation(v0, v1), because that returns the rotation over the shortest path :P
AlericInglewood @AlericInglewood just did a 2 hour long review with @SeanDevin of a patch that he worked on all day. Everything was good :), so now bedtime for me.
Clément Brisset
@Atlante45
Jul 07 2014 00:13
Gotcha, but in that case you don’t really care what quaternion is used, you just want the final direction.
Ok, you in europe?
AlericInglewood
@AlericInglewood
Jul 07 2014 00:14
Yes, and Sean in Australia :(
I made Avatar::getWorldAlignedOrientation about 1000 times faster :P
Clément Brisset
@Atlante45
Jul 07 2014 00:15
Nice
AlericInglewood
@AlericInglewood
Jul 07 2014 00:19
Oh... actually, a million times faster ... it just returns an existing quaternion now :P. Which is only computed once for every time you change gravity - sooo... it was really horrible the way it was computing something that trivial!
Still took an hour to derive it - heheh - see http://www.twiddla.com/1687125 for the graphics art, though I'm afraid we used IRC for the text :P
Clément Brisset
@Atlante45
Jul 07 2014 00:20
Yeah, probably leftovers from the last gravity implementation that was really 3 dimensional.
AlericInglewood
@AlericInglewood
Jul 07 2014 00:22
@Atlante45 I saw you peek :) The text that went with that is like
<Timmy> Well... suppose
<Timmy> you have some vector V (always easier to work with q * V to understand quaternions ;)
<Timmy> Consider  _orientation * V   .. 
<Sean> ok
<Timmy> If V is IDENTITY_UP then that is green.. so that's what makes most sense for V I guess.
<Timmy> So, consider: GREEN = _orientation * IDENTITY_UP
<Timmy> Now we rotate green to purple using computeRotationFromBodyToWorldUp(1), which as we just saw returns the rotation needed to rotate green to purple.
<Timmy> So:
<Timmy> PURPLE = computeRotationFromBodyToWorldUp() * GREEN = computeRotationFromBodyToWorldUp() * _orientation * IDENTITY_UP
<Timmy> We also know that PURPLE = _worldUpOrientation * IDENTITY_UP
<Timmy> thus, apparently:
<Timmy> _worldUpOrientation = computeRotationFromBodyToWorldUp() * _orientation
<Timmy> multiply with the inverse of _orientation on both sides, and you get:
<Timmy> _worldUpOrientation * inverse(_orientation) = computeRotationFromBodyToWorldUp()
AlericInglewood @AlericInglewood feels like Feynman using graphs for formulas :P
AlericInglewood
@AlericInglewood
Jul 07 2014 00:23
ok - good night for real now :) poof
mpursley
@mpursley
Jul 07 2014 07:05
Hey All.. trying to build OSX (10.9.4) with XCode (5.1.1)... and it looks like cmake can't find QT5 core...

$ cmake .. -GXcode
CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
The imported target "Qt5::Core" references the file
Following the directions from here.. https://github.com/highfidelity/hifi/blob/master/BUILD.md -> OSX
All the brew stuff worked ok..
Clément Brisset
@Atlante45
Jul 07 2014 07:07
Did you set the correct ENV variable?
export QT_CMAKE_PREFIX_PATH=/usr/local/qt/5.2.0/clang_64/lib/cmake/
mpursley
@mpursley
Jul 07 2014 07:07
no.. "HIFI_LIB_DIR"?
"QT_CMAKE_PREFIX_PATH"?
Clément Brisset
@Atlante45
Jul 07 2014 07:08
It’s an envirronment variable required by cmake to find Qt5
If you type “ls /usr/local/qt/5.2.0/clang_64/lib/cmake/“ in you terminal, what’s the output?
mpursley
@mpursley
Jul 07 2014 07:12
$ ls /usr/local/qt/
ls: /usr/local/qt/: No such file or directory
I guess QT is not installed...
Clément Brisset
@Atlante45
Jul 07 2014 07:13
no that means it’s installed at a different spot if you ran brew correctly
mpursley
@mpursley
Jul 07 2014 07:13
$ brew install qt5
Error: qt5-5.2.1 already installed
Clément Brisset
@Atlante45
Jul 07 2014 07:13
try “sudo find / -name qt"
it’ll ask for your password and might take some time but it should find it.
Actually, check there too : “ ls /usr/local/opt/qt5/lib/cmake"
mpursley
@mpursley
Jul 07 2014 07:15
$ brew list qt5
/usr/local/Cellar/qt5/5.2.1/Assistant.app/Contents/ (5 files)
...
Clément Brisset
@Atlante45
Jul 07 2014 07:16
great
mpursley
@mpursley
Jul 07 2014 07:16

Yeah, that's it..


$ ls -l /usr/local/opt/qt5/lib/cmake
total 0
drwxr-xr-x 4 mpursley admin 136 16 May 15:55 Qt5
...


Clément Brisset
@Atlante45
Jul 07 2014 07:17
I guess you can go with either
Try : "export QT_CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake"
then launch cmake again
mpursley
@mpursley
Jul 07 2014 07:18

hmmm... same error..


$ export QT_CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake
$ echo $QT_CMAKE_PREFIX_PATH
/usr/local/opt/qt5/lib/cmake
$ cmake .. -GXcode
CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
The imported target "Qt5::Core" references the file


Clément Brisset
@Atlante45
Jul 07 2014 07:21
Try the other one then:
export QT_CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.2.1/lib/cmake
mpursley
@mpursley
Jul 07 2014 07:22
ok
No.. same error..
Clément Brisset
@Atlante45
Jul 07 2014 07:25
Looks like it’s still looking at the same spot...
mpursley
@mpursley
Jul 07 2014 07:25
maybe it's cached?
Clément Brisset
@Atlante45
Jul 07 2014 07:25
You might want to try and clean your build directory.
That’s what I’m thinking
mpursley
@mpursley
Jul 07 2014 07:25
yeah, i was just going to try a clean..
Clément Brisset
@Atlante45
Jul 07 2014 07:27
Was about to go sleep, so if that still doesn’t work, I’m afraid you’ll have to figure it out by yourself or wait for europe to wake up.
mpursley
@mpursley
Jul 07 2014 07:27
cloing the folder from github again..
Clément Brisset
@Atlante45
Jul 07 2014 07:28
Arf, you could have just deleted the build directory
That would have been enough ;)
mpursley
@mpursley
Jul 07 2014 07:31
Ok, I think it worked..
Clément Brisset
@Atlante45
Jul 07 2014 07:31
Nice
mpursley
@mpursley
Jul 07 2014 07:31
Yes!! $ ls -la hifi.xcodeproj/project.pbxproj
-rw-r--r-- 1 mpursley staff 1514860 7 Jul 00:30 hifi.xcodeproj/project.pbxproj
Clément Brisset
@Atlante45
Jul 07 2014 07:32
You might want to put the export in your .profile so you don’t have to retype it all the time.
Cool, now you should be able to open it “open hifi.xcodeproj” and then run it Cmd + R
Gotta go
Have fun!
mpursley
@mpursley
Jul 07 2014 07:33
Yes!
it's building in xcode... thanks! :)
Clément Brisset
@Atlante45
Jul 07 2014 07:33
no pb
mpursley
@mpursley
Jul 07 2014 08:30
Ok, I have the project built... but I can't reset/recover my password.. it says "• Email not found"...
I'll check again tomorrow... Good night :)
AlericInglewood
@AlericInglewood
Jul 07 2014 11:35
@Atlante45 , @mpursley I think he should use export QT_CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.2.1 ?
QT_CMAKE_PREFIX_PATH is an hifi invented environment variable that is just added to CMAKE_PREFIX_PATH
And CMAKE_PREFIX_PATH is a list of installation prefixes (ie, /usr, /usr/local, etc): adding lib or bin to that prefix should give one the installed libraries and executables respectively. In other words, he doesn't want add the 'lib' part at the end.
AlericInglewood
@AlericInglewood
Jul 07 2014 17:57
Come on people, weekend is over :\
Hmm, how to rebase the last 4 commits of the current branch on top of remotes/upstream/master and move the branch there...
Chris Collins
@cozza13
Jul 07 2014 18:16
@thoys how is that frisbee script going?
I want to give it a go with my hydras
Thijs Wenker
@thoys
Jul 07 2014 18:18
@cozza13 not as fast as I hoped, but we can throw some over, power was down yesterday so I took a day off from computer stuff , and saturday I was celebrating our victory :P
Chris Collins
@cozza13
Jul 07 2014 18:20
@thoys I will meet you in there.
AlericInglewood
@AlericInglewood
Jul 07 2014 18:28
Hi @cozza13 :)
Chris Collins
@cozza13
Jul 07 2014 18:28
hi
AlericInglewood
@AlericInglewood
Jul 07 2014 18:30
I was wondering what it means that https://worklist.net/19830 has not been changed to 'Bidding' in the past 5 days :blush:. Surely you want it to be fixed that scripts currently can't use the ALT or Meta key properly?
Thijs Wenker
@thoys
Jul 07 2014 18:35
@AlericInglewood for me the alt key activates the menu's , is there a usecase where you want to capture alt key presses?
AlericInglewood
@AlericInglewood
Jul 07 2014 18:37
@thoys Sure, I want to write a script to make the controls react like they do in SL. Be able to attach your cam to some point and then move the mouse to "cam around" - pressing shift, control and alt all change how the cam reacts to the mouse.
Thijs Wenker
@thoys
Jul 07 2014 18:37
oke makes more sense :)
AlericInglewood
@AlericInglewood
Jul 07 2014 18:39
I probably have to extend the scripting language a bit - or at least I'm willing to go that far (ie, it must be necessary to set a LookAt and the Tightness of a camera from a script, as well as the Distance and Upshift when in first person. If anything is missing then I'll add that too. This alt problem is just the first step. So far it seems (5 days a LOT in my eyes) that the designers aren't interested though :\
That's why I'm now creating a private branch for just me and Sean :\ ....
Thijs Wenker
@thoys
Jul 07 2014 18:41
hmm, the alt camera thing works with the default scripts for me
AlericInglewood
@AlericInglewood
Jul 07 2014 18:41
Impossible
Or the bug only exists on linux. What OS are you using?
Thijs Wenker
@thoys
Jul 07 2014 18:41
oh you're on linux?
Chris Collins
@cozza13
Jul 07 2014 18:41
also works on OSX
Thijs Wenker
@thoys
Jul 07 2014 18:42
I think its just a linux bug then
AlericInglewood
@AlericInglewood
Jul 07 2014 18:42
I am on linux. I can't test it on OSX - I think it's weird it works on OSX though, but that only more reason to really fix this.
Thijs Wenker
@thoys
Jul 07 2014 18:42
it works on Windows
AlericInglewood
@AlericInglewood
Jul 07 2014 18:42
So,... @cozza13 .. saw my question above?
Chris Collins
@cozza13
Jul 07 2014 18:42
make sure to load default scripts
AlericInglewood
@AlericInglewood
Jul 07 2014 18:43
It has nothing do with loaded scripts. I debugged Qt itself and the event is simply not passed.
I talked with qt guru's and they knew exactly what I meant, too.
@cozza13 Did you look at https://worklist.net/19830 ?
Chris Collins
@cozza13
Jul 07 2014 18:44
yep
AlericInglewood
@AlericInglewood
Jul 07 2014 18:44
Can you tell me what you did just now to verify that alt works on OSX and windows?
Chris Collins
@cozza13
Jul 07 2014 18:44
and tested that Alt key is working for OSX and PC
AlericInglewood
@AlericInglewood
Jul 07 2014 18:45
You can't test it that easily.. you need to write a script.
Chris Collins
@cozza13
Jul 07 2014 18:45
Load Interface, confirmed that default script were loaded. Held down alt key and looked around
Thijs Wenker
@thoys
Jul 07 2014 18:45
@AlericInglewood more specific, its the Inspect.js script that you need to test
Chris Collins
@cozza13
Jul 07 2014 18:46
nice @thoys. the top section of that script describes the options nicely https://github.com/highfidelity/hifi/blob/89c2812551c1b214d7fbfedfd2dab4a98cffe53b/examples/inspect.js
AlericInglewood
@AlericInglewood
Jul 07 2014 18:51
I can't look around at all with that script :\
@cozza13 Please talk me through this... I stopped all scripts. Then I start which script from the list? defaultScript.js ? Or inspect.js ? Or both?
Chris Collins
@cozza13
Jul 07 2014 18:53
All I do is make sure that default scripts.js is loaded
easiest way to do that is from preferences click the button “load default scripts"
this loads them all
Thijs Wenker
@thoys
Jul 07 2014 18:54
@AlericInglewood do you use your Alt or Alt Gr key?
Chris Collins
@cozza13
Jul 07 2014 18:54
you can confirm they are loaded because you will see the edit voxels cube on the right
AlericInglewood
@AlericInglewood
Jul 07 2014 18:55
Pressing alt has no effect at all for me.
Chris Collins
@cozza13
Jul 07 2014 18:55
edit voxels cube on the LEFT
AlericInglewood
@AlericInglewood
Jul 07 2014 18:55
yes it's loaded and I see that.
So, you press ALT and while holding you mouse the mouse? Or you also left click and hold it?
Thijs Wenker
@thoys
Jul 07 2014 18:56
also leftclick and hold it
AlericInglewood
@AlericInglewood
Jul 07 2014 18:57
Ok do this test:
Press alt
click left
move mouse
let mouse go
release alt
press alt
release alt
press alt
click left
move mouse
Thijs Wenker
@thoys
Jul 07 2014 18:59
btw, for the inspect test i think you need voxels or another person arround you to make it work
AlericInglewood
@AlericInglewood
Jul 07 2014 18:59
For me, if it moved the first time - then the second time it won't work anymore (moving mouse does not move the cam)
Thijs Wenker
@thoys
Jul 07 2014 19:00
so ALT did work
AlericInglewood
@AlericInglewood
Jul 07 2014 19:00
Sure, half of the time
Chris Collins
@cozza13
Jul 07 2014 19:00
seems to be just an linux related issue
Clément Brisset
@Atlante45
Jul 07 2014 19:00
If when you press alt you see the camera moving, that means it works
AlericInglewood
@AlericInglewood
Jul 07 2014 19:01
Read https://worklist.net/19830 ... it eat half of the events ... So I can press alt and have it work. but if I press alt once and then try again, then the application doesn't get the event - so then it doesn't work.
Clément Brisset
@Atlante45
Jul 07 2014 19:01
To have the camera move when you move your mouse, you need to click either on a voxel or a models
I think clicking on avatars is still pretty buggy.
AlericInglewood
@AlericInglewood
Jul 07 2014 19:01
I know exactly what is going on.... I put a lot of time in this :. This CAN NOT work on my box.
(and it doesn't, I just verified that again anyway)
Chris Collins
@cozza13
Jul 07 2014 19:02
OK. so this seems to be just related to linux. OSX and PC seem to work as documented
AlericInglewood
@AlericInglewood
Jul 07 2014 19:03
I'm not convinced, did you try to press and release alt once in between?
Chris Collins
@cozza13
Jul 07 2014 19:03
when I release ALT the camer remains in position. I click again it moves again
Thijs Wenker
@thoys
Jul 07 2014 19:03
i can do it over and over, no problem
AlericInglewood
@AlericInglewood
Jul 07 2014 19:04
At some point you have alt pressed and leftmouse pressed and moving the mouse moves the camera right?
Then release the mouse - then release ALT.
Then press and release ALT once(!) - nothing else.
Then press and hold ALT again
then click left-mouse on a voxel and move it again.
Does it STILL work then?
Thijs Wenker
@thoys
Jul 07 2014 19:05
let me check
yup
Chris Collins
@cozza13
Jul 07 2014 19:06
and yes for me as well
Thijs Wenker
@thoys
Jul 07 2014 19:06
does it for you focus a menu?
AlericInglewood
@AlericInglewood
Jul 07 2014 19:06
Ok... I find that weird, cause I didn't see anything that looked like windows or OSX specific :.
But I guess that the conclusion has to be that this is a linux only bug.
Thijs Wenker
@thoys
Jul 07 2014 19:07
Does one of the menu items get focussed when you press and release alt?
AlericInglewood
@AlericInglewood
Jul 07 2014 19:07
If I press ALT and then press the arrow up, it opens the menu yes. That is the whole problem though :P
press and release ALT that is.
Thijs Wenker
@thoys
Jul 07 2014 19:07
ok, for me it doesnt open a menu
then I think its a clear Linux bug
AlericInglewood
@AlericInglewood
Jul 07 2014 19:08
It only opens the menu when I press an arrow key - but the alt key press event is already eaten then.
Chris Collins
@cozza13
Jul 07 2014 19:08
it would seem based on the tests above that it is just a linux bug. When you tested @AlericInglewood did you try anything other than linux?
AlericInglewood
@AlericInglewood
Jul 07 2014 19:09
If I press alt - it switches focus to the menu.. the application doesn't even see it when you release the alt key (in my case). However, if then I press a key that doesn't trigger a menu function then I guess it "works". But what I need is detecting JUST the press and release of the ALT key (with mouse movements)-- which is definitely broken.
@cozza13 No, I only have linux machines.
Thijs Wenker
@thoys
Jul 07 2014 19:10
oh I see how to reproduce it, If i first click once in the top bar
and then press alt and try the cam thing
but OSX has a different kind of menu bar, and windows too
so its really OS specific how this reacts
AlericInglewood
@AlericInglewood
Jul 07 2014 19:11
Yeah, but by clicking on the top bar your canvas legitly loses keyboard focus, so that doesn't seem a problem.
@cozza13 You want to verify this on a linux box? Surely you got one there?
Chris Collins
@cozza13
Jul 07 2014 19:13
yeah I have tested it on linux and can confirm that this is a bug with linux
AlericInglewood
@AlericInglewood
Jul 07 2014 19:16
Would you be willing to pay me $100 for this fix? Then I'll use that to buy a windows license for a VM - heheh. That might come in handy in the future %-). I also spent one day on it anyway. I'm also willing to do it for almost free (I'm a nice guy), ie $10... but not for $0. I have my principles :P. That is, I'm willing to make it available under some open source license, but not to give my copyright away for nothing on top of that. I'm assuming ya all intend to make millions with this application in the end, no?
AlericInglewood
@AlericInglewood
Jul 07 2014 19:40
^^ @cozza13
Chris Collins
@cozza13
Jul 07 2014 19:56
Hi, just back at my desk. I will write up a job to fix the Alt key for Linux.
I will mark this one to pass? https://worklist.net/19830
AlericInglewood
@AlericInglewood
Jul 07 2014 20:06
Why?
Thijs Wenker
@thoys
Jul 07 2014 20:06
I would bid on it but Im not the guy running this with linux, go ahead @AlericInglewood :P
AlericInglewood
@AlericInglewood
Jul 07 2014 20:06
Isn't 19830 correct?
Judas
@judasshuffle
Jul 07 2014 20:35
The desired format for audio I/O is QAudioFormat(24000Hz, 16bit Why was 16/24 chosen over the normal 16/44 for audio bitrate?