Data Realms Fan Forums
http://forums.datarealms.com/

How do glows work exactly?
http://forums.datarealms.com/viewtopic.php?f=1&t=45759
Page 1 of 1

Author:  SmallLeagueChew [ Sat Jul 05, 2014 12:40 am ]
Post subject:  How do glows work exactly?

It intrigues me but I am confused, I can almost figure out (except lua since I havent tried any lua myself) everything about modding Cortex Command. I've even come to understand walk paths somewhat and the placement of limbs onto parent objects, and properties and wounds and effects.

So is there some documentation on glows and what they are and how they work? I don't know how they are generated, from what I gather they are a defined effect attached to a sprite image... but inside of pallet? How does that work? Is it specific graphics settings in your art program?

Author:  CaveCricket48 [ Sat Jul 05, 2014 4:38 am ]
Post subject:  Re: How do glows work exactly?

Glows are a separate image file that don't necessarily follow the palette. The code for them usually looks like this:

Code:
AddEffect = MOPixel
   PresetName = Impulse Grenade Particle Large
   Mass = 120
   AirResistance = 0.01
   GlobalAccScalar = 0
   LifeTime = 800
   RestThreshold = 500
   HitsMOs = 0
   GetsHitByMOs = 0
   Color = Color
      R = 255
      G = 0
      B = 255
   Atom = Atom
      Material = Material
         CopyOf = Bullet Metal
      TrailColor = Color
         R = 255
         G = 255
         B = 255
      TrailLength = 1

//////////////////////////////// GLOW CODE STARTS HERE //////////////////////////////////////

   ScreenEffect = ContentFile
      FilePath = Base.rte/Effects/Glows/YellowBig.bmp
   EffectStartTime = 0
   EffectStopTime = 700
   EffectStartStrength = 1.0
   EffectStopStrength = 0.0
   EffectAlwaysShows = 1

Author:  Corpsey [ Sat Jul 05, 2014 5:04 am ]
Post subject:  Re: How do glows work exactly?

I don't even think glows have to be within the CC palette. They have to be saved as 24-bit BMPs afaik.

They are (through the game engine) processed so that the darker a coloured pixel is in the glow image, the more transparent the glow is drawn to the screen.

Black = full transparency, White = 100% visible.

So if you have an object like a white star on a black background, your glow would be a bright white star.

This method kind of eliminates the need for an alpha channel but it can change the way darker colours on certain objects appear (in which case though, you could just add darkness to the object that the glow is attached to).

Sadly I had done a lot of tests in the previous patches and I couldn't get glows to rotate (without LUA), which is why they're mostly radial if you look through glow folders in this game. A radial works for most things though. It would still be nice to be able to have them rotate without LUA. *shrug*

Author:  Foa [ Sat Jul 05, 2014 6:13 am ]
Post subject:  Re: How do glows work exactly?

You can have negative strength glows, by the way, it's pretty interesting when you have them overlap.

Author:  Duh102 [ Sat Jul 05, 2014 4:21 pm ]
Post subject:  Re: How do glows work exactly?

Negative, >1, all sorts of weird things happen.

Can you rotate them even with Lua? I suppose you could swap the image using Lua to a pre-rotated one.

Author:  SmallLeagueChew [ Mon Jul 07, 2014 4:35 am ]
Post subject:  Re: How do glows work exactly?

Ok I will make my own glows and experiment.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/