The Thread For Small Problems And Requests

Re: The Thread For Small Problems And Requests

Postby quaternary » Fri Dec 26, 2014 12:52 am

Noob question time again! :D

What's the best/prettiest way to make a base for a weighted button? My button looks... less than impressive.
Image
User avatar
quaternary
Mantisman
 
Posts: 167
Joined: Apr 1, 2014
Location: Multiverse

Registered users don't see ads! Register now!
 

Re: The Thread For Small Problems And Requests

Postby CJLERCH » Fri Dec 26, 2014 1:21 am

quaternary wrote:
Noob question time again! :D

What's the best/prettiest way to make a base for a weighted button? My button looks... less than impressive.


If you look under sdkcontent\maps\instances, in one of the folders there's a stock base for them. I don't remember exactly which folder, but it's there somewhere. It has black/white and clean/dirty versions.
Online daters be like:
Guy: Hey dure i will date u
Girl: sure
User avatar
CJLERCH
Defective Turret
 
Posts: 48
Joined: Feb 5, 2014
Location: Upper Michigan, Miles Below the Surface

Re: The Thread For Small Problems And Requests

Postby josepezdj » Fri Dec 26, 2014 3:23 am

quaternary wrote:
Noob question time again! :D

What's the best/prettiest way to make a base for a weighted button? My button looks... less than impressive.
You must empty the central part a bit. Try taking a look to Valve's instances as CJLerch suggested. The 'classical' ones are at:

C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\instances\buttons\button_pieces

PTI ones are into (these include the floor_button as well):

C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\instances\p2editor\floor_button_black_intact.vmf

C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\instances\p2editor\floor_button_white_intact.vmf


You'll see that they split a 8 units brush horizontally and then clip the upper part, texturing the parts under the button usually in the toolsblack texture.
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: The Thread For Small Problems And Requests

Postby TeamSpen210 » Sat Dec 27, 2014 3:59 am

I'd recommend you make your own versions of those instances if you're good with clipping (same with doors and funnel frames) - you really only need a vertex-manipulated octagon cutout, not the 300 faces Valve uses. For the cube/ball button, door and funnel you'll want to nodraw everything inside the hole - the models will hide the void completely.
User avatar
TeamSpen210
Community Contributor
 
Posts: 541
Joined: Jul 2, 2013

Re: The Thread For Small Problems And Requests

Postby presto668 » Wed Feb 11, 2015 12:24 am

In the Hammer texture browser there's a texture called glass/glasswindow_refract01 that, based on the vtf and vmt files, seems like it's supposed to produce an effect like the oval-shaped light strips. I would really like to use this texture. Problem is, the actual white oval part doesn't show up, either in Hammer or in-game. The gray/black glass ripple effect is there, but not the white part.

I read on the developer wiki that refract shaders don't work on world brushes, so I tried it on a func_brush and it still doesn't work.

Is there a way to make this texture work correctly? Am I even interpreting how it's supposed to look correctly?
presto668
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Jul 5, 2013

Re: The Thread For Small Problems And Requests

Postby josepezdj » Wed Feb 11, 2015 2:20 am

@presto668: Well, there are several reasons why that texture isn't working for you. You should grab that material from the pak01_dir.VPK and edit the .VMT to change a couple of things:

1. You need to erase the parameter $model 1. This makes the material ready to be used in models only.

2. In order to turn the material into a glass when applied to world brushes, you should add the parameter $translucent 1, otherwise it'll have a solid look being impossible to see through.

3. Even though for models the parameter $basetexture works fine, you can't use it in world brushes. Here you need to replace it by the $refracttinttexture one. However, you can't use the lightcover texture (materials\glass\refract_light_color.vtf) here since it lacks from .VMT file and you'll see a purple checkerboard in game instead. There's a trick if you really want to use this one, to add the ".VTF" file extension inside the .VMT like so:

$refracttinttexture "glass/refract_light_color.vtf"

I don't really know why and how you want to use this, but take into account that the alpha channel for the texture to be used here is the key. For instance, that texture "glass/refract_light_color.vtf" has the oval white shape with transparency (in order to let the light to pass through) while the rest (the gray one) is totally opaque (to avoid the light from passing through). You might consider making a custom texture for this according to what you need.

4. There are a couple of parameters intended to be used in models only, which effect in world brushes is weird, so you better erase them:

- $localrefract 1
- $localrefractdepth "0.05"

That's all you need to change ;)

Take a look to the attached material. I just modified the "materials\glass\glasswindow_refract01.vmt" for you according to the above explanation. I added a custom texture that I used in my map Oxygen Station for the window glass in my observation rooms. I made it with ripples that fit the normal map (which is the one that is actually causing that "curly" refracting effect in game). Also, note that for the several lightcover types (warm, neutral and cool) the only param that changes is the $refracttint one, you might want to play with those values to get your desired color.

Good luck!
Attachments
jose_refract_glasswindow.7z
Refract glass window working materials
(5.01 KiB) Downloaded 16 times
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: The Thread For Small Problems And Requests

Postby Crawfish » Wed Feb 11, 2015 3:36 am

@josepezdj
Although this is mostly unrelated to the problem, I wanted to thank you for all that material info!
I've been wanting to use a simple refracting glass texture for a while, so using parts of what you said, I simply copied the .vmt for observation glass, renamed it, gave it a $refracttinttexture target of my own creation, and voila! Observation glass on more than just observation windows!
Thanks! If I ever feel I need tinted versions I can probably just repeat the process with different tint textures.
I think this site could benefit from a full aesthetic/functionality overhaul. Like the Black Mesa forums. They had a site overhaul recently and personally I've found the new forum much easier to use.
Plus, I kinda find all this white a little blinding.
User avatar
Crawfish
Not Even A Full Time Employee
 
Posts: 54
Joined: Mar 17, 2014

Re: The Thread For Small Problems And Requests

Postby presto668 » Fri Feb 13, 2015 11:30 am

Thanks, jose. I had to change the $refractinttexture in your example, otherwise I just got a big blue and white rectangle. :) Also it seems like $translucent isn't needed in this case.

The reason I wanted it is because I'm trying to make something that looks like a narrower version of the standard light strip. Having gotten the texture working though I think I'm going to have to try another route. The texture looks too... flat? Like it doesn't have the depth of the normal light strip (which I know is a model), and the white oval doesn't look distorted enough.
presto668
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Jul 5, 2013

Re: The Thread For Small Problems And Requests

Postby quaternary » Tue Feb 17, 2015 6:26 pm

Me again, with a modding question.

I've successfully popped a sorta-working FoV slider into the Video Settings menu, which was fun. Basically I took video.res, tweaked it to include a field-of-view slider, and packed it into dlc3. That was easy and it even works too! (sorta hehe)

Now I'm trying to add more buttons (and another menu! wow) to the in-game pause menu (for demos), but I'm running into trouble.

a) Which res file do I need to edit to do this?
b) Will it also work in Puzzlemaker maps or do I need to edit another file?
c) Is this even possible at all, lol, am I crazy.

I tried adding new entries to ingamemainmenu.res, but it's not working (just uses the same menu)
Image
User avatar
quaternary
Mantisman
 
Posts: 167
Joined: Apr 1, 2014
Location: Multiverse

Re: The Thread For Small Problems And Requests

Postby Kilerbomb » Tue Feb 24, 2015 9:23 pm

I seem to be having an issue with creating a .raw file for color correction. I've looked up tutorials on how to do it on Youtube, and followed them correctly. The problem is that when I save the .vcc file, a .raw file is not created, nor do I have the option to save it as a .raw file in the save window. I've searched my Steam directory extensively for the .raw file, but I only found the default ones, not the ones I need to create.
Kilerbomb
I was told I would get $60 if I posted on the forum
 
Posts: 6
Joined: Oct 14, 2011

Re: The Thread For Small Problems And Requests

Postby yishbarr » Tue Aug 01, 2017 3:23 pm

Does anyone know what's wrong with the Portal 1 door and button VMTs?
yishbarr
Olympian and/or War Hero
 
Posts: 1,168
Joined: Dec 10, 2012
Location: Israel

Re: The Thread For Small Problems And Requests

Postby yishbarr » Thu Aug 10, 2017 2:47 pm

Does anyone know how to change a soundscript for the Portalgun and the physics sounds in a map?
yishbarr
Olympian and/or War Hero
 
Posts: 1,168
Joined: Dec 10, 2012
Location: Israel

Registered users don't see ads! Register now!
 
Previous

Return to Hammer and Modding



Who is online

Users browsing this forum: No registered users and 1 guest

Search the Forums

User Menu

Register
Login

Login