Page 1 of 2

Laser Textures

Posted: 30 Dec 2008, 23:38
by Forboding Angel
Pardon me for asking something that has been answered a zillion times, but what is the correct way to fix the laser textures?

Re: Laser Textures

Posted: 30 Dec 2008, 23:45
by jK
Sorry if it has said already a zillion times, but speak in whole sentences. Ppl can't read your mind...

Re: Laser Textures

Posted: 31 Dec 2008, 00:02
by KDR_11k
Forboding Angel wrote:Pardon me for asking something that has been answered a zillion times, but what is the correct way to fix the laser textures?
They work fine, why fix them?

Re: Laser Textures

Posted: 31 Dec 2008, 00:13
by smoth
what is broken? if you have that little | at the front then set a non existent texture for the tip

Re: Laser Textures

Posted: 31 Dec 2008, 00:19
by zwzsg
My bet on: "Use image sizes that are power of 2."

Re: Laser Textures

Posted: 31 Dec 2008, 07:34
by Forboding Angel
Ahh so they must be an exact size now instead of like 100x153 it would need ot be 100x154 or 100x152?

Thanks Zwzsg.

Re: Laser Textures

Posted: 31 Dec 2008, 07:35
by Argh
Not divisible by 2, power-of two. As in, 64 X 128 :-)

Re: Laser Textures

Posted: 31 Dec 2008, 07:47
by Snipawolf
2
4
8
16
32
64
128
256
512
I hope you really don't need to go to 1024 for a laser texture.

Re: Laser Textures

Posted: 31 Dec 2008, 09:37
by Forboding Angel
Ack, thanks argh and snipa, would have helped a bit if I read into the actual wording of what zwzsg said. Woe is me, ./wrist to forehead, and all that good stuff lol.

Re: Laser Textures

Posted: 31 Dec 2008, 10:19
by Forboding Angel

Code: Select all

    texture1           = "megaparticle",
    texture2           = "empty",
    texture3           = "empty",
    texture4           = "empty",
Nothing has worked so far. And it has nothing to do with being divisible by powers of 2. Is the above no longer an accepted format for defining laser textures?

Re: Laser Textures

Posted: 31 Dec 2008, 10:24
by Argh

Code: Select all

    texture1           = "megaparticle",
    texture2           = "",
    texture3           = "",
    texture4           = "",
Should work. Dunno, I do that with TDF, and just put "foo" as the string, where "foo" is not a real texture named in Resources.tdf.

Re: Laser Textures

Posted: 31 Dec 2008, 10:34
by Forboding Angel
well I already have an empty=empty.tga; in resources.tdf

I really dunno what's going on here.

Re: Laser Textures

Posted: 31 Dec 2008, 11:27
by Argh
Does empty.tga actually exist? I usually pointed my stuff to "foo", where "foo" does not exist, and is not named in Resources.

If it does... maybe it's not formatted correctly, etc. Use a 8X8 pixel TGA, IIRC, 2 and 4-pixel ones don't seem to actually work right.

Re: Laser Textures

Posted: 31 Dec 2008, 12:05
by Forboding Angel
hmm that could be it, it's a 2x2, I'll try that.

Edit: Nope no joy. I tried everything I could think of. Removed the empty=empty.tga; entry from resources too and got the exact same results.

Unfortunately I can't find the link to the changelog cause the answer is probably there :-/

Re: Laser Textures

Posted: 31 Dec 2008, 12:48
by Forboding Angel
This is a screenie of the largest laser, it should be omgwtfbbq large. Also, it comes from the sky (5k up to be exact) and the texture is oriented incorrectly.
screen000.jpg
screen000.jpg (200.47 KiB) Viewed 2010 times

Re: Laser Textures

Posted: 31 Dec 2008, 14:40
by KDR_11k
Waaaaaaaaaait... Those are multiple billboarded sprites! Forb, that's not a laser, that's a cannon.

Re: Laser Textures

Posted: 31 Dec 2008, 20:15
by Guessmyname
KDR_11k wrote:Forb, that's not a laser, that's a cannon.
Flip the 'b' around and you have HitchHiker's Guide to the Galaxy...

Re: Laser Textures

Posted: 31 Dec 2008, 21:01
by Forboding Angel
KDR_11k wrote:Waaaaaaaaaait... Those are multiple billboarded sprites! Forb, that's not a laser, that's a cannon.
Can you put that into english for me?

Code: Select all

local weaponDefs = {
  deathray = {
    areaOfEffect       = 500,
    avoidFeature       = false,
    avoidFriendly      = false,
    beamWeapon         = true,
    cegTag             = "electricbolt",
    collideFeature     = false,
    collideFriendly    = false,
    commandfire        = true,
    coreThickness      = 3,
    duration           = 0.5,
    energypershot      = 250000,
    explosionGenerator = "custom:NUKE",
    fallOffRate        = 0.1,
    fireStarter        = 90,
    guidance           = true,
    id                 = 666,
    impluse            = "1",
    interceptedByShieldType = 1,
    largeBeamLaser     = true,
    lineOfSight        = true,
    metalpershot       = 0,
    name               = "Doom Laser",
    range              = 200000,
    reloadtime         = 180,
    renderType         = 0,
    rgbColor           = "1 0.5 0",
    rgbColor2          = "0 0 1",
    soundHit           = "18402_inferno_xplo.wav",
    soundStart         = "doomlaser2.wav",
    startVelocity      = 5000,
    sweep              = "1",
    sweepfire          = true,
    targetMoveError    = 0,
    texture1           = "megaparticle",
    texture2           = "empty",
    texture3           = "empty",
    texture4           = "empty",
    thickness          = 120,
    tolerance          = 50000,
    turret             = true,
    weaponVelocity     = 5000,
    damage = {
      default            = 25000,
    },
  },
}
unitDef.weaponDefs = weaponDefs


--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
Looks like a laser to me... Am I missing something?

Re: Laser Textures

Posted: 31 Dec 2008, 21:22
by KDR_11k
Maybe some nonsense with that rendertype tag. I just use weaponType on everything (would be weaponType="LaserCannon", here).

BTW, "impluse" is misspelt

Re: Laser Textures

Posted: 31 Dec 2008, 23:29
by Argh
Yes, use weaponType, always. Much cleaner.