Skip to content
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

Custom Materials for tagging #6704

Merged
merged 3 commits into from
Nov 29, 2018
Merged

Custom Materials for tagging #6704

merged 3 commits into from
Nov 29, 2018

Conversation

dedmen
Copy link
Contributor

@dedmen dedmen commented Nov 25, 2018

Allows to use custom materials (rvmat) for tag's.
Adds additional "materials" array to the config.
When there are the same number of materials as textures, it will select a random texture and the corresponding material. If the numbers are different it will select random texture and random material.

Allows for things like this:

arma3_x64_2018-11-25_16-34-57

Glow-in-the-dark tags.

Next question would be if we also want to directly implement a glow-in-the-dark spraycan directly in ACE.

@dedmen
Copy link
Contributor Author

dedmen commented Nov 25, 2018

ah crap. the model cfg's belong into armake pr.

@dedmen dedmen force-pushed the materialTags branch 3 times, most recently from 1719114 to a05c783 Compare November 25, 2018 16:16
@dedmen
Copy link
Contributor Author

dedmen commented Nov 25, 2018

For some reason the ace action doesn't do anything when I pack unbinarized.
Not even diag logs are printed. No idea wtf is going on there :D

Ohh... I probably just don't have uniqueUnitItems yet, If that's not released yet.

@jonpas jonpas added the kind/enhancement Release Notes: **IMPROVED:** label Nov 26, 2018
@jonpas jonpas added this to the 3.13.0 milestone Nov 26, 2018
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to handle materials in fnc_quickTag.sqf

if !(_possibleTags isEqualTo []) then {
    private _availableTags = _possibleTags select {(_x select 2) in (_unit call EFUNC(common,uniqueItems))};
    (selectRandom _availableTags) params ["", "", "_textures", "", "_materials"];
    private _styleIndex = floor random count _textures;
    [_unit, (_textures param [_styleIndex, ""]), (_materials param [_styleIndex, ""])] call FUNC(tag);
};

Linking textures and materials like this makes more sense to me than picking 2 at random,
but either way should be ok

@dedmen
Copy link
Contributor Author

dedmen commented Nov 28, 2018

Didn't want to use floor random count because.. YUCK.
And perf doesn't matter here..

Might be a problem? QuickTag line 39 has the X tags hardcoded. What if people add new X's? Should replace that by config entry someday.

Linking textures and materials like this makes more sense to me than picking 2 at random

It might be plain required for some tags to have matching materials. For example if you wanna use normalMaps too. It's look weird when they don't match.

@PabstMirror
Copy link
Contributor

problem with find is if there are multiple similar textures
example
textures = ["A", "A", "B"]
mats = ["X", "Y", "Z"]
will never pick combo A/Y

@dedmen
Copy link
Contributor Author

dedmen commented Nov 29, 2018

okey yeah didn't think of that. But we still only want to select matching ones if they have the same size.
As you can't select material 5 when there are only 2. And a additional selectRandom as default value might be more overhead.

With your above solution it would be possible to associate a texture with no material. But it wouldn't be possible to just have one texture with many random materials.
My way allows for both, you can just add "" into the materials array if you want none.

@PabstMirror PabstMirror merged commit ba18d5f into acemod:master Nov 29, 2018
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.5 Dec 3, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Allow custom materials for tags

* Fix quickTag

* More betterer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:** status/review-pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants