Author Topic: emanations & effects  (Read 2785 times)

Zoythrus

  • Guest
emanations & effects
« on: 22 November 2009, 20:44:16 »
hey, i have a question about the emanations. is it possible to have a way of showing which units are affected by and emanation? (like making them glow...)

Loronal

  • Guest
Re: emanations & effects
« Reply #1 on: 29 November 2009, 09:39:13 »
In the future of gae (by my knowledge) they will have the ability to show images that mark the effects that are currently placed on units

Zoythrus

  • Guest
Re: emanations & effects
« Reply #2 on: 29 November 2009, 18:54:01 »
ahhh, well, that would be nice.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: emanations & effects
« Reply #3 on: 29 November 2009, 20:46:47 »
You can assign a lighting property in your effects and emanations, as well as particle effects.  Both are currently allowed in the XML markup, but I believe that they're not fully implemented in the game.  Take a look at the GAE reference page on the wiki.  It has examples of how to do it (last time I checked, anyway).

Edit: Relevant link: https://docs.megaglest.org/GAE/Reference
Just scroll down to "<light>".
« Last Edit: 18 June 2016, 17:37:35 by filux »

Zoythrus

  • Guest
Re: emanations & effects
« Reply #4 on: 29 November 2009, 21:00:11 »
they are not implemented, because i have tried to do that, nothing happens

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: emanations & effects
« Reply #5 on: 29 November 2009, 21:57:25 »
Then I guess we'll just have to wait.

daniel.santos

  • Guest
Re: emanations & effects
« Reply #6 on: 1 December 2009, 05:46:37 »
Yes, you are correct.  Also, the lighting needs more options, like specifying alteration to ambient lighting as well as creating specular lighting (I think the current lighting is specular).  iirc, this is only implemented when you set the lighting at in the unit properties (in the XML).  Causing a glowing effect can be as simple as a single bill-boarded particle (quadrilateral) that remains in the center of the unit and has a texture of the glow (pretty alpha and all).  But you are indeed correct, that is not yet implemented.

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: emanations & effects
« Reply #7 on: 1 December 2009, 08:13:11 »
How (un)realistic would it be to hope for pulsating and/or flickering lights?

Zoythrus

  • Guest
Re: emanations & effects
« Reply #8 on: 1 December 2009, 23:46:03 »
a glowing effect would be nice

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: emanations & effects
« Reply #9 on: 2 December 2009, 01:27:56 »
How (un)realistic would it be to hope for pulsating and/or flickering lights?

You mean something like, alpha = (sin(rps * t) + 1) / 2. ??
Shouldn't be too difficult :P

NB: t = time, rps = radians per sec ('frequency')
Glest Advanced Engine - Code Monkey

Timeline | Downloads

daniel.santos

  • Guest
Re: emanations & effects
« Reply #10 on: 13 December 2009, 13:02:39 »
hmm, also remember that there's a variety of things we're talking about here.  The ambient light affects the lighting of objects near the unit and may be costly in terms of GPU/CPU cycles, so should be used with care.  But a big fat bill-boarded sprite (a.k.a., "particle") with an alpha later is cheap.  Also, I'm not exceedingly up to speed on 3d graphics lighting, so the ambient lighting may be the cheap calculations and the specular the more expensive (as specular is directional and ambient can be applied to all surfaces).

silnarm, you may be smart, but remember that we need a way to specify this stuff somewhere and have a way to parametrize it so we know when to turn it on, how to feed it parameters and what to shove the resulting value into.  I hope that didn't make any sense, because I certainly wasn't intending to do so! :P

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: emanations & effects
« Reply #11 on: 14 December 2009, 10:10:37 »
hmm, also remember that there's a variety of things we're talking about here.  The ambient light affects the lighting of objects near the unit and may be costly in terms of GPU/CPU cycles, so should be used with care.  But a big fat bill-boarded sprite (a.k.a., "particle") with an alpha later is cheap.  Also, I'm not exceedingly up to speed on 3d graphics lighting, so the ambient lighting may be the cheap calculations and the specular the more expensive (as specular is directional and ambient can be applied to all surfaces).

Yeah, I think ambient is all just added in, its the 'everywhere' light, and is computationally very cheap. Specular needs to be calculated based on the lights direction, the surface normal and the viewing direction, and then interpolated from vertex to vertex across the polygon... a bit heftier calculation wise.

Quote
<nonsense removed> ... but remember that we need a way to specify this stuff somewhere and have a way to parametrize it so we know when to turn it on, how to feed it parameters and what to shove the resulting value into.  I hope that didn't make any sense, because I certainly wasn't intending to do so! :P
Fear not! You were perfectly misunderstood :)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

daniel.santos

  • Guest
Re: emanations & effects
« Reply #12 on: 14 December 2009, 19:57:06 »
Since I've been working on the sound code, it's making me think about sound as a part of this "special effects" topic.  Essentially, particle systems, and lighting are special effects that get applied to a unit or entity.  So what about sounds or collections of sounds?  Currently, this is achieved by playing static sounds when the skill cycle completes (or starts, I forget which).  It's not plotted in 3d yet, the distance from the camera is just used to attenuate the volume.  But what if we add the ability to give them such a sound loop that just plays, like ambient noise for some units or under the condition of some effects or emanations, like being on fire?  We could bundle all of this into a "special effects" type of object to keep the design clean.

 

anything