Product Chat / Shader question (Preben?)

Author
Message
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2018 22:47
I know zip about shader coding but would it be possible to do something like what is described at this link:

https://software.intel.com/en-us/articles/a-more-accurate-volumetric-particle-rendering-method-using-the-pixel-shader

... for GamGuru?

This is based on my fiddling with the GG particle system, currently it uses (I think) the default decal shader but the result leaves a lot to be desired so I figured if the approach described in that link is doable for GG we could have a much better particle system.

Been there, done that, got all the T-Shirts!
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 12th Apr 2018 01:24
I would love something like that

in FPSC we kind of came close?



Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Preben
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 12th Apr 2018 12:06
Sure a better particle system is possible , but im not sure if Lee is already making something ?

https://www.game-guru.com/feature-vote

Volumetric Particle Effects is already "Currently under development" so ? ... ?

Subscribe and checkout great GameGuru/AGK video's here: Videos click here
Latest GameGuru Loader news: News click here
Get GameGuru Loader PBR version here: Steam click here
best regards Preben Eriksen,
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 12th Apr 2018 15:56
but as yet no news on the new particle work, be nice to see how Lee is going with it.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Roland D05 Synth Module, Bluedio Victory V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 12th Apr 2018 18:56 Edited at: 12th Apr 2018 18:57
All I think we need is a shader to go with the existing particle system, and some more image files to go with it.

Would you be able to write a shader or adapt the existing one based on the method described in that link?

(if Lee is working on it then I see no sign of that in the code!)
Been there, done that, got all the T-Shirts!
PM
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 13th Apr 2018 02:13
Is that what creates lasers and explosions etc? A "particle system"? I'm trying to learn this stuff.
Jim C
Preben
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 13th Apr 2018 10:00
Quote: "All I think we need is a shader to go with the existing particle system, and some more image files to go with it.

Would you be able to write a shader or adapt the existing one based on the method described in that link?"


Did not really look at the current version , i will have a look (when i get some time) and see if i can get some custom images added, and better shader effects.

But dont really want to spent tons of time if this is replaced anyway

Subscribe and checkout great GameGuru/AGK video's here: Videos click here
Latest GameGuru Loader news: News click here
Get GameGuru Loader PBR version here: Steam click here
best regards Preben Eriksen,
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 13th Apr 2018 10:31
I am re-writing the current system (or at least one of them ) to allow full control of it from Lua, the part that positions and renders the 'particles' is all good (see the demo videos in the other thread) but currently we are limited by only having a couple of source images to use. The smoke actually looks pretty good except where the rendered image comes into contact with 3d geometry (which us what that link shows how to improve) so an improved shader might make a huge difference in quality.

The shader images/textures are an art-form in their own right really and I haven't a clue how you go about generating them, probably photoshop/gimp plugins or something?

I'll have a go at creating a laser beam effect using the existing system, I should have enough Lua control for that now, probably won't be until next week though as I have other plans for the weekend.

@Preben: Don't bother looking at the existing code, I pretty much ended up re-writing it. Basically each 'particle' is a simple plane with a texture that is positioned, scaled, rotated in real time. The rendering appears to specify the decal_basic shader from within the code (i.e. currently hard coded, something else I need to Lua'ise) and also sets various default settings.

Here is the code snippet that actually creates the 'default' object (my Lua additions allow these defaults to be 'tweaked' at runtime') for each 'particle':



Been there, done that, got all the T-Shirts!
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 13th Apr 2018 15:43
The current system really interferes with character animation probably a general drain on FPS but may be some other conflict.

I was hoping Lee would be able to build and deploy a particle system with the geometry shader capabilities of DX11. This would seem to be able to give amazing results with hundreds of thousands of particles, with even more clever coding around the vector management and particle life span.

Always appreciate your work AmenMoses just wonder if Lee does have any plans for a different way of getting a particle system in GG. I guess either way the enhancements you’re proposing would be useful

Cheers.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Apr 2018 19:15
Well if Lee has yet another 'particle' system planned then it would be nice to know some details, i.e. if it's in addition to the existing ones or a replacement for one of them (if so which one?) or simply an additional shader (which is what I'm proposing anyway).
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Apr 2018 22:06


As promised a laser beam effect using the particle system.

Been there, done that, got all the T-Shirts!
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 16th Apr 2018 22:34
Sweet. What setting did you use?
Are all these setting still valid from the global.lua fie?

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.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Apr 2018 19:42
Yes, all the settings are the same I've simply added a couple. (plus the ability to load alternative 'particle' files)

Oh, and completely re-written it to be way more efficient and increase the maximum number of particles on screen at once.

The settings for the 'laser' effect:



The settings are in a 'named' list and are used by a Lua wrapper function like so:

PE_CreateNamedEmitter( 'laser', 2, numFrames, g_Entity[e].obj )

The '2' refers to the image used, in this case the default 'flame' image.

Here is what it looks like using the 'flowerpuff' image file and slightly different settings:

Been there, done that, got all the T-Shirts!
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 17th Apr 2018 21:33
that looks really cool nice one Amenmoses
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Apr 2018 22:10


Push it too hard and performance will suffer though!

I'll be adding Lua commands to limit the number of particles so if performance starts to drop then the script can cap the particle effect appropriately.

Been there, done that, got all the T-Shirts!
PM
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 17th Apr 2018 22:29
hmmm where are those decals I might have ago at making some for you ? need to inspect them ones first though
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 18th Apr 2018 01:33 Edited at: 18th Apr 2018 01:36
Game Guru\Files\effectbank\particles
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.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Apr 2018 21:00
This link give a good description of what we are aiming for:

https://www.gamasutra.com/view/feature/131565/building_an_advanced_particle_.php?print=1

Most of it is already there, one obvious omission is collision detection between particles and game world geometry, haven't explored that bit yet though.

Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Apr 2018 22:00 Edited at: 18th Apr 2018 22:22
In this example I have 12 emitters each limited to ten particles to give a sort of force field effect. Having alternating emitters sending particles in the opposite direction would probably make it an even better effect.



@GraPhiX: this is using the standard 'flame' image so if you make others like that but maybe different colours? I've not managed to work out the animation bit yet so we are seemingly stuck with 64 frames per 'particle'.

... even better effect?:


Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 19th Apr 2018 18:44
Another interesting read:

http://developer.download.nvidia.com/assets/cuda/files/smokeParticles.pdf
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Apr 2018 17:40
Final 'polished' version of the 'force field' effect:




Been there, done that, got all the T-Shirts!
PM
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 20th Apr 2018 19:46
That’s cool you could do some great effects using that,great work again

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Apr 2018 20:11
Going to have a go at lightning next.
Been there, done that, got all the T-Shirts!
PM

Login to post a reply

Server time is: 2024-11-24 07:00:26
Your offset time is: 2024-11-24 07:00:26