View unanswered posts | View active topics It is currently Wed Nov 21, 2018 5:28 pm



Reply to topic  [ 6 posts ] 
 How do glows work exactly? 
Author Message
User avatar

Joined: Sat Jun 28, 2014 7:38 am
Posts: 6
Reply with quote
Post 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?


Sat Jul 05, 2014 12:40 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10437
Location: Here
Reply with quote
Post 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


Sat Jul 05, 2014 4:38 am
Profile

Joined: Sun Jul 22, 2012 3:06 pm
Posts: 128
Reply with quote
Post 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*


Sat Jul 05, 2014 5:04 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Wed Sep 05, 2007 4:14 am
Posts: 3966
Location: Canadida
Reply with quote
Post Re: How do glows work exactly?
You can have negative strength glows, by the way, it's pretty interesting when you have them overlap.


Sat Jul 05, 2014 6:13 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7089
Location: b8bbd5
Reply with quote
Post 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.


Sat Jul 05, 2014 4:21 pm
Profile
User avatar

Joined: Sat Jun 28, 2014 7:38 am
Posts: 6
Reply with quote
Post Re: How do glows work exactly?
Ok I will make my own glows and experiment.


Mon Jul 07, 2014 4:35 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.019s | 13 Queries | GZIP : Off ]