How to get the numeric dimensions of a brush in UnrealEd?

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf
Contact:

How to get the numeric dimensions of a brush in UnrealEd?

Post by Dizzy »

Is there somewhere in UnrealEd where you can see the numeric dimensions (width/height/depth) of the currently selected brush? Or a console command to access the brush dimensions?

Example:
Image

Obviously this wouldn't be straightforward for complex brushes (polygons, terrain) but for square brushes it should be possible?
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord
User avatar
Barbie
Godlike
Posts: 2784
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Barbie »

I'm afraid there is no such. The reason for it may be that the information that this set of vertices builds a cuboid (or whatever geometric shape) is not stored - it is just a bunch of vertices. Consider also that a brush could be rotated around several axis.

An approach could be that the size of a cuboid is calculated that contains all vertices of a brush.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by PrinceOfFunky »

PostScale axis is 1 as default, which means if the brush was built as 256 then 1=256. TempScale changes but Idk the calculations it does, you can find PostScale and TempScale by creating a t3d and reading the section about that brush or by inputting "editactor name=BrushNUMBER" in the UnrealEditor console.
Otherwise, you could manually count by looking at the grid, just set the grid to 1, also the grid has reference lines that can help you count faster, if you use the max zoom with grid set to 1, then the reference lines should be of 8uu, which means that if you count up to 32 of them then the brush is 256uu on that axis.
"Your stuff is known to be buggy and unfinished/not properly tested"
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by nogardilaref »

Although the bounding box could be found through the vertices, which in the case of a not rotated cuboid would match the bounding box itself, you may as well forget about that altogether without resorting to native coding in some way, given that there's no access to a brush individual vertices through UScript to begin with, afaik.
User avatar
XaNKoNII
Skilled
Posts: 216
Joined: Wed Jun 09, 2010 12:29 pm
Personal rank: Phenix
Location: Portugal

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by XaNKoNII »

Simpler way, I would recomend using This
Align textures and the process you want becomes much faster
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by JackGriffin »

You should talk to yrex, he made this for U227: http://www.oldunreal.com/cgi-bin/yabb2/ ... 262425/0#0
Yrex Tools

The Y_Tools package contains:
<CLIP>
Class Y_Ruler which allows to measure length between two walls from inside or outside. The length is approximate, so e.g. 1023 should be treated as 1024.
He's a great dude and I'm sure would consider making this for UT if it doesn't work there already.
So long, and thanks for all the fish
User avatar
Barbie
Godlike
Posts: 2784
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Barbie »

nogardilaref wrote:there's no access to a brush individual vertices through UScript
The trick is that the user has to copy the brush to the clipboard, and then the UScript can access the brush in T3D format from the clipboard via function PlayerPawn.PasteFromClipboard().
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by PrinceOfFunky »

JackGriffin wrote:yrex, he made this for U227: http://www.oldunreal.com/cgi-bin/yabb2/ ... 262425/0#0
And I thought I was the first one who was executing scripts using BrushBuilders, well that's good there must be some knowledge about it already then.
I was trying to create something that let you send a command through the console but looks like ConsoleCommand() crashes the editor :/
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
Hellkeeper
Inhuman
Posts: 903
Joined: Tue Feb 25, 2014 12:32 pm
Personal rank: Soulless Automaton
Location: France
Contact:

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Hellkeeper »

There's always the option of counting grid squares and multiplying by grid size.
Or just make a brush and teak its dimensions until it fits.
If you have UEd 3.0 at hand, copy/past the brush inside it and use the integrated ruler with CTRL+Middle mouse button.
You must construct additional pylons.
nogardilaref
Masterful
Posts: 577
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by nogardilaref »

Barbie wrote:
nogardilaref wrote:there's no access to a brush individual vertices through UScript
The trick is that the user has to copy the brush to the clipboard, and then the UScript can access the brush in T3D format from the clipboard via function PlayerPawn.PasteFromClipboard().
Woah, that's actually a really clever way of doing it. :o
Nice. :mrgreen:
Red_Fist
Godlike
Posts: 2163
Joined: Sun Oct 05, 2008 3:31 am

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Red_Fist »

Hellkeeper wrote:There's always the option of counting grid squares and multiplying by grid size.
Or just make a brush and teak its dimensions until it fits.
If you have UEd 3.0 at hand, copy/past the brush inside it and use the integrated ruler with CTRL+Middle mouse button.
No, the point is to GET the dimensions from an existing brush without ! doing any of that.

So you have to keep entering numbers and watch the grid, over and over.
Binary Space Partitioning
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf
Contact:

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Dizzy »

JackGriffin wrote:You should talk to yrex, he made this for U227: http://www.oldunreal.com/cgi-bin/yabb2/ ... 262425/0#0
He's a great dude and I'm sure would consider making this for UT if it doesn't work there already.
This sounds pretty much exactly like what I'm looking for, thank you. I'll contact him.
Barbie wrote:
nogardilaref wrote:there's no access to a brush individual vertices through UScript
The trick is that the user has to copy the brush to the clipboard, and then the UScript can access the brush in T3D format from the clipboard via function PlayerPawn.PasteFromClipboard().
Do you know if there's any existing code which does this kinda thing I can take a look at? I've never gone anywhere near editor-related stuff in UScript before.
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord
User avatar
Barbie
Godlike
Posts: 2784
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Barbie »

Dizzy wrote:Do you know if there's any existing code which does this kinda thing I can take a look at?
It's in the web page Jack posted above: look for file "y_dimensionget.7z" on that page.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf
Contact:

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by Dizzy »

Yrex from oldunreal.com made his Unreal extension UT-compatible. So I guess this thread is solved!
https://sites.google.com/site/mojunreal ... ects=0&d=1
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord
User avatar
sektor2111
Godlike
Posts: 6402
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How to get the numeric dimensions of a brush in UnrealEd

Post by sektor2111 »

I'm not sure if everything for Unreal is compatible with UT due to new stuff added in Unreal. I was probing some toys and I have quickly figured that some of those builders doesn't load in UT's Editor because of some properties missing so this way is not available as you might think.

Okay, while I was working on some paths deploy module I have done something due to some brute-force nodes which I'm using around doors - tracing problems in game might not link them in normal situations. Given that I need them closer than 300 UU for linking them with any matter I was interested to find exactly this distance so I wrote a feature into some custom builder - for sure unwanted links through walls are bad so I need to know also how to NOT put them under 300 UU. You can add such 2 actors at brush's ledges and then you can see some distance between them as in picture - here I have two NavigationPoint actors, but these two can be any sort of actors used in mapping:
[attachment=0]Sample_distance.PNG[/attachment]

It uses a very simple Script - no Rocket Science is required here.

Code: Select all

var() bool bLogNewNav, bLogTweakPoint, bGenerateDecoUC, bLogActors, bComputeDistance;
...
event bool Build()
{
...
	if (bComputeDistance)
		ComputeTheseTwo();
...
}
...
final function ComputeTheseTwo()
{
	local Actor A, A1, A2;

	foreach MyMap.AllActors(class'Actor',A)
	{
		if ( A.bSelected && A1 == None )
		{
			A1 = A;
			continue;
		}
		if ( A.bSelected && A2 == None )
		{
			A2 = A;
			break;
		}
	}
	if ( A1 != None && A2 != None )
	{
		log ("Distance between"@A1.Name@and@A2.Name@=@VSize(A1.Location-A2.Location)@UU.);
		A1 = None; A2 = None;
	}
	else
		log("You must have 2 selected actors...");
}
Aside, I have never been interested to find brushes size in my maps - as long as I know what I'm doing there...
Attachments
Sample_distance.PNG
Post Reply