MegaGlest Forum

MegaGlest => MegaGlest => Topic started by: titi on 18 March 2015, 00:05:27

Title: new feature: glow effect for models
Post by: titi on 18 March 2015, 00:05:27
I am working on a new glow effect for models. ( nearly done, will be checked in tomorrow )
The idea is to allow a mesh to be rendered like a glowing particle. for this I madea new switch in the g3d format and the blender importer/exporter.

With this you can make things that glow at night without using particles! Like eyes of a Dragon or whatever. A tiny problem is that things get more and more transparent ( like particles do ) when using darker colors, but play with it to see,

(click to show/hide)

Herer its used in a tileset:
Day:
(click to show/hide)

Night:

(click to show/hide)

Glowing eyes in team color and flowers ( only 50% of possible glow effect ):
(click to show/hide)
Title: Re: new feature: glow effect for models
Post by: Ishmaru on 18 March 2015, 01:00:51
Wonderful idea!  :) I hope that you can define glowing regions via textures rather than just meshes. 
Title: Re: new feature: glow effect for models
Post by: Omega on 18 March 2015, 08:43:00
Very cool. I can forsee a lot of uses for these.

Am I correct in understanding that the tileset image you posted has objects placed on the map to make the glow (and not part of the ground texture)? It'd be even better if there was some way to create glow in the texture directly. That'd be harder, though. One possibility is to create a "glow map" that is a simple monochrome texture where white = glowing at max brightness and black = no glow. Then each image for the tileset texture could be associated with a glow map (and the color of the glow could be specified in the tileset XML).

A question for the glowing models: how is the color specified? Is it obtained from the texture?
Title: Re: new feature: glow effect for models
Post by: titi on 18 March 2015, 12:28:29
At the moment its a model The texture manipulation is another way to achieve this.

Yes, the color is taken from the texture so it's in fact a glowing texture, but the switch to enable glow is mesh dependend.
Title: Re: new feature: glow effect for models
Post by: Coldfusionstorm on 18 March 2015, 13:47:09
So this is a walkable model with a glow texture correct?.
(very cool with glowing effect btw).
Title: Re: new feature: glow effect for models
Post by: kagu on 18 March 2015, 13:55:03
Very nice effect, also a cool tileset  :D.
OT: whats that unit xD , a new tech tree ?
Title: Re: new feature: glow effect for models
Post by: Carl the Great on 18 March 2015, 17:32:14
No, that's one of wciow's Goblin mod units.

Do the "flowers" look like mushrooms or spores, or does it appear like a specific flower?
Title: Re: new feature: glow effect for models
Post by: titi on 18 March 2015, 19:25:54
It's checked in now, I would be very happy if someone can document it in the wiki!

@Carl: The tileset  is a pandora like tileset from avatar I am currently working on. those flowers are tiny and not meant to be something special, just glowing little flowers :).
Title: Re: new feature: glow effect for models
Post by: wciow on 25 March 2015, 18:33:44
I want to test this but I don't know where to find the updated exporter. Link?

If I can test it then I will update the wiki with how to use it.
Title: Re: new feature: glow effect for models
Post by: titi on 26 March 2015, 00:29:54
https://raw.githubusercontent.com/MegaGlest/megaglest-source/develop/source/tools/glexemel/g3d_support_b269.py
Title: Re: new feature: glow effect for models
Post by: Kreeith on 3 April 2015, 21:54:47
Seems really cool..

I would love to see this in Si Fi or swamp like maps.
Title: Re: new feature: glow effect for models
Post by: titi on 11 June 2015, 13:42:30
wciow did you test it? ( or anyone else ?)

Do you have an idea how to make models glow at night/day only ? How would a xml look like to do this as it is obvously model related?
Title: Re: new feature: glow effect for models
Post by: wciow on 24 June 2015, 10:44:23
Yes, the Earth totem in Goblins mod uses this feature for its eyes. Seems to work OK. Glow is more visible at night than in the day. Any plans to workaround the transparency problem?
Title: Re: new feature: glow effect for models
Post by: titi on 25 June 2015, 23:22:19
to be honest I have no idea how to fix the transparency thing. It works exactly the way as particles "glow".