These are chat archives for highfidelity/hifi

30th
Jun 2017
bsherrill123
@bsherrill123
Jun 30 2017 05:24
I'm trying to compile the source code using [title]https://github.com/highfidelity/hifi/blob/master/BUILD_WIN.md . the TBBHelpers.h file has some includes of tbb files that it can't find. I've tried downloading from [title]https://www.threadingbuildingblocks.org/ but have been unsuccessful. Any help would be appreciated.
Seth Alves
@sethalves
Jun 30 2017 11:19
normally those file are downloaded by the build process, I think.
bsherrill123
@bsherrill123
Jun 30 2017 14:09
when I run cmake i get some errors too. strangely enough, it says found TBB. some of the errors are,
Could NOT find NSIGHT (missing: NSIGHT_INCLUDE_DIRS NSIGHT_LIBRARIES)
could not find 3DCONNEXIONCLIENT
could not find KINECT
could not find FBX
bsherrill123
@bsherrill123
Jun 30 2017 14:15
and in AddressManager.h it isnt finding #include <glm> so it's not just tbb
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jun 30 2017 15:12
Are js script functions connected to signals, executed at the moment the signal is emitted in c++ or are they run sometime later?
Seth Alves
@sethalves
Jun 30 2017 15:18
@bsherrill123 those errors above are okay, those are all optional. the not finding glm is a problem
in my (Linux) build, I see that file here: ./build/ext/makefiles/gli/project/src/gli/external/glm/glm/glm.hpp
it should be downloaded with the external libraries
our build system doesn't do a great job of recovering from failed downloads
it might be worth deleting your build directory and just rerunning cmake
@JeffHiebert_GP_twitter the javascript interpreter runs on its own thread. in some cases, when a javascript call switches over to C++ code it runs right away, but in other cases, the javascript thread gets paused until the main-loop reaches a place where it's okay to service the javascript call.
in other cases, the result is asynchronous (in the cases where the api returns the result in a callback function)
bsherrill123
@bsherrill123
Jun 30 2017 16:11
does linux use a different folder structure? mine is ./build/ext/vc12
i dont have a glm.hpp file
Seth Alves
@sethalves
Jun 30 2017 16:41
yes, Linux builds have a different structure than windows builds
@bsherrill123 I recommend deleting your build directory, rerun cmake, and capture the cmake commands + arguments and the output, and let us see that
bsherrill123
@bsherrill123
Jun 30 2017 17:25

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\b>e:

E:>cd E:\VisualStudioWorkspace\hifi-master

E:\VisualStudioWorkspace\hifi-master>mkdir build

E:\VisualStudioWorkspace\hifi-master>cd build

E:\VisualStudioWorkspace\hifi-master\build>cmake .. -G "Visual Studio 12 Win64"
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler: E:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: E:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: E:/Program Files (x86)/Microsoft Visual Studi
o 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: E:/Program Files (x86)/Microsoft Visual Studi
o 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- The discovered Windows SDK path is C:/Program Files (x86)/Windows Kits/8.1/Li
b/winv6.3/um/x64
-- The BUILD_BRANCH variable is:
-- The BRANCH environment variable is:
-- The RELEASE_TYPE variable is:
-- The BUILD_GLOBAL_SERVICES variable is: DEVELOPMENT
-- The USE_STABLE_GLOBAL_SERVICES variable is: 0
-- Found GLM: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/glm/project/in
clude
-- Performing Test COMPILER_SUPPORTS_AVX512
-- Performing Test COMPILER_SUPPORTS_AVX512 - Failed
-- Found ZLIB: optimized;E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/zli
b/project/lib/zlib.lib;debug;E:/VisualStudioWorkspace/hifi-master/build/ext/vc12
/zlib/project/lib/zlibd.lib
-- Could NOT find NSIGHT (missing: NSIGHT_INCLUDE_DIRS NSIGHT_LIBRARIES)
-- Found OpenSSL: optimized;E:/OpenSSL-Win64/lib/VC/static/ssleay32MT.lib;debug;
E:/OpenSSL-Win64/lib/VC/static/ssleay32MTd.lib;optimized;E:/OpenSSL-Win64/lib/VC
/static/libeay32MT.lib;debug;E:/OpenSSL-Win64/lib/VC/static/libeay32MTd.lib (fou
nd version "1.0.2l")
-- Found TBB: optimized;E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/tbb/
project/src/tbb/lib/intel64/vc12/tbb.lib;debug;E:/VisualStudioWorkspace/hifi-mas
ter/build/ext/vc12/tbb/project/src/tbb/lib/intel64/vc12/tbb_debug.lib
-- Found NVTT: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/nvtt/project/
src/nvtt/include
-- Found QUAZIP: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/quazip/proj
ect/include
-- Found OpenGL: opengl32
-- Found GLEW: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/glew/project/
include
-- Found Bullet: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/bullet/proj
ect/include/bullet
-- Found Polyvox: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/polyvox/pr
oject/PolyVoxCore/include
-- Could NOT find LeapMotion (missing: LEAPMOTION_INCLUDE_DIRS LEAPMOTION_LIBRA
RIES LEAPMOTION_DLL_PATH)
-- Could NOT find BugSplat (missing: BUGSPLAT_INCLUDE_DIRS BUGSPLAT_LIBRARIES B
UGSPLAT_DLL_PATH BUGSPLAT_RC_DLL_PATH BUGSPLAT_EXE_PATH)
-- Found GIFCREATOR: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/GifCrea
tor/project/src/GifCreator
-- Found OPENVR: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/OpenVR/proj
ect/src/OpenVR/headers
-- Found GLI: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/gli/project/sr
c/gli
Libs LIBOVR_LIBRARIES optimized;E:/VisualStudioWorkspace/hifi-master/build/ext/v
c12/LibOVR/project/Lib/LibOVR.lib;debug;E:/VisualStudioWorkspace/hifi-master/bui
ld/ext/vc12/LibOVR/project/Lib/LibOVRd.lib
-- Found LIBOVR: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/LibOVR/proj
ect/Include
-- Found LIBOVRPLATFORM: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/Lib
OVRPlatform/project/src/LibOVRPlatform/Include
-- Found SDL2: E:/VisualStudioWorkspace/hifi-master/build/ext/vc12/sdl2/project/
src/sdl2/lib/x64/SDL2.lib
-- Found Sixense: E:/VisualStudioWork

Jeff Moyes
@jmo7
Jun 30 2017 18:24

All (and especially Clément)
I changed my code to what Clément suggested:

var MESSAGE_2_TEXTURE_URL = 'https://www.mindstormdevelopment.com/hifi/message-2-noperms.png';
Entities.editEntity( this.entityID, {
    textures: {
        "message-1-start.png.001": MESSAGE_2_TEXTURE_URL
    }
});

Unfortunately it still didn't work. After some experimenting I added in a JSON.stringify:

Entities.editEntity( this.entityID, { textures: JSON.stringify({ "message-1-start.png.001": MESSAGE_2_TEXTURE_URL }) });

and it did something - now when I run this code it does unload the existing texture -- but it nevers seem to put the new texture in.
(I've double checked to make sure my url for the new texture is correct. I also tried several other urls tht I know are good, but only the unload occurs - no loading of the new texture.

(I had wondered if maybe it was loading in the new texture but there was such a size difference in pixels that it wasn't getting applied properly but the new texture is the same pixel dimensions as the original)

To simplify things for testing I even went into my fbx and deleted all textures that weren't being used and renamed the existing texture name from "message-1-start.png.001" to just "message" and then changed my code to reference "message".

So here's the current state of my code:

var MESSAGE_4_TEXTURE_URL = 'https://www.mindstormdevelopment.com/hifi/message-4-setparent.png';

Entities.editEntity( this.entityID, { textures: JSON.stringify({ "message": MESSAGE_4_TEXTURE_URL }) });

Any ideas?

Clément Brisset
@Atlante45
Jun 30 2017 18:26
Oh sorry, that's my bad. I forgot, textures and originalTextures were strings.
Hence why you need the stringify.
@jmo7 This URL does not have a trusted HTTPS certificate.
This is why it doesn't work.
You can either fix the certificate, or just use a HTTP URL.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jun 30 2017 19:46
Should progress and/or proposed solutions to bugs be put here or on the worklist entry for the bug?
Melissa Brown
@themelissabrown
Jun 30 2017 19:46
are you needing auth to keep working or sanity checking your approach?
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jun 30 2017 19:48
More like, "Here's all the things I've been trying out and here's what I've found that works. Is this ok? Is there a better approach?"
Melissa Brown
@themelissabrown
Jun 30 2017 19:48
that can go here
Anything I need to get designer eyes on, I'll send through to the appropriate people
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jun 30 2017 20:50

Progress on bug 21402 "Prevent avatar breaking when changing avatars while sitting":

Here's what's happening: When the player sits using sit.js, the avatar overloads all the role animations (that aren't the left and right hand ik controls) with a sitting idle anim using the overrideRoleAnimation/restoreRoleAnimation apis. These functions save off the original role anims by saving shared pointers to the original anim nodes for each overloaded role to a list and then replacing those anim nodes in the anim tree with new anim nodes that play the new anims. When restoring the original anims, the original anim for each role is looked up in the list and the original node is restored to the tree and the overloading anim node is discarded. When the user switches avatars, the model is changed and then the whole anim tree is reset and rebuilt, so if a role is currently overloaded when the avatar is switched, the original anim node for that role in the restore list is from the old tree. When the overloaded role is eventually restored, the restored anim node is often junk.

The quick hack solution I put together was to modify Rig::restoreRoleAnimation() to make a new anim node based on the parameters from the old anim node and use that to restore.

A more comprehensive solution might be to reload and reapply overloading anims after the rig is initialized, but that's more complicated.

I did attempt to add signals that the sit.js script could connect to so it could remove and reapply its role overloads when the user switches avatars, but the non synchronous nature of script functions running from cpp triggered signals meant I couldn't get the anim cleanup to happen before the avatar switch reset the anim tree on the rig.

TheWizardsQuiver
@TheWizardsQuiver
Jun 30 2017 23:13
@JeffHiebert_GP_twitter I'm curious. Are you saying that the restore list is full of pointers to data that has already been freed?
Melissa Brown
@themelissabrown
Jun 30 2017 23:24
@Atlante45 are you the best resource for worklist 21402? Or is there a better person I can put Jeff in touch with?
Clément Brisset
@Atlante45
Jun 30 2017 23:26
Depends on how you decide to fix it.
If you decide to get around it from the sit script, then yes I am.
If you decide to do the proper fix and make the anim tree handle changing the model, then I'd say Tony of Andrew are the best people.