Announcement

Collapse
No announcement yet.

Quake-C | Applying Textues On Objects - HELP!

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

  • Quake-C | Applying Textues On Objects - HELP!

    I have a queation regarding coding. It's about the Quake-C Scripting language.

    I just started coding in Quake-C 3 days ago and I created a ball as an .obj file in Anim8or, that gets created, when you shoot the starter Gun. It flies and bounces a few times. Pretty simple, but for me, as a beginner, a Milestone

    My Question is: How do I apply a texture to the ball?
    Does it matter if it is a .obj or .mdl file?


    Here's the Code, so you have some context to it:
    __________________________________________________ _______________

    void() Bullet_Touch =
    {
    sound (self ,CHAN_WEAPON, "weapons/tink1.wav", 1, ATTN_NORM);
    };

    /*
    ================
    W_FireShotgun
    ================
    */
    void() W_FireShotgun =
    {
    local entity bullet;
    bullet = spawn();

    bullet.movetype = MOVETYPE_BOUNCE;
    bullet.solid = SOLID_BBOX;
    bullet.owner = self;
    bullet.classname = "bullet";
    bullet.velocity = v_forward * 900;

    bullet.touch = Bullet_Touch;

    setmodel(bullet, "progs/Whateverthatthingis.obj");
    setsize(bullet, '0 0 0', '16 16 16');
    setorigin(bullet, self.origin + '0 0 16');
    };
    __________________________________________________ _______________

  • #2
    Hello DopeFish101,

    First of all, I wasnt aware that .obj is supported in vanilla qc.
    You should try .mdl format first, as it can also be static.

    Regarding your question:
    My Question is: How do I apply a texture to the ball?
    The texture is primary not related to qc. The texture must be given to the model itself.
    If you go with .mdl files, you normaly have 1 skin per model, but you can of course also give more skins, which can then be selected via .skin float in qc (.skin = 0; is the default)

    So, what you want to do is add a skin to your model via your favorite model editor.
    Then it will automagically be shown in-game.

    If you want to use multiple skins for a model, the .mdl must have multiple skins as well.
    You can then set the skin you want in the spawn function.
    In your case it would be:
    bullet.skin = 2; // uses the 3rd skin

    You can change the skin in any function which is called afterwards.

    Good luck,
    Seven

    Comment


    • #3
      setmodel(bullet, "progs/Whateverthatthingis.obj");
      lol
      http://www.nextgenquake.com

      Comment


      • #4
        Originally posted by Seven View Post
        So, what you want to do is add a skin to your model via your favorite model editor.
        Then it will automagically be shown in-game.
        Thanks for your quick reply.
        The modeling software I use is Anim8or. It doesn't Export into.mdl, only .obj, or .3ds.

        Do you know one, that can Export to .mdl?

        Thanks in advance,
        Dopefish101

        Comment


        • #5
          blender
          and
          im/export scripts

          if you are dead set on vanilla Quake then you will need those, but if you are not dead set on vanilla quake, you can skip the old, outdated mdl format and move to something supported and current (like IQM)

          You will not find a better free 3d modeling GUI than blender. This is not really an opinion. I have used every free thing there is to use and none of them even come close to the power of blender.

          You could build an entire game in just blender and no other anything (other than maybe GiMP for skins). There is at least one movie that was made in Blender as well.
          Last edited by MadGypsy; 06-09-2013, 07:22 AM.
          http://www.nextgenquake.com

          Comment


          • #6
            I'm kinda new to the whole Thing... What's vanilla quake, and what other Versions ae there??

            Comment


            • #7
              vanilla Quake just means that there are no frills and extras. In other words regular ole Quake, is vanilla Quake - anything you do past that makes it no longer vanilla.

              By modding for vanilla Quake you will be forced to use all of the same standards and options that were available 17 years ago. By throwing the vanilla out the door you are allowed to use all of the latest everything that has become available through engine updates and advancements in technology.

              Why would I want vanilla Quake then?

              It's the only way you can be sure that your stuff will work in every engine. They all support the old stuff. However, having your game/mod work in every engine is a bit extreme. You sacrifice a world of possibilities to hold on to outdated tech that will run in anything.
              http://www.nextgenquake.com

              Comment


              • #8
                Well, I use darkplaces, pretty water, rygels 'ultra' textures,rt-lights and improoved enemy textures. So mine is definately not vanilla ^^

                Comment


                • #9
                  you can try neosis to convert the models,
                  this is neosis

                  http://www.xentax.com/?p=229

                  i suggest use md3 or iqm models for darkplaces
                  the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                  syluxman2803

                  Comment


                  • #10
                    if you use DP id suggest using MD3, its a newer format and allows for more vertices and smoother animations and such

                    mdl importer & md3 importer&exporter plugins which i use myself too: Blender 2.64+ - Jedi Academy Plugin Suite - JKHub
                    .
                    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
                      First of all: Luna for the win!

                      I'm downloading blender 2.67 right now. I'll be back after I tried exporting to .mdl or .md3

                      Comment


                      • #12
                        haha lol. that aint luna, thats nightmare moon, my avatar
                        she's best pony, she's 20% cooler then luna

                        .

                        good luck with the plugins. if you need help with the md3 exporter on how to get the texture to show on it in-game, lemme know
                        Last edited by talisa; 06-09-2013, 08:15 AM.
                        .
                        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


                        • #13
                          fluttershy is the best pony ever!!
                          the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                          syluxman2803

                          Comment


                          • #14
                            Originally posted by nahuel View Post
                            fluttershy is the best pony ever!!
                            no way, nightmare moon is 20% cooler
                            .
                            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

                            Working...
                            X