The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Difference between revisions of "Legacy:Transform Permanently"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Alignment)
(Deep into Transform Permanently)
 
(4 intermediate revisions by the same user not shown)
Line 48: Line 48:
  
 
Here you can see the "transformed" brush:
 
Here you can see the "transformed" brush:
<uscript>Begin Actor Class=Brush Name=Brush6
+
<uscript>
 +
Begin Actor Class=Brush Name=Brush6
 
     CsgOper=CSG_Add
 
     CsgOper=CSG_Add
 
     MainScale=(SheerAxis=SHEER_ZX)
 
     MainScale=(SheerAxis=SHEER_ZX)
Line 56: Line 57:
 
     Tag=Brush
 
     Tag=Brush
 
     Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
 
     Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
     Location=(X=5440.0,Y=-5000.0,Z=-20.0)
+
     Location=(X=4352.0,Y=-4000.0,Z=-16.0)
 
     Begin Brush Name=Model7
 
     Begin Brush Name=Model7
 
       Begin PolyList
 
       Begin PolyList
 
           Begin Polygon Texture=Swater4a Flags=67109132 Link=0
 
           Begin Polygon Texture=Swater4a Flags=67109132 Link=0
             Origin  -4000.0,5840.0,0.0
+
             Origin  -3200.0,4672.0,0.0
 
             Normal  0.0,0.0,1.0
 
             Normal  0.0,0.0,1.0
             TextureU  0.313062384,0.24898184109589042,0.0
+
             TextureU  0.39132798,0.311227301369863,0.0
             TextureV  -0.248981824,0.3130623780821918,0.0
+
             TextureV  -0.31122728,0.3913279726027397,0.0
             Vertex -4000.0,5840.0,0.0
+
             Vertex -3200.0,4672.0,0.0
             Vertex -4000.0,-5840.0,0.0
+
             Vertex -3200.0,-4672.0,0.0
             Vertex 4000.0,-5840.0,0.0
+
             Vertex 3200.0,-4672.0,0.0
             Vertex 4000.0,5840.0,0.0
+
             Vertex 3200.0,4672.0,0.0
 
           End Polygon
 
           End Polygon
 
       End PolyList
 
       End PolyList
 
     End Brush
 
     End Brush
 
     Brush=Model'MyLevel.Model7'
 
     Brush=Model'MyLevel.Model7'
     PrePivot=(X=4000.0,Y=-5840.0,Z=0.0)
+
     PrePivot=(X=3200.0,Y=-4672.0,Z=0.0)
 
     Name=Brush6
 
     Name=Brush6
 
End Actor</uscript>
 
End Actor</uscript>
 +
 +
Algorithm
 +
<uscript>
 +
For brush:
 +
    Set Rotation=0
 +
    Set MainScale=0
 +
    Set PostScale=0
 +
For Origin and each vertices:
 +
    Do *= MainScale
 +
    Then MakeRotate(Pitch,Yaw,Roll)
 +
    Finally: *= PostScale
 +
For Normal:
 +
    Do MakeRotate(Pitch,Yaw,Roll)
 +
</uscript>
 +
 +
For rotation matrix, see this section: http://wiki.beyondunreal.com/Legacy:T3D_File
  
 
==Related Topics ==
 
==Related Topics ==

Latest revision as of 09:04, 29 December 2008

This page should give a simple explanation of the Transform Permananetly command... work in progress, feel free to add.

shunted from the beginner faq:

When you're trying to rotate a brush and it doesn't want to, it just changes shape as you try to rotate it, this is what to do.

Brush Context Menu -> Transform -> Transform Permanently

Also use Transform Permanently on brushes which you've scaled, etc.

Alignment[edit]

Align the textures *after* you used transform permanently, since it will reset your brush completely, including the alignments of the textures. Try to use it while you're finishing your map, and only if you're positive you won't change the brush anymore.

Deep into Transform Permanently[edit]

When using Unreal Engine 1.0 and 2.0 versions, brushes vertex values are not updated if you rotate or scale up/down it. It is using Rotation,MainScale,PostScale and TempScale to do so. See sample brush here taken from AS-Mazon(Unreal Tournament) map:

Begin Actor Class=Brush Name=Brush6
    CsgOper=CSG_Add
    MainScale=(SheerAxis=SHEER_ZX)
    PostScale=(Scale=(X=50.000000,Y=73.000000),SheerAxis=SHEER_ZX)
    PolyFlags=67109132
    Level=LevelInfo'MyLevel.LevelInfo0'
    Tag=Brush
    Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
    Location=(X=4352.000000,Y=-4000.000000,Z=-16.000000)
    Rotation=(Yaw=-16384)
    Begin Brush Name=Model7
       Begin PolyList
          Begin Polygon Texture=Swater4a Flags=67109132 Link=0
             Origin   -00064.000000,-00064.000000,+00000.000000
             Normal   +00000.000000,+00000.000000,+00001.000000
             TextureU -00022.719593,+00019.566399,+00000.000000
             TextureV -00028.566942,-00015.561364,+00000.000000
             Vertex   -00064.000000,-00064.000000,+00000.000000
             Vertex   +00064.000000,-00064.000000,+00000.000000
             Vertex   +00064.000000,+00064.000000,+00000.000000
             Vertex   -00064.000000,+00064.000000,+00000.000000
          End Polygon
       End PolyList
    End Brush
    Brush=Model'MyLevel.Model7'
    PrePivot=(X=64.000000,Y=64.000000)
    Name=Brush6
End Actor

When using "Transform Permanently",the editor updates vertex,prepivot,origin and normal values so that Rotation and scale values are not set.

Here you can see the "transformed" brush:

Begin Actor Class=Brush Name=Brush6
    CsgOper=CSG_Add
    MainScale=(SheerAxis=SHEER_ZX)
    MainScale=(SheerAxis=SHEER_ZX)
    PolyFlags=67109132
    Level=LevelInfo'MyLevel.LevelInfo0'
    Tag=Brush
    Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
    Location=(X=4352.0,Y=-4000.0,Z=-16.0)
    Begin Brush Name=Model7
       Begin PolyList
          Begin Polygon Texture=Swater4a Flags=67109132 Link=0
             Origin   -3200.0,4672.0,0.0
             Normal   0.0,0.0,1.0
             TextureU   0.39132798,0.311227301369863,0.0
             TextureV   -0.31122728,0.3913279726027397,0.0
             Vertex -3200.0,4672.0,0.0
             Vertex -3200.0,-4672.0,0.0
             Vertex 3200.0,-4672.0,0.0
             Vertex 3200.0,4672.0,0.0
          End Polygon
       End PolyList
    End Brush
    Brush=Model'MyLevel.Model7'
    PrePivot=(X=3200.0,Y=-4672.0,Z=0.0)
    Name=Brush6
End Actor

Algorithm

For brush:
    Set Rotation=0
    Set MainScale=0
    Set PostScale=0
For Origin and each vertices: 
    Do *= MainScale
    Then MakeRotate(Pitch,Yaw,Roll)
    Finally: *= PostScale
For Normal: 
    Do MakeRotate(Pitch,Yaw,Roll)

For rotation matrix, see this section: http://wiki.beyondunreal.com/Legacy:T3D_File

Related Topics[edit]