Jump to content

NAB622

Members
  • Posts

    519
  • Joined

  • Last visited

Posts posted by NAB622

  1. On 12/22/2020 at 1:03 PM, fullkevlar said:

    no luck getting anything out of the effect, im doing something wrong.

    I just looked up my shaders from years ago. I was actually using alphagen wave and not rgbgen wave, and blendFunc GL_SRC_ALPHA GL_ONE. See if that helps. Sorry, my bad! Memory is fuzzy, this was more than 12 years ago and I'm having to look through 3 computers of archived data...

     

    1 hour ago, fullkevlar said:

    What aspect of the disco shows the effect you are trying to teach me with the keyword and values rgbgen const wave inversesawtooth 0 1 0 1 ?  There's a lot going on there lol.   

    Is it the dance floor with the lights that bloom one at a time in colors?

    It's literally everything. The blinking shaders are applied to func_wall entities, and during runtime the script is simply toggling those func_walls on and off, which essentially enables and disables patterns of lights on the disco floor, or toggles the sequential lights around the room. Each of those items can also be toggled in red, green or blue, which can be used to mix and match colors.

    Here's a couple of shaders to illustrate what's happening with the sequential lights, since that's the simplest part to show:

    Spoiler
    
    textures/dread_e/discolight_green_1
    {
    	qer_editorimage	textures/dread_e/imp_insignia
    	q3map_nolightmap
        {
            map $whiteimage
            blendFunc GL_SRC_ALPHA GL_ONE
            rgbGen const ( 0.000000 0.900000 0.000000 )
            alphaGen wave triangle -0.285 1.5 0 2.5
        }
    }
    
    textures/dread_e/discolight_green_2
    {
    	qer_editorimage	textures/dread_e/imp_insignia
    	q3map_nolightmap
        {
            map $whiteimage
            blendFunc GL_SRC_ALPHA GL_ONE
            rgbGen const ( 0.000000 0.900000 0.000000 )
            alphaGen wave triangle -0.285 1.5 0.33 2.5
        }
    }
    
    textures/dread_e/discolight_green_3
    {
    	qer_editorimage	textures/dread_e/imp_insignia
    	q3map_nolightmap
        {
            map $whiteimage
            blendFunc GL_SRC_ALPHA GL_ONE
            rgbGen const ( 0.000000 0.900000 0.000000 )
            alphaGen wave triangle -0.285 1.5 0.66 2.5
        }
    }

     

    In your case, since you're looking for a strobe effect, you'll probably want to use wave inversesawtooth instead of wave triangle, and of course you'll want to tweak the numeric values to match what your needs are.

    Sorry for how complicated this is....this is quite an extreme example. Unfortunately I do not have any other examples to show. :/

    I should have mentioned this at the start, but this is only really useful for a decorative strobe. If you're looking to make a strobe light that casts light on the room around it, this method cannot be used. The best way to do that would be 100% scripts, but it won't be very strobe-like...more like a random blink. (In the video I linked, there is such an effect at the end.)

    OCD2 likes this
  2.  

    Blinking shaders are mega easy. In your case, since you just want a light to appear, use blendFunc GL_ONE GL_ONE on the glow stage. Then use rgbGen const wave to make the blinking happen. The wave function adds an oscillator to the shader stage.

    I'll try and give a basic summary of it, but the waveform functions can be found in the Q3 shader manual, section 2.4.8, "Waveform Functions"
    http://toolz.nexuizninjaz.com/shader/

     

    The final line in your shader will consist of rgbGen const wave <waveform> <base> <amplitude> <frequency> <phase>.

    <waveform> can be sin, triangle, square, sawtooth, or inversesawtooth - in your case, inversesawtooth will give you the most control.
    
    <base> Generally this is 0. This is the lowest point of your oscillator.
    
    <amplitude> This is the lowest point of your oscillation, generally 1 but it can vary based on what you're doing.
    
    <frequency> This is how many times per second the waveform oscillates.
    
    <phase> This is how far along in the first cycle the oscillator will start. This is useful for timing several shaders to be synchronized.

     

    Because all of the numeric values are normalized between 0 and 1, anything that exceeds that range will be treated as the maximum value. You can abuse this to make the strobe blink. I would suggest starting with something like this so you can see what the oscillator is doing:

    {
    	map textures/colors/white
    	blendfunc GL_ONE GL_ONE
    	rgbgen const wave inversesawtooth 0 1 0 1
    }

    Once you've seen how it works, change the rgbgen line to something like this and see what happens:

    rgbgen const wave inversesawtooth -20 23 0 1

     

    Spoiler

    For fun, here's an example of something I made years ago using rgbGen const wave to the extreme, coupled with basic scripting so you can see what it does:

    https://storage.nab622.com/nab622/Stayin_alive_disco.wmv

     

    OCD2 likes this
  3. Thanks, that helps a lot.

    I intend to treat that entire website as an archive. Eventually it will be completely replaced with a new site altogether, and the tutorials will be removed in favor of the video series I plan to make. Unfortunately, because radiant 1.6 is quite the dumpster fire, that led to me starting upgRadiant, and I won't be doing any video tutorials until it is finished. But they are coming..... Eventually.

    Circa likes this
  4. Both stages of your shader have a blendFunc on them, so they end up blending into what's behind them.

    Assuming you want the shader to be lightmapped, just add a lightmap stage before the other two, with no blendFunc on it. The texture will then blend into the lightmap, instead of the background.

    Sorry for the formatting errors, I'm on mobile:

    Spoiler

    TEXTURES/PK02/PK02_LIGHT03_C10K
         {
                   qer_editorimage TEXTURES/PK02/PK02_LIGHT03_C
                   q3map_surfacelight 10000
                   q3map_backSplash 0.5 8
                   q3map_nolightmap
                   q3map_lightRGB 1 1 1
       {

    map $lightmap

    }

    {
                            map TEXTURES/PK02/PK02_LIGHT03_C
                            blendFunc GL_DST_COLOR GL_ZERO
                            rgbGen const ( 1.00 1.00 1.00 )
                   }
    {
                            map TEXTURES/PK02/PK02_LIGHT03_I
                            blendFunc GL_ONE GL_ONE
                            rgbGen const ( 1.00 1.00 1.00 )
                            glow
                   }
         }

    Edit: Also, rgbGen const ( 1.00 1.00 1.00 ) does nothing, you can just remove it.

    ooeJack and ZeroRaven like this
  5. The &quot; is part of the syntax, yes. It'll be turned into an apostrophe in Radiant. It is used to keep a path in quotes so spaces don't break it apart.

    Once you have one of the BSP options fixed, it should be pretty simple to fix the rest since you can just copy and paste the path around. Good luck!

    OCD2 likes this
  6. Man, you and Radiant just don't get along, huh? :lol:

    You are correct about the paths being wrong. Fixing them is a royal pain within Radiant, since the interface was not really meant to edit them. My suggestion would be not to fix it from within Radiant, but rather to fix the project file externally in a text editor. Here's how to do it for Radiant 1.6.6 (Not sure about other versions, but it should be similar in each):

    1. Open local.pref ( On Windows, I believe it is found in <Radiant install folder>/ja.game/, and on Linux it should be in  /home/<user>/.radiant/<version number>/ja.game/ )
    2. Find the line that says "<epair name="LastProject"> (Should be near the top), then find and open the file that it refers to. It should be something like user1.proj.
    3. Inside that file will be all of your BSP menu entries. Be careful not to screw up the syntax, here - just change the paths to match the location of q3map2.
    4. Restart Radiant and try compiling again.
    OCD2 likes this
  7. I believe you are referring to the model2 key? Unfortunately, I do not believe ASE models are supported in this way. There is a workaround, though.

    ASE models can only be used with a misc_model entity (Not sure about misc_model_static). Since misc_model cannot move and is nonsolid, you need to make the door contain the physics_clip for the model. Then, target the misc_model at the func_door. Any movement of the door should be copied onto the model, making them move as one.

    It takes up an extra entity, but it should give you the result you're looking for!

  8. As i recall from years past (Might be a bit off):

    Lugormod was/is a code mod that had a heavy focus on role play. It had a lot of general additions to the game like JA+ did, but it's main focus was on user accounts and role play elements within maps for servers to make use of. So if you were part of a clan, you could join the server and log in, and continue building stats or levels (Can't remember what they were called). There were also a lot of tweaks to the innards of the game as well as many bug fixes.

    As for what happened to it, I don't know - years ago, I had the pleasure of speaking to the guy behind it on many occasions, and he actually gave me some help with my own projects, but we've been out of touch for quite some time. If lugormod is gone, then I'd have to guess it had the same fate as JA+ and many other mods, the website went down one day and never came back.

  9. Just so nobody gets worried/disappointed in the lack of updates, I am working on some features, but nothing is finished yet. Regardless, I am putting this project on a temporary hold due to work hours, and the fact that I need to finish up a few other things. If all goes well, I should be back at it in January.

    In the meantime, if anyone else is interested in the code, it is all available here:

    https://github.com/nab622/upgRadiant

    OCD2 and ooeJack like this
  10. It may be a little bit harder than it looks, but not at the corner you're pointing to. That corner should align perfectly. The angled faces on the inside of the pillars will likely be the issue.

    Simply copying the texture coordinates (Middle click to choose a texture and coordinates, and ctrl+shift+middle click to apply) should do the trick everywhere else. If it doesn't work on the angled faces, try reducing the angle slightly, and it might align.....otherwise you might need to use patch meshes there, although that wouldn't be too difficult to do either.

  11. The team key is used for doors, to make them move together in sync. In case one door is blocked and reverses, all other doors on the team will do the same.

    If you want more than one spawner to be fired by that button, just give the other spawner the same targetname as the first one. When a trigger is fired, it will fire every entity with a targetname that matches it's target.

    The easiest way to do this is just to copy and paste your current npc_spawner - it will keep the targetname. Then you can change the other parameters however you need.

  12. I think the best you can do in Radiant is to use the natural setting on your patch, and then align the textures on the brushwork to match. You might have some luck aligning the textures with ctrl/shift/alt + arrow keys, but that's about the best I can think of.

    Alternatively, you could manually do the math for the texture coordinates to the S & T coordinates and plug then into the patch inspector manually, but that's a lot of work.

    I did add something to address this in my Radiant fork, but as you know, it's far from done.

    Edit: Wait.....I'm not sure where I got the idea you were using a patch. Are you saying you just want the textures on the brushwork to the left and right of the pipe to align? If so, ctrl+shift+left click the texture you want to use in the 3D window, then ctrl+shift+middle click the surface to apply it to. It will copy over the texture and it's coordinates.

    OCD2 likes this
  13. Also - make sure the trigger_multiple is set to trigger by the conditions you want. By default, a trigger_multiple will fire it's target whenever a player touches it. If you want players to have to press the "Use" button on the trigger, you'll need to set the player_use spawnflag.

    If nothing works, post a link to your map file, and someone here can definitely tell you what's wrong.

    MagSul likes this
  14. If ref_tags don't count, then yeah, there's no entity advantage. 

    There are two tiny editing advantages, though - ifyou use the script to move it, you only have to recompile the script (Not the map) when you make a change. This can help on very large maps. Second, if you do not use an origin brush on your mover, the coordinates are essentially relative to the starting point of the entity - meaning you can make a single script to use across many entities (Just don't rotate it or stuff will go crazy, since there's no origin). I don't think either of these apply to what you're doing, I'm just throwing them out there in case they're useful to you or someone in the future. You've obviously made great progress, and I'd love to see the finished product.

×
×
  • Create New...