This article relates to the game "Counter-Strike 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Image Subrect Editor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{cs2 topicon}}{{langsp}}
{{source 2 topicon}}
{{source 2 topicon}}
{{Language subpage}}
{{hlawt topicon}}
[[File:image_subrect_editor_overview.png|512px|thumb|right|The Image Subrect Editor window]]
{{Dota 2 WT topicon}}  
[[File:image_subrect_editor_overview.png|384px|thumb|right|The Image Subrect Editor window]]
<!--[[File:Hotspot_Texturing-132121047.png|384px|thumb|right|Hotspot Example]]-->
 
{{imgSubrect|2}} is a tool in Source 2 used for making [[Half-Life: Alyx Workshop Tools/Level Design/Hotspot Texturing|Hotspots]]. Hotspots are predefined sections of a texture used to apply materials to Hammer geometry fast and easy.
<br>
{{note|{{imgSubrect|4}} is not included in {{svrh|4}}.}}
 


{{imgSubrect|2}} is a tool in Source 2 used for making [[Half-Life: Alyx Workshop Tools/Level Design/Hotspot Texturing|Hotspots]]. Hotspots are predefined sections of a texture used to apply materials to Hammer geometry fast and easy.


== 1. Viewport ==
== 1. Viewport ==
The viewport is where rectangles are drawn to specify what parts of the texture can get applied to geometry.
 
The viewport is where rectangles are drawn to specify what parts of the texture can get applied to hammer geometry.
* In Create mode, click dragging in the viewport will draw a rectangle.
* In Create mode, click dragging in the viewport will draw a rectangle.
* In Adjust mode, click dragging on an existing rectangle will move it.
* In Adjust mode, click dragging on an existing rectangle will move it. You can also move edges and corners.
* Clicking an existing rectangle will select that rectangle, allowing you to change it's properties. You can hold {{Key|Shift}} to select multiple rectangles and hold {{Key|Ctrl}} to deselect rectangles.
* Clicking an existing rectangle will select that rectangle, allowing you to change it's properties. You can hold {{Key|Shift}} to select multiple rectangles and hold {{Key|Ctrl}} to deselect rectangles.
* The grid size can be changed with {{Key|[}} to make it smaller and {{Key|]}} to make it bigger. These options are also under "Edit." Grid visibility can also be toggled here.
* The grid size can be changed with {{Key|[}} to make it smaller and {{Key|]}} to make it bigger. These options are also under "Edit." Grid visibility can also be toggled here.
Line 17: Line 25:


<br>
<br>
<gallery>
<gallery>
Image_subrect_editor_drawing.gif|Drawing rectangles in the Subrect Editor (Click to See Gif!)
Image_subrect_editor_drawing.gif|Drawing rectangles in the Subrect Editor (Click to See Gif!)
Line 25: Line 34:
== 2. Rectangle Properties ==
== 2. Rectangle Properties ==


This is where you draw the squares that make up where UV. There are two modes: Create and Adjust.
There are two modes: Create and Adjust.
* Create will allow you to draw new rectangles across the texture.
* Create will allow you to draw new rectangles across the texture.
* Adjust lets you change the size of previously drawn rectangles.
* Adjust lets you change the size of previously drawn rectangles.
"Allow Rotation" allows that rectangle to be rotated when applying the hotspot in Hammer.
 
There are two options available to change on selected rectangles.
* "Allow Rotation" allows that rectangle to be rotated when applying the hotspot in Hammer.
* "Allow Tiling" {{hla|not}} will tile that rectangle when applied to faces in hammer.
{{inline note | name=[[file:note.png|10px|link=]] Note | When you check "Allow Tiling" on a rectangle, that rectangle will tile horizontally, never vertically. }}
{{inline note | name=[[file:note.png|10px|link=]] Note | Checking "Allow Tiling" on a rectangle that isn't the width of the texture will still tile the whole width, not the rectangle. Basic UV rules still apply. }}
 
"Inset X/Y" fields are what hammer will use as the default inset. Fast Texture Tool will use these values when selecting a rectangle. Insets are also useful for when your trim texture has a bevel. More inset the rectangle, the thinner the bevel.
 
<!--{{note|When you check "Allow Tiling" on a rectangle, that rectangle will tile horizontally only, never vertically.}}-->
<!--{{note|If your rectangle doesn't fill the width of your texture and you check "Allow Tiling," it will tile the width of the image horizontally anyway, as it expects the rectangle to fit the width of the image.}}-->
<br>
<br>
"Allow Tiling" {{hla|not}} will tile that rectangle when applied to faces in hammer.
 
{{note|When you check "Allow Tiling" on a rectangle, that rectangle will tile horizontally only, never vertically.}}
{{note|If your rectangle doesn't fill the width of your texture and you check "Allow Tiling," it will tile the width of the image horizontally, as it expects the rectangle to fit the width of the image.}}
[[File:Image_subrect_editor_rectangle_properties.png|thumb|256px|none|Rectangle Properties Section]]
[[File:Image_subrect_editor_rectangle_properties.png|thumb|256px|none|Rectangle Properties Section]]


== 3. Active Material ==
== 3. Active Material ==
You can choose a material to reference in the viewport. This is useful for creating rectangles for a trimsheet. <br>
You can choose a material to reference in the viewport. This is useful for creating rectangles for a trimsheet. <br>
When a material is selected, you can then change the preview to any texture that material uses.
When a material is selected, you can then change the preview to any texture the currently selected material uses.
[[File:Image_subrect_editor_tex_preview.png|256px|thumb|none|Image Subrect Editor with Preview Texture]]
[[File:Image_subrect_editor_tex_preview.png|256px|thumb|none|Image Subrect Editor with Preview Texture]]



Latest revision as of 16:08, 22 November 2024

English (en)Translate (Translate)

The Image Subrect Editor window

Image Subrect Editor Image Subrect Editor is a tool in Source 2 used for making Hotspots. Hotspots are predefined sections of a texture used to apply materials to Hammer geometry fast and easy.

Note.pngNote:Image Subrect Editor Image Subrect Editor is not included in SteamVR Home SteamVR Home.


1. Viewport

The viewport is where rectangles are drawn to specify what parts of the texture can get applied to hammer geometry.

  • In Create mode, click dragging in the viewport will draw a rectangle.
  • In Adjust mode, click dragging on an existing rectangle will move it. You can also move edges and corners.
  • Clicking an existing rectangle will select that rectangle, allowing you to change it's properties. You can hold Shift to select multiple rectangles and hold Ctrl to deselect rectangles.
  • The grid size can be changed with [ to make it smaller and ] to make it bigger. These options are also under "Edit." Grid visibility can also be toggled here.
  • Holding Alt will let you adjust the rectangles as you were in Adjust mode.
Note.pngNote:You can only select existing rectangles in Create mode.
Note.pngNote:Adjusting an existing rectangle will reset that rectangles properties. (If it's marked as "Allow Rotation" or "Allow Tiling.")



2. Rectangle Properties

There are two modes: Create and Adjust.

  • Create will allow you to draw new rectangles across the texture.
  • Adjust lets you change the size of previously drawn rectangles.

There are two options available to change on selected rectangles.

  • "Allow Rotation" allows that rectangle to be rotated when applying the hotspot in Hammer.
  • "Allow Tiling" (not in Half-Life: Alyx) will tile that rectangle when applied to faces in hammer.
Note.png Note:  When you check "Allow Tiling" on a rectangle, that rectangle will tile horizontally, never vertically.
Note.png Note:  Checking "Allow Tiling" on a rectangle that isn't the width of the texture will still tile the whole width, not the rectangle. Basic UV rules still apply.

"Inset X/Y" fields are what hammer will use as the default inset. Fast Texture Tool will use these values when selecting a rectangle. Insets are also useful for when your trim texture has a bevel. More inset the rectangle, the thinner the bevel.


Rectangle Properties Section

3. Active Material

You can choose a material to reference in the viewport. This is useful for creating rectangles for a trimsheet.
When a material is selected, you can then change the preview to any texture the currently selected material uses.

Image Subrect Editor with Preview Texture

TODO

Create section specifying use in Material Editor and Hammer