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

Add entity scale key. #2102

Closed
AlpacaNox opened this issue Mar 7, 2018 · 5 comments · Fixed by #3889
Closed

Add entity scale key. #2102

AlpacaNox opened this issue Mar 7, 2018 · 5 comments · Fixed by #3889
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Enhancement New features
Milestone

Comments

@AlpacaNox
Copy link

AlpacaNox commented Mar 7, 2018

Some engine modifications support duplicating 1 object and making every instance of it of different size through the "scale" entity key.

@AlpacaNox AlpacaNox changed the title Add entity scale key support. Add entity scale key. Mar 7, 2018
@kduske
Copy link
Collaborator

kduske commented Mar 7, 2018

Needs way more information. I don't even know where to look for this info since you don't even mention an example of such an engine modification.

But it's rather unlikely to get supported because I don't want to include engine-specific stuff in TrenchBroom.

@Razumen
Copy link

Razumen commented Mar 15, 2019

Hexen 2 natively has "scale" flags built in for it's entities, not sure about Quake. It allows you to change the scale of individual entities ingame. I believe they all scale from the model's origin, for instance "scale" "2" would double the entities scale. Would be nice to have this represented in the editor much like model rotation is.

@eGax
Copy link
Contributor

eGax commented Mar 15, 2019

There is no native scale function in quake. There are source ports that support this though and I know this to be true for Darkplaces and FTE. For example, you can add a scale key to any entity like an enemy and give it a scale value just like you can for alpha in those same engines.

"classname" "monster_dog"
"origin" "272 -176 -212"
"scale" "2.5"
"alpha" ".666"

This can already be achieved, by adding a scale key to your fgd file, but unfortunately, TrenchBroom doesn't currently apply the scale visually on the model. It would great if TrenchBroom could read the scale key or alpha key values from the fgd or map and apply that to the model in the very same way it does for model frames and skins.

@Razumen
Copy link

Razumen commented Mar 15, 2019

But what about entities like objects and props? Surely showing their scale is helpful for mappers, like lining up geometry, for one.

@kduske
Copy link
Collaborator

kduske commented Mar 27, 2019

From #2678:

In Quake 3 engine games there exists the option to specify "modelscale" key on model ents to have a universal scale float to make the model larger or smaller than default.

You can either set "modelscale" (single float angle that affects xyz) or "modelscale_vec" which expects 3 floats to set each directional scale. modelscale_vec has precedence if both exist.

Could maybe add extra parameters to the entity config script when defining models?

Ex:
{ "scale" : "modelscale", "scaleaxis" : "modelscale_vec" }

JKA game also has support for "zoffset" option for misc_model_static entity which allows shifting the rendered model by specified units from the actual point origin. (Used to avoid having a leaking entity if you want the model to stick in ground more)

@kduske kduske added Type:Enhancement New features Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Area:Game Support labels Mar 27, 2019
@kduske kduske added this to the 2022.2 milestone May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Enhancement New features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants