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

Tutorials and discussions about Mapping - Introduce your own ones!

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

Postby Dizzy » Sun Nov 19, 2017 2:00 am

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?
Image
Join our UT Discord chat server: https://www.bunnytrack.net/discord
User avatar
Dizzy
Average
 
Posts: 51
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Somewhere above oaf

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

Postby Barbie » Sun Nov 19, 2017 5:22 am

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
Barbie
Godlike
 
Posts: 1323
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

Postby PrinceOfFunky » Sun Nov 19, 2017 6:59 am

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.
User avatar
PrinceOfFunky
Inhuman
 
Posts: 830
Joined: Mon Aug 31, 2015 10:31 pm

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

Postby nogardilaref » Sun Nov 19, 2017 12:06 pm

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.
nogardilaref
Masterful
 
Posts: 547
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

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

Postby XaNKoNII » Sun Nov 19, 2017 1:31 pm

Simpler way, I would recomend using This
Align textures and the process you want becomes much faster
User avatar
XaNKoNII
Experienced
 
Posts: 130
Joined: Wed Jun 09, 2010 12:29 pm
Location: Portugal

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

Postby JackGriffin » Sun Nov 19, 2017 3:12 pm

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.
Terraniux wrote:Veterans are not scary, they get scary when you question them in a inappropriate way.
Persons need a slap to the face, if they keep on doing routines on faults and true errors. Time to wake up and learn.
User avatar
JackGriffin
Godlike
 
Posts: 3334
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

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

Postby Barbie » Sun Nov 19, 2017 3:59 pm

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
Barbie
Godlike
 
Posts: 1323
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

Postby PrinceOfFunky » Sun Nov 19, 2017 8:27 pm

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 :/
User avatar
PrinceOfFunky
Inhuman
 
Posts: 830
Joined: Mon Aug 31, 2015 10:31 pm

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

Postby Hellkeeper » Sun Nov 19, 2017 10:29 pm

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.
User avatar
Hellkeeper
Masterful
 
Posts: 582
Joined: Tue Feb 25, 2014 12:32 pm
Location: France
Personal rank: Soulless Automaton

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

Postby nogardilaref » Mon Nov 20, 2017 1:34 pm

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:
nogardilaref
Masterful
 
Posts: 547
Joined: Tue Jun 20, 2017 1:00 pm
Personal rank: ⚋⚊⚌☰⚞⌖⚟☰⚌⚊⚋

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

Postby Red_Fist » Mon Nov 20, 2017 8:37 pm

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
Red_Fist
Godlike
 
Posts: 1227
Joined: Sun Oct 05, 2008 3:31 am

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

Postby Dizzy » Wed Nov 22, 2017 2:28 am

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.
Image
Join our UT Discord chat server: https://www.bunnytrack.net/discord
User avatar
Dizzy
Average
 
Posts: 51
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Somewhere above oaf

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

Postby Barbie » Wed Nov 22, 2017 4:14 am

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
Barbie
Godlike
 
Posts: 1323
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

Postby Dizzy » Tue Nov 28, 2017 10:31 pm

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
Image
Join our UT Discord chat server: https://www.bunnytrack.net/discord
User avatar
Dizzy
Average
 
Posts: 51
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Somewhere above oaf

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

Postby sektor2111 » Wed Nov 29, 2017 1:44 am

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:
Sample_distance.PNG

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...
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3221
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Next

Return to Mapping

Who is online

Users browsing this forum: No registered users and 13 guests