Portal: Stay Inside is a third-party addition to VALVe's game Portal 2. Taking place in the familiar Aperture Science facility at an unspecified point in time, the mod may veer away a little from the franchise's canon but will stay within believable bounds. The mod is expected to have roughly four main areas covering the game's clean, destroyed, and early testing environments. A primary focus for me as the developer is to create an engaging storyline with enjoyable and asthetically satisfying chambers and environments. I am considering making the mod episodic, depending on how development proceeds, but in any case it is currently still under heavy development and closed beta testing. There is currently no expected release date. Stay tuned for more information!

Report RSS How to Recolor Portals (DX9 and Above)

Several people have asked how I modified the portals in Portal: Stay Inside so that not only the portal itself but also the surrounding particle effect is a different color. In this tutorial, I explain some of the basics of skinning and particle system work for DX9 and above portals.

Posted by on - Intermediate Skinning

How do you change the color of portals?

This is a question that has been asked of me a few times recently, so to provide not only an answer but a guide for future reference, I thought I'd write up a tutorial about it. In addition to explaining how to modify the portals themselves, I'll be giving a little bit of information about some of the under-the-hood workings of the Source engine. Please feel free to add comments, PM me, etc.; all feedback is welcome!

What are Portals?

Whenever you're modifying something--especially with the Source engine--it helps to understand what you're modifying. Portals are made of a few different components. There is the code aspect of the portal, which handles the movement of the player from one location to the other, the physics surrounding the portal, etc. Without the next two components, however, portals would simply be a hole in the wall. What surrounds the portal and produces the swirly effect (with the help of the last component) is a regular model, basically similar to a prop that you'd place. In fact, the name of the entity to place an AI-controlled portal is prop_portal. The model, however, would be invisible if it weren't for the texture that covers it. The final item that makes up a portal is a particle system. This generates the "swirling mist" effect in front of the portal and also handles the various "fizzle" effects. In this tutorial, we'll be modifying the texture and the particle system.

Step 1: Editing the Textures

Alright, a little more background on the textures first. There are two sets of textures for portals: one is used on machines that are running DirectX 8 or below graphics, and one (more detailed) is used on machines running DirectX 9 or higher. If you're simply changing your portals for your own enjoyment, you only have to modify the textures for your system. However, if you're distributing the modified portals in a mappack (see note at bottom of tutorial) or a Sourcemod, you should edit both sets to ensure everyone sees your fine work. Since I'm still trying to figure out how to modify the DX8 textures, we'll only cover the DX9 textures in this tutorial.
Down to business. Download a copy of VTFEdit if you don't already have it installed and navigate to "portal content.gcf" this file will reside, most often, in C:/Program Files/Steam/steamapps/. Once you've opened the GCF, find /portal/materials/models/portals/ and extract the files

--portal-blue-color.vtf
--portal-orange-color.vtf

to the same directory for your project. By this I mean extract it to C:/Program Files/Steam/steamapps//portal/portal/materials/models/portals/ if you're making a mappack and C:/Program Files/Steam/steamapps/sourcemods/{mod_name_here}/materials/models/portals/ if you're making a mod. Now open up the textures in your favorite image editing application. Look at the textures. They're 1 pixel tall and 256 pixels wide. The left side appears black (or possibly transparent), and the right side appears blue (or orange). You can do pretty much whatever you want, as long as the texture stays 256x1 pixels, but there are a few rules to keep in mind if you want your portals to look like VALVE's. First, the texture isn't actually black; the black represents transparency. So to change the color of the portals and have them look similar to VALVE's, create a 256px wide by 1px tall gradient that is completely transparent on the far left side and completely opaqe with whatever color you desire on the far right side. Save these as VTFs using whatever method you choose. If you've worked with the Source engine already, you will already have done this, because the first thing you learn in Source work is that you must save every twenty seconds to be safe.

Step 2: Editing the Particles

Now we're going to work a bit with particle systems (the mist and such around portals). First, extract "portals.pcf" from "portal content.gcf/portal/particles/" into the particles directory of Portal or your mod. To run the built-in particle editor that comes with Source games, add "-tools"--without the quotes-- to the end of the target of the shortcut for either Portal or your mod. Now run the shortcut, and when the game launches, you'll see something like

The Source particle editor.

Now click File-->Open--> and navigate to the place where you extracted portals.pfc. Open it. There are several particle subsystems. Click on one of them, and it will open; it will look something like this.

An opened particle subsystem.

Basically, go through all of the subsystems and find color values that are either blue or orange. They're green in the above screenshot because I've opened the edited particle system for Portal: Stay Inside. These correspond to the blue/orange mists surrounding the portals, and you can change them to whatever you want. Once you're done, click File-->Save and you can close the editor.

Finished Results

Here's an example of finished results; these are the portals being used in Portal:Stay Inside.

An example of finished recolored portals.

Wrapping Up

Well, that's just about it! I'll explain a bit about why I haven't done anything for DX8 portals. First, I apologize to those who are running DX8 systems for not covering it, but I'm still working on figuring out the textures. They're harder to modify than the DX9 ones, because they appear to have two different facets. In any case, the good news is that the process of modifying the DX8 particles is identical to the DX9 ones; just use portals_dx80.pcf instead of portals.pcf. If I can solve the DX8 texture issue, I'll certainly edit this tutorial. Good luck with modding and thanks for reading!

Best regards,
WinstonSmith

Post comment Comments
sbrown
sbrown - - 2 comments

That right there is ******* awesome. Whens stay inside released? Do you need more help?

Reply Good karma Bad karma+1 vote
WinstonSmith Author
WinstonSmith - - 83 comments

When will it be released? No clue. Certainly after Portal 2, and even then, I haven't the slightest. It's still in fairly early alpha stage. Right now I think I've got a fairly good handle on it, but thanks for the offer.

Reply Good karma+1 vote
fadi.naoum.
fadi.naoum. - - 746 comments

THANKS BUT HOW DID U CHANGE THE GLOW

Reply Good karma Bad karma0 votes
WinstonSmith Author
WinstonSmith - - 83 comments

Which glow are you referring to?

Reply Good karma+1 vote
theyoungster
theyoungster - - 17 comments

i'm assuming the blue and orange glows that appear on the portalgun.

Reply Good karma Bad karma+4 votes
vorteks
vorteks - - 3 comments

^this

Reply Good karma Bad karma+1 vote
Coconutdoobie
Coconutdoobie - - 1,067 comments

I recolored them to be the same color.

Reply Good karma Bad karma+3 votes
UnLeAsHeD-LoRd-
UnLeAsHeD-LoRd- - - 378 comments

Very good mate well done!

Reply Good karma Bad karma+1 vote
cpw1
cpw1 - - 2 comments

My favorite editing application doesn't know how to open the files for some reason. Can you help me out?

Reply Good karma Bad karma+2 votes
cpw1
cpw1 - - 2 comments

Oh, yeah one last thing. My email is Quotedconman@hotmail.com

Reply Good karma Bad karma+1 vote
ShagoR
ShagoR - - 1 comments

Hi,

im able to change the particles,

but not the whole portal, can u advise where to save them?

many
thx

Reply Good karma Bad karma+1 vote
BrettMatt
BrettMatt - - 1 comments

Hey,

When i change the color of the portal i keep one side black and make one side completly opaqe with the color i want but when i go into the game its black. No matter what color i put its black, and when i try to change the color of the particles no matter what color i make the edge or vaccume it stays its original color. Please help.

Thanks for your help

Reply Good karma Bad karma+1 vote
Heliophobe
Heliophobe - - 2 comments

Where do I add the "-tools" part? I tried in the shortcut extension, and in the file path. Both didn't work.

Reply Good karma Bad karma+2 votes
Heliophobe
Heliophobe - - 2 comments

never mind, I got it....

Reply Good karma Bad karma0 votes
Cambofranks
Cambofranks - - 2 comments

Please tell me how

Reply Good karma Bad karma+1 vote
Groxkiller585
Groxkiller585 - - 131 comments

I cannot edit the portals, because the PCF does not have any color values. (exept one but it is both the wrong color and has no effect on the portals) help?

Reply Good karma Bad karma+1 vote
Wheatley 
Wheatley  - - 44 comments

After editing anything with tools mode, the system disables the content you just edited. You need to restart the game (quit then re-open game) to see the results.

Reply Good karma Bad karma+1 vote
CubitGames
CubitGames - - 1 comments

i changed the 1 color, then saved and re-opened, nothing changed, tested without -tools, game is still the same.

Reply Good karma Bad karma+1 vote
Crawfishness
Crawfishness - - 1 comments

Can I get some help? I can't edit the portal_projectiles.pcf! Every time I edit it, it just reverts back to it's original state when I close it and re-open it!

Reply Good karma Bad karma+2 votes
Guest
Guest - - 689,183 comments

try SAVING it

Reply Good karma Bad karma+1 vote
Cambofranks
Cambofranks - - 2 comments

Where do i add -tools?

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,183 comments

This comment is currently awaiting admin approval, join now to view.

Guest
Guest - - 689,183 comments

I Cant Actually FIND The Content File So... What?

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,183 comments

i have downloaded VFT but the game cache files are not showing. help?

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,183 comments

Can this work on portal 2

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,183 comments

Please just make a tutorial I'm sick of this goose chase. It shouldn't be such a pain just to switch the color of your portals. Make a tutoral with step by step directions PLEASE.

Reply Good karma Bad karma+1 vote
Guest
Guest - - 689,183 comments

This comment is currently awaiting admin approval, join now to view.

Viiz1on
Viiz1on - - 1 comments

i cant find the portal texture in portal 1 or portal 2 in the game files

Reply Good karma Bad karma+1 vote
itscolmei
itscolmei - - 5 comments

I CANT FIND ANY BLUE COLOR VALUES FOR THE PROJECTILE BALL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: