Page 1 of 2

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

Posted: Sun Nov 19, 2017 2:00 am
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?

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

Posted: Sun Nov 19, 2017 5:22 am
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.

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

Posted: Sun Nov 19, 2017 6:59 am
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.

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

Posted: Sun Nov 19, 2017 12:06 pm
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.

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

Posted: Sun Nov 19, 2017 1:31 pm
by XaNKoNII
Simpler way, I would recomend using This
Align textures and the process you want becomes much faster

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

Posted: Sun Nov 19, 2017 3:12 pm
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.

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

Posted: Sun Nov 19, 2017 3:59 pm
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().

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

Posted: Sun Nov 19, 2017 8:27 pm
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 :/

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

Posted: Sun Nov 19, 2017 10:29 pm
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.

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

Posted: Mon Nov 20, 2017 1:34 pm
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:

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

Posted: Mon Nov 20, 2017 8:37 pm
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.

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

Posted: Wed Nov 22, 2017 2:28 am
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.

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

Posted: Wed Nov 22, 2017 4:14 am
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.

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

Posted: Tue Nov 28, 2017 10:31 pm
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

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

Posted: Wed Nov 29, 2017 1:44 am
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...