Splitskybox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Page creation)
 
m (→‎Info: Unicodifying, replaced: [[Image: → [[File:)
 
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
Your Composite Skybox MUST be arranged like this;
Your Composite Skybox MUST be arranged like this;


[[Image:Hdr_skybox_sides.jpg]]
[[File:Hdr_skybox_sides.jpg]]


==Usage==
==Usage==
Line 13: Line 13:


  @ECHO OFF
  @ECHO OFF
  "%sourcesdk%\bin\orangebox\bin\splitskybox.exe" "%~dpn1.pfm"
:loop
  "%sourcesdk%\bin\orangebox\bin\splitskybox.exe" %1
SHIFT
IF NOT "%~1" == "" GOTO loop
  PAUSE
  PAUSE


{{tip|%~dpn1 means <'''D'''rive>-<'''P'''ath>-<'''N'''ame>-<'''1'''st file called>, if you want to be able to drag more than 1 file at a time, copy the whole line and change the number 1 to 2, 3, 4 etc all the way up 9 (Windows Batch doesn't support dragging-dropping of more than 9 files at once onto a Batch).}}
Now all you need to do is drag and drop one or more Composite PFM Skybox files onto the batch file, and it should give an output like this; (Taken from the [[HDR_Skybox_Creation|HDR Skybox]] Tutorial)
 
Now all you need to do is drag and drop the Composite PFM Skybox onto the batch file, and it should give an output like this; (Taken from the [[HDR_Skybox_Creation|HDR Skybox]] Tutorial)


<pre>
<pre>
Line 31: Line 32:
Press any key to continue . . .
Press any key to continue . . .
</pre>
</pre>
{{SDKTools}}


[[Category:Material System]]
[[Category:Material System]]

Latest revision as of 13:12, 8 January 2024

Info

Splitskybox is a command line utility that splits a composite .PFM Skybox into separate .PFM images.

Your Composite Skybox MUST be arranged like this;

Hdr skybox sides.jpg

Usage

splitskybox.exe blah.pfm

For ease of use, create a batch file in the same directory as your Skybox composite, name it splitskybox.bat, and copy this into it;

@ECHO OFF
:loop
"%sourcesdk%\bin\orangebox\bin\splitskybox.exe" %1
SHIFT
IF NOT "%~1" == "" GOTO loop
PAUSE

Now all you need to do is drag and drop one or more Composite PFM Skybox files onto the batch file, and it should give an output like this; (Taken from the HDR Skybox Tutorial)

splitskybox.exe "C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdr.pfm"

filename: C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdrft.pfm
filename: C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdrlf.pfm
filename: C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdrbk.pfm
filename: C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdrrt.pfm
filename: C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdrup.pfm
filename: C:\Program Files\Steam\SteamApps\username\sourcesdk_content\dod\materialsrc\skybox\sdk_sky_example_hdrdn.pfm
Press any key to continue . . .