Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to achieve a glowing effect from specific areas of a model?

Author
Message
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 26th May 2018 00:21
Hi Guys,

Below is a picture of the ship from my game which has been rendered in Blender.



What I'd really like to know is how to achieve the same glowing effect from the engines (the blue bits) using AppGameKit to display the model. I know that I'm probably going to have to use a shader to get this result, but I am utterly clueless when it comes to shaders.

Any help anyone could give me would be gratefully received.

Thanks as always,

=PRoF=
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 26th May 2018 01:28
Maybe you could use SetObjectColorEmmisive() for only the blue textured areas.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 26th May 2018 02:07
SetObjectColorEmissive() lightens the entire object. So I prefer SetObjectLightMap() which are using a greyscale image to lighten the right areas.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 27th May 2018 02:12
Have you tried baking the texture that includes that glowy effect?
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 27th May 2018 18:16 Edited at: 27th May 2018 18:16
Apologies, I forgot to subscribe to the thread and only saw the replies just now :/

@IronManhood: I've not tried that, but I only want the Blue bits to light up.

@basicFanatic: I will look into SetObjectLightMap and see if that helps me at all. Can I render the greyscale image in Blender (in the same way I do the texture map?). I'll have a fiddle and see how I get on.

@Golelorn: Yeah, I have, but it doesn't work the way I want.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 27th May 2018 19:23 Edited at: 27th May 2018 19:25
I'm a total Blender newbie. So you can likely render a lightmap in Blender, but I have no clue how. Me, I would just open the texture map in Photoshop and color the light areas white, the rest black.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 27th May 2018 20:17
@basicFanatic: That seems like a plan. Thanks for the help
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 28th May 2018 21:43 Edited at: 28th May 2018 21:46
Hey, Im not sure If I want to promote my shader pack now, but there is a selfillumination shader in it
If you want to make it yourself:
•It's two custom shaders one to render a "glow map" and one which is a fullscreen shader and takes the glow map to blur and display it.
•The glow map is produced by rendering the parts of the objects in the color you want them to glow into a render target.
•You also want the glowing parts to exclude from lighting which only makes things darker as every object is 100% lit by default <- hope that makes sense to you
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 29th May 2018 00:18 Edited at: 29th May 2018 00:25
janbo's option is pretty good.

If you want to settle for a lesser effect then you could use pixel lighting and SetObjectColorEmissive:
Sets the emissive color to use when drawing this object. Values should be in the range 0-255 but are not limited to it. Values greater than 255 will over saturate the object and values less than 0 will take light away. The emissive color simulates light being generated by the object so it will gain this color even if it is not being lit by anything. This does not not affect any surrounding objects.

You could combine this with varying the intensity of the light to simulate flickering.
e.g look at the TL's in this pic. This can also be done with blue light:


If not strong enough you can oversaturate the light value(values over 255)
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 29th May 2018 10:38
@Janbo - I know your shader pack is amazing, so feel free to plug it I appreciate any and all solutions suggested.

@Rick Nasher - Thanks for the information. I can see this being handy for stuff, but not necessarily what I'm trying to do now


Ok, so I'm going to try using a Light Map first and see how I get on with that, if I'm not entirely happy with the results that gives then I will try using a shader (I gotta admit that the Self Illumination clip in the Shader Pack video looks exactly like what I'm trying to do).


Massive thanks to everyone who has helped me with this. I'll post again when I've had chance to try these things out
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 6th Aug 2018 21:57
you may find this neon glow effect is what your after nothing quite like janbos pack
but with the right texture overlay it will light up around ship etc aswell if that's what
you want

fubar
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 7th Aug 2018 08:46
https://forum.thegamecreators.com/thread/222617

Login to post a reply

Server time is: 2024-03-28 22:27:58
Your offset time is: 2024-03-28 22:27:58