Announcement

Collapse
No announcement yet.

Particles? what can/cant be done?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Particles? what can/cant be done?

    Recently I've been playing qbism super8 and enjoying the effect where the blood particles stick to the floor/walls and it got me thinking. What kind of things can be done with quake's particle system?

    Could it be possible to replace bullet hits with several small gib-trails, create flames/smoke where the lightning gun strikes/set enemies on fire, a constant leaking-blood effect for nailgun hits and all kinds of other weird particle based responses to in game events? Lots of potential for crazy carnage.

    Still a total quake mod virgin though, so maybe this has been tried or cant be done, but just an idea

  • #2
    me thinks, all of the above are possible. especially in darkplaces, where you can assign any kind of effect to anything through making effectinfo.txt file which specifies which particles to use for what.

    in smc seven has been able to make enemies be on fire when they emerge in lava, so enemies getting on fire is possible.

    he also added sparks when LG hits walls, so thats most def possible too.

    he also changed the partiles spawned on hit an even implented small gibs spawning exactly where you hit an enemy, so thats possible too to do

    also he added that the player starts bleeding when health is below a certain amount, so im sure you could assign this same effect to enemies too that they will randomly drop blood particles after being hit. and i think with some fiddling you could also make it so that it only does this when an enemy is hit by a certain weapon

    and replacing any particle with anything else is possible through the use of effectinfo too in darkplaces

    so i think all of those things you asked are possible



    i am no qc coder though, but ive seen some of the things seven done in smc and such, and ive played around with effectinfo files in dp myself too. so i cant say for 100% sure but only what i think might be possible
    .
    are you curious about what all there is out there in terms of HD content for quake?
    > then make sure to check out my 'definitive' HD replacement content thread! <
    everything that is out there for quake and both mission-packs, compiled into one massive thread

    Comment


    • #3
      NIIICE!!! Sadly though, I'm an old fool from the oldskool. I like my quake neat & straight. Software, stock textures and square particles. Does my hypothesis still hold promise?

      Comment


      • #4
        Old dog meet new tricks! Hehe You can do it

        Name's damage_inc, and killing is my business. Don't worry though, it's nothing personal! Oh wait... maybe it is

        Comment


        • #5
          ooh, what about fountains that spray/trickle water/blood?

          Comment


          • #6
            I think I'm a bit stupid again... I'm working the night shift again, so as always I'm fiddling around with the source like the idiot I am

            Here's what I've been trying to do:
            I want a certain weapon to spray particles originating from the spot, where it hit.
            And I can make it do that, no problem. But I either can have a few particles that just "sink" down, or I get a whole explosion with hundreds of them shooting away, like I want them to.
            What I can't get them to do is a combination of the two: I only want a handfull, but I want them to shoot out in different directions.
            I tried playing with the dir vector, but all it does is random jittering I don't want.

            And is there some way of looking up the color values, without compiling and trying it out for every value?
            The worst thing I can be is the same as everybody else. I hate that.
            - Arnold Schwarzenegger

            Comment


            • #7
              is there some way of looking up the color values, without compiling and trying it out for every value?
              yep

              EDIT: do you know how to read color hex? It's simple, A through F is 10 through 15. So, if you see a color like:

              #AA66DD

              (AA) = red channel = (A=10) * 16 + (A=10) = 170
              (66) = green channel = (6*16)+6 = 102
              (DD) = blue channel = (D = 13) * 16 + (D = 13) = 221

              We get the 16 from there being 16 characters from 0 to F. This operation is a hex to RGB conversion that is necessary so we will have some real numbers to use.

              (?)I think particles use the percentage system (ie floats up to a 1)

              so all you have to do is divide your products by 255

              170/255 = .66 (^.7)
              102/255 = .4
              221/255 = .86 (^.9)

              so this color would be .7 .4 .9

              note: FF is as high as you can go (F=15)*16+15=255 ...hence where we get 255

              where do you get the color numbers to begin with? google "hex(idecimal) color chart"


              If you already know all of this, I am not trying to insult your intelligence. I'm just being thorough.

              overkill: you don't have to double up values (ie AA) any combination of characters between 0 and F will work (#6fd12a). Also if you only see three numbers, that is short hand for doubling up (ex #BAD = #BBAADD)
              Last edited by MadGypsy; 03-25-2013, 11:33 PM.
              http://www.nextgenquake.com

              Comment


              • #8
                Here man. I made you a conversion tool with "live colors" (lol)

                click

                1) unzip it
                2) open the "colors" folder then open "color_switch.html"
                3) type any decimals (up to a 1) in the three boxes and press "view color"

                voila, the entire screen turns that color. I never actually checked if particles use the percentage system. If not, it has to use either hex, oct or rgb. It would take me about 5 seconds to switch the picker to any of those formats. I know a lot of QC stuff relies on the percentage color system, maybe this simple tool will make things easier for others. Note that the decimal value is forced to be int(n*255) so there is probably a small margin of error in the actual color as it is being rounded to a whole number, but maybe in the wrong direction (?) However, (exz) 31 and 32 in colors is so nominal that your eye probably cant tell the difference, and this is the entire margin of error (01) (per channel)

                note: you have to have javascript turned on to use this. I utilized jquery to switch colors upon form submission.

                time to create this: 14 minutes (and it shows..lol)

                _____

                a little color theory to help you out. Yello+blue DOES NOT equal green in computer land. full Red + 1/2 green = orange (FF8800 or 1 .5 0), full red + full green = yellow (ffff00 or 1 1 0). Red+Blue primarily acts as expected. full green + full blue = aqua (00FFFF or 0 1 1). Really you should just play with the tool, probably.
                Last edited by MadGypsy; 03-26-2013, 01:06 AM.
                http://www.nextgenquake.com

                Comment


                • #9
                  I upgraded the entire thing (sorry) don't mess with that other link.

                  the new system accepts:

                  oct:
                  #FFF

                  hex:
                  #FFFFFF

                  rgb
                  255, 255, 255

                  dec
                  1 1 1

                  you can type either of those formats into ONE field (now) and the screen will change to the appropriate color while simultaneously spitting out a little box that holds the values in all of their formats. In other words, it converts any one of these types to all types, every time.

                  syntax is important. you have to write the desired type exactly as I did:

                  #OCT
                  #OCTOCT (HEX)
                  R, G, B
                  D E C

                  It is pretty accurate but there is definitely an existing margin of error for DEC values. This is because, often when you convert to dec the results are like 0.576576 0.5343543 0.76876887 - that's retarded. So I shortened the output to (.57 .53 .76) - and that's where the accuracy ends for output. You can still certainly enter numbers that are as long as you want and it will give you back the truth, in color.

                  you also don't actually have to click the button. You can just press enter after entering a value.

                  Ultra-High-End Live Color Viewer
                  Last edited by MadGypsy; 03-26-2013, 04:41 AM.
                  http://www.nextgenquake.com

                  Comment


                  • #10
                    made something i thought you might be very interested in amon26,
                    seeing as you asked in an earlier post if this was possible in DP:

                    software style pixely particles in darkplaces
                    .
                    are you curious about what all there is out there in terms of HD content for quake?
                    > then make sure to check out my 'definitive' HD replacement content thread! <
                    everything that is out there for quake and both mission-packs, compiled into one massive thread

                    Comment


                    • #11
                      I had another idea for that color app. It is more than 50% of the way to being a kuler. I'll do the following description if even one person says they want it.

                      Split the page into 5 sections

                      1) a header bar that has the input field on it
                      2) 4 equal sized squares that take up the remainder of the page (2x2)
                      3) in each square there will be a radio button and a msg box

                      you select the radio button for the square that you want to recolor and type your values in the input field, followed by clicking "go" (or pressing enter) and that square will change to the appropriate color while spitting out it's color values in every recognized color format.

                      This would allow the ability to view a theme of colors together and modify their relativity to each other.

                      want it? just say so below and I will make it (est time: 1 hour {or maybe 15 mins})
                      http://www.nextgenquake.com

                      Comment


                      • #12
                        do you know how to read color hex?
                        Yes I do, but the colour parameter in the game is not hex RGB, it's a single 000 to 255, 255 not being a colour value at all, but the value for "make it a huge yellow explosion, no matter what parameters came before".
                        The other values point to certain palette index, which isn't a consistent gradient.
                        The worst thing I can be is the same as everybody else. I hate that.
                        - Arnold Schwarzenegger

                        Comment


                        • #13
                          so...it is sort of a multiplier for an existing color?
                          http://www.nextgenquake.com

                          Comment


                          • #14
                            I went ahead and implemented my idea. It could come in handy for making themes. Feel free to do whatever you want with this (@ the world).



                            A real kuler would be able to spit out themes. This cannot do that so it is: (more of a) Kuler than guessing (is) and it is cooler than guessing = Kuler Than Guessing ver 1 (probably final) <-{link removed by me - continue reading}

                            CHANGE LOG

                            20130326:
                            1) Javascript has been heavily optimized (especially in comparison to the original)
                            2) decimal values are now treated differently and produce more accurate results
                            3) up to 4 simultaneous colors
                            4) languages have been separated par unobtrusive web-programming standards

                            edit: 20130326
                            5) radio buttons are selectable by clicking the output panel that corresponds to them
                            6) moved output panels to outer edges for better visibility of where the colors meet
                            7) add/remove/color borders
                            define border thickness
                            9) generate random colors
                            10) various restyling of elements to make them "match"

                            install:

                            1) there is nothing to install
                            2) unzip the archive
                            3) navigate to kuler.html and open it in your browser

                            *make sure you have javascript enabled. Kuler Than Guessing uses it for everything.

                            license:

                            There is no license. I trust you.

                            ____________________________________________



                            Kuler Than Guessing ver 1 (solid)
                            Last edited by MadGypsy; 03-26-2013, 09:20 PM.
                            http://www.nextgenquake.com

                            Comment


                            • #15
                              Hello Inkshock,

                              I wanted to answer in German (as it is our both mothertongue), but that would not be a good idea.
                              So lets see how far we come with english

                              Originally posted by Inkshock View Post
                              I think I'm a bit stupid again...
                              No, you are definitely not.

                              Originally posted by Inkshock View Post
                              I'm working the night shift again, so as always I'm fiddling around with the source like the idiot I am
                              That is the best time and opportunity to work with Quake.
                              Its dark and its frightening, hehe.

                              Originally posted by Inkshock View Post
                              Here's what I've been trying to do:
                              I want a certain weapon to spray particles originating from the spot, where it hit.
                              And I can make it do that, no problem. But I either can have a few particles that just "sink" down, or I get a whole explosion with hundreds of them shooting away, like I want them to.
                              What I can't get them to do is a combination of the two: I only want a handfull, but I want them to shoot out in different directions.
                              I tried playing with the dir vector, but all it does is random jittering I don't want.
                              First of all, please use this page to find answers in first aid situation: click me
                              Then click on weapons.qc and search for "spawn_touchblood".
                              I will use this as a placeholder for all particle-creating-functions in vanilla Quake.

                              You will see that a function called "wall_velocity" is called before the actual "SpawnBlood" function is called.
                              And that is maybe important for you to understand your "random jittering" issue that you described in your post.
                              Quake source often uses calculation-functions for randomness.
                              Another example is the "VelocityForDamage" function that returns a random vector for gibs in player.qc. It is quite similar to "wall_velocity", which also gives a random vector (which you do not want in your specific case).

                              Now back to your issue:
                              The only thing that "SpawnBlood" does is to spawn particles via:
                              particle (vector origin, vector dir, float color, float count)

                              Try to use multiple particle calls in your function directly after another.
                              One with some particles straight upwards in a different color and quantity.
                              Next particle line where they go to the left with different values.
                              Be sure to declare the origin and velocity/direction before you call it (which must be different in both calls of course).
                              Just like "wall_velocity" did it for the random blood particle direction....

                              Here is a small summary (copied from above link):
                              Function: particle

                              void particle(vector origin, vector dir, float color, float count)
                              origin = initial position
                              dir = initial direction
                              color = color index (73,75,
                              count = time to live, in seconds

                              Create a particle effect (small dot that flies away).

                              color = 0 for chunk
                              color = 75 for yellow
                              color = 73 for blood red
                              color = 225 for entity damage

                              Originally posted by Inkshock View Post
                              And is there some way of looking up the color values, without compiling and trying it out for every value?
                              Quake uses 8-bit. So the color should also be 8-bit (from 0 to 255) just like you said. It is not Hexadecimal color code.
                              You can look at the Quake color palette for example, or search for 8-bit color table in the internet.
                              I use for RGB colors with various codes this page:
                              click (which might not help you with pure 8-bit though)

                              Now sleep well, before your next night-shift.
                              It will be a night-shift full of particles

                              Viel Spass !
                              Seven

                              Comment

                              Working...
                              X