Product Chat / Model outlines - Script or Shaders?

Author
Message
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 17th Jan 2017 20:04
Hi guys, is there a way to out-line a model in GG with script or a shader of some sort or even a decals / light source that can follow a entity?

What I mean is; In a few games today and some in the past you could see an out-line of a Tank, Enemy and or buildings if they have been targeted or when you focus your sight on them for a period of time. You also see this a lot in stealth games like Hitman, etc.

Thanks guys, any help will be great.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 SLI mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3


A new competition running for GG
PM
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 18th Jan 2017 11:28
If you look at the GemWorld demo in GameGuru you will notice a particular artistic trick to outline the graphics in black. You can use the same technique to outline them and combined with a custom shader, create a glow around your game object. As to the specifics, that must fall within the realm of 3D modeling, shader writing and a good deal of trial and error, but the effect should be great to look at!
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 18th Jan 2017 13:45
If there was a way of passing user variables between lua and shaders (get/set) then this could open up a range of game/user controlled shader effects. Think there are some unused user shader variables already in the majority of the stock shaders -could these be attached to lua commands easily?

Cheers.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 18th Jan 2017 17:41
I like the idea of a few LUA commands that can send values directly to the shader, but per-entity shader changes are tricky things and 'would' hit performance slightly if you are willing to take that hit. How many and what type of variables are you thinking about? The easiest would be a single FLOAT4 constant (gives you four floats to play with) which can be encoded with each entity and the common shader (i.e. entity_basic.fx) would be given the unique entity float4 constant, which the LUA (and perhaps entity properties) can change both at level creation time and during the game. Something like this?
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 18th Jan 2017 18:24 Edited at: 18th Jan 2017 18:30
Exactly like that . I've already hacked this type of thing using the fog settings and can get some cool effects going (e.g can use the spare AO texture as an alt texture on damage). Could also be used for what the OP asking highlighting the entity with a glow when being looked at etc. But of course using the fog settings for this means fog then tricky to control so I just did it as a proof of concept

EDIT might be pushing luck a bit but if a float could be pushed to post process shaders too then some nice dynamic effects could happen here when player health low or coming out of water, dizzy etc. Hacked this too using the vignette radius lua to post shader and it works but would be great with a variable purely for user use

Cheers.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 19th Jan 2017 11:24
Wow, sounds like you've been hammering at the rigid walls of GameGuru for some time to take shaders to the next level I have added your suggestion to my immediate task list, and during a 'core' update I should be able to add these in for both in-game shaders and the post-process shaders. For right now I am focusing on finishing EBE, and then absorbing myself with AI, but after that, I think a nice core update would be welcome!
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 19th Jan 2017 12:10
Great! Thanks Lee.

gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 19th Jan 2017 20:22
Thanks guys, this looks like it will be a good development for shaders in the near future.
Thanks for the info.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 SLI mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3


A new competition running for GG
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 24th Jan 2017 18:08
Really don't mean to hijack your thread gd . Just think the video below is relevant and might help demo that this type of effect is almost there without, errr, innovative methods being needed (just need a little sprinkling of Lee magic).

Shows lua controlling entity alternative textures and post process effects.

Cheers.


Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 24th Jan 2017 18:29
wicked! brilliant stuff
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 24th Jan 2017 18:29
That's Excellent !!
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 24th Jan 2017 19:41
Love them guys,something new to see.great looking to,the ball is very cool .

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 24th Jan 2017 20:07
Jeeves with attitude! I Like It!!
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 25th Jan 2017 17:23
Very nice. Wonderful effect.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 25th Jan 2017 19:28
Really nice cybernescence, thinking out the box, I like it.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-07-05 12:32:23
Your offset time is: 2024-07-05 12:32:23