These are chat archives for highfidelity/hifi

31st
Mar 2017
Tiago Andrade
@TagoWill
Mar 31 2017 18:27 UTC
Hello everyone,
I'm new here and I just started developing for High Fidelity.
I'm looking into the edit.js and handControllerGrab.js, trying to find were the scaling objects is happening in the code, but I'm having a hard time finding it.
Can someone point me in to the right direction?
Clément Brisset
@Atlante45
Mar 31 2017 18:28 UTC
Hi @TagoWill, welcome!
Tiago Andrade
@TagoWill
Mar 31 2017 18:28 UTC
@Atlante45 Hi there :)
Clément Brisset
@Atlante45
Mar 31 2017 18:28 UTC
There should be a call to Entities.editEntity(entityID, { ... }) that will change the entity properties. In this case the dimensions.
I can check exactly where that is. One sec.
Tiago Andrade
@TagoWill
Mar 31 2017 18:30 UTC
I'm afk for an hour now, but many thanks in advance! I'll be back :)
Clément Brisset
@Atlante45
Mar 31 2017 18:31 UTC
No worries. You should check out edit.js line 1771:
           } else if (data.action === "resetToNaturalDimensions") {
                if (selectionManager.hasSelection()) {
                    selectionManager.saveProperties();
                    for (i = 0; i < selectionManager.selections.length; i++) {
                        properties = selectionManager.savedProperties[selectionManager.selections[i]];
                        var naturalDimensions = properties.naturalDimensions;

                        // If any of the natural dimensions are not 0, resize
                        if (properties.type === "Model" && naturalDimensions.x === 0 && naturalDimensions.y === 0 &&
                                naturalDimensions.z === 0) {
                            Window.notifyEditError("Cannot reset entity to its natural dimensions: Model URL" +
                                         " is invalid or the model has not yet been loaded.");
                        } else {
                            Entities.editEntity(selectionManager.selections[i], {
                                dimensions: properties.naturalDimensions
                            });
                        }
                    }
                    pushCommandForSelections();
                    selectionManager._update();
                }
            } else if (data.action === "previewCamera") {
                if (selectionManager.hasSelection()) {
                    Camera.mode = "entity";
                    Camera.cameraEntity = selectionManager.selections[0];
                }
            } else if (data.action === "rescaleDimensions") {
                var multiplier = data.percentage / 100.0;
                if (selectionManager.hasSelection()) {
                    selectionManager.saveProperties();
                    for (i = 0; i < selectionManager.selections.length; i++) {
                        properties = selectionManager.savedProperties[selectionManager.selections[i]];
                        Entities.editEntity(selectionManager.selections[i], {
                            dimensions: Vec3.multiply(multiplier, properties.dimensions)
                        });
                    }
                    pushCommandForSelections();
                    selectionManager._update();
                }
Those are the 2 cases that change the entity's dimensions.
Tiago Andrade
@TagoWill
Mar 31 2017 20:32 UTC
@Atlante45 Thank you very much. I will take a look then ;)
Clément Brisset
@Atlante45
Mar 31 2017 20:32 UTC
:thumbsup:
Midnight
@MidnightRift
Mar 31 2017 20:34 UTC
../assignment-client/assignment-client -n 6 what is the -n 6 in that is it telling the assignment client to spawn that number of processes. More to the question, what’s the significance, will it change, and is there a point in adding more ?
Trent Polack
@mittens
Mar 31 2017 20:36 UTC
hey, what do y'all normally use/do for graphical debugging?
i'm used to RenderDoc with UE4, but that requires application-level support i believe
Clément Brisset
@Atlante45
Mar 31 2017 20:46 UTC
@amvmoody The system is architectured in a way that assignment clients are multi-purpose server that can fill out any role that is necessary.
-n 6 means we spawn 6 of those assignment clients. They will each check-in with the domain server and get an assignment dispatched to them if there is one to fill.
Those are the assignment types:
    enum Type : uint8_t {
        AudioMixerType = 0,
        AvatarMixerType = 1,
        AgentType = 2,
        AssetServerType = 3,
        MessagesMixerType = 4,
        EntityScriptServerType = 5,
        EntityServerType = 6,
        AllTypes = 7
    };
Midnight
@MidnightRift
Mar 31 2017 20:47 UTC
so the 6 i believe corresponds to what’s needed for a default server to run. if you need more assignments run will you need to pass in a higher argument in the beginning?
Clément Brisset
@Atlante45
Mar 31 2017 20:48 UTC
Currently, any single domain needs exactly 1 of each, except for the Agents that can be more.
Yes
Midnight
@MidnightRift
Mar 31 2017 20:50 UTC
Okay. What then would you do with the the extra assignemnts. is what where you can choose to run extra scripts on the server ?
Clément Brisset
@Atlante45
Mar 31 2017 20:50 UTC
It is, you currently need 1 agent per domain script.
Midnight
@MidnightRift
Mar 31 2017 20:51 UTC
so inorder to have say 10 agents in a domain you will need a -n 16 ?
Clément Brisset
@Atlante45
Mar 31 2017 20:51 UTC
So if you handle a server manually by command line, and you server has N domain scripts, then you need 6 + N agents.
Yes
Midnight
@MidnightRift
Mar 31 2017 20:52 UTC
okay cheers. Ive been authoring a CentOS SystemD service. and am trying to get it all finalized nice and perty like :)
do you know of any other server type nuances that I should be aware of that do not immidatly jump out?
Clément Brisset
@Atlante45
Mar 31 2017 20:53 UTC
@mittens I'm not sure, maybe @samcake or @jherico could weigh in here.
I think it's been mostly NSIGHT for GPU stuff, otherwise we have a few tools we built ourselves.
Hmmm, maybe worth mentioning is that when you spawn assignments with -n x it'll actually spawn x+1 processes.
x assignment clients and an assignment client monitor, that spawns, monitor, and gathers logs of those ACs.
We've had cases before where the ACs would not exit on domain shutdown.
So as a safety, I'd track those processes and terminate them yourself if it doesn't look like they're shutting down.
Clément Brisset
@Atlante45
Mar 31 2017 20:58 UTC
@mittens In particular, we have a way to generate traces in a json format that you can read in chrome://tracing
Trent Polack
@mittens
Mar 31 2017 20:59 UTC
?
oh, NSIGHT would be useful
Midnight
@MidnightRift
Mar 31 2017 20:59 UTC
systemd should keep track of all proccess spawned by anyhting started from it and send a force kill if necisary (kill -9)
Clément Brisset
@Atlante45
Mar 31 2017 20:59 UTC
Oh I didn't know that, great!
@mittens I haven't personally used NSIGHT, but if you want to set it up and are encountering issues, I can put you in contact with someone on our Graphics team.
Midnight
@MidnightRift
Mar 31 2017 21:01 UTC
Im creating this to be a full Service. its more or less a step below sending out a .rpm have to still build it on the system. On that subject i noticed that everything i build still says dev even if pulled from the stable branch. is there a way to get a build number just like on the sadbox from the windows downlaod?
Trent Polack
@mittens
Mar 31 2017 21:03 UTC
@Atlante45 yeah, that'd be great
Clément Brisset
@Atlante45
Mar 31 2017 21:06 UTC

@amvmoody You need to pass in some flags during the build.
You need to set those environment variables before your cmake call:

RELEASE_TYPE=PRODUCTION
RELEASE_NUMBER=5765

You can get the release number from the git tag.
And you also need to pass in -DCMAKE_BUILD_TYPE=Release to cmake.

Midnight
@MidnightRift
Mar 31 2017 21:08 UTC
okay sounds good so any taged release can be considered production safe ?
Clément Brisset
@Atlante45
Mar 31 2017 21:09 UTC
Any tagged release on the tip of stable.
We tag dev releases on master as well and they follow the same release number sequence.