P.O.P.S.- Demo 3.1 available! - Page 2

P.O.P.S.- Demo 3.1 available!

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Testers Wanted!

Post by Argh »

Image
OK, it's coming along now. After some trouble figuring out floating-point texture stuff and setting up MRT (thanks to jK!), it's now fairly close to functional.

Things to finish include a "colormap" support and proper support of size growth, which is currently non-functional atm, and I need to rebuild my LOS thing from scratch (boo hoo).

That said... it's still pretty cool, imo. Very fast event creation and management. And once an agent is built, it renders for very close to "free", other than the CPU cycles spent sending the data to the shaders. There are probably more perfect solutions, but imo this is pretty sharp.

Anyhow... I need some testers, preferably testers with ATi hardware, to tell me whether it works on your systems (and if it borks, please send me a full Infolog, don't just tell me "it's broken", I need to see your GLSL compilation errors). Drop into the Gadgets folder of a mod / map. It uses a standard particle bitmap, so you shouldn't need to do anything else.
Attachments
POPS2.lua
(17.19 KiB) Downloaded 26 times
MRT_System.jpg
(23 KiB) Downloaded 314 times
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: P.O.P.S.- Testers Wanted!

Post by hoijui »

i put POPS2.lua into BA701.sd7 under LuaRules/Gadgets, but it does not appear in the infolog as loaded:
http://springrts.pastebin.com/m2eee3cae

though i dont know how this works.
i did not see any errors. anthing i should look at in particular?
did it load at all?
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: P.O.P.S.- Testers Wanted!

Post by manolo_ »

maybe use as widget and start it --> firework?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: P.O.P.S.- Testers Wanted!

Post by hoijui »

the test instructions are mighy incomplete then.
gimme that widget.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Testers Wanted!

Post by Argh »

If it doesn't work in BA, that's a problem with BA. I use stock Spring LuaRules main / draw. I'll build a full test project later, like I did with normalmaps, I guess.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: P.O.P.S.- Testers Wanted!

Post by 1v0ry_k1ng »

initialed acronyms look childish, develop a new naming system :P
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Testers Wanted!

Post by Argh »

Got conic projections working, after staring at a lot of code examples (vertex rotations == unfun) and cheerfully pilfering jK's conic code from LUPS (once I understood the process enough to know what to pilfer and how to port it to GLSL, heh).

This is 16384 particle agents, being created in groups of 256 every 1/10th of a second, with basic colormap emulation, conic projections, drag and gravity with very low CPU hit per agent, and a lot less if you structure your requested group appropriately (more on this when I have a proper management system built). Still working out how to build / retrieve a texture atlas and do some basic texture-coordinate-fu to give us multiple textures within the limit set by the GPU, texture-wise, and then animate them, that's the final feature, other than a management system, which should be pretty easy (famous last words, but the rest of this has been really hard, lol).

I'll post source again when I get over the texture atlas hump, and build a full demo, as it'll be officially time to debug for ATi at that point.

Image
Attachments
pops_conic.jpg
(149.12 KiB) Downloaded 221 times
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Testers Wanted!

Post by Argh »

OK, people, I've finally got it all working more-or-less as planned.

This is a full tech demo of P.O.P.S., being used to generate "fireworks", consisting of 512 agents per burst event. This is mainly a proof-of-concept and demonstration of the general purpose use case- as promised, CPU hit per event is very low, practically all of the load is rendering (i.e., if it's off-screen, it hardly hits your FPS).

This uses a 4-color colormap emulation, and can use multiple textures. Feel free to mess with the parameters if you'd like, it's quite flexible (see UpdateParticles() section, I'm just using a simple timer atm).

I really need ATi testers for this. If it won't run, please post your full Infolog (or, if you're familiar with what a GLSL error looks like, you can just post that, I mainly just need to know what lines it halts on).
Attachments
POPS_TEST01.sdz
(1.32 MiB) Downloaded 14 times
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Demo 2 available!

Post by Argh »

Here's a second demo. It's a very quick rewrite of P.O.P.S. and trepan's depth-fog to create an "underwater world", showing how flexible this system is.

Very fun!
Attachments
POPS_TEST02.sdz
(3.33 MiB) Downloaded 22 times
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: P.O.P.S.- Demo 2 available!

Post by AF »

pictures please
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Demo 2 available!

Post by Argh »

I made a screen of the second one, first page. Doesn't really convey how it feels, though. It's one thing to show a static shot of thousands of bubbles, it's another thing to experience.

Found a bug in my LOS implementation, still working on that.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: P.O.P.S.- Demo 2 available!

Post by AF »

I've tested it, my little sister thought the bubbles were nifty, though she got distracted by a bowl of toast.

Basically its a lot of pale blue fog with bubbles randomly spawning out of the ground of various sizes floating upwards at different speeds. There are bubble sounds and theres a great big black box with some effects going across it that seem related to the bubble noises.

Running on a 13" macbook gf8400m core 2 duo 2GB DDR3 Win 7 x64
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Demo 2 available!

Post by Argh »

OK, bug's fixed, source is below.

I'll put out a new demo soonish, but maybe not tonight. The bubbles are a good demo of raw speed for high-frequency events, imo- a game developer can always double the number and area coverage, for example, to ensure a fairly consistent experience for end-users. And, of course, I should mention that if you wanted to do, say, streams of bubbles, or just have bubbles show up at certain places on a map, that's all really trivial to implement on the Lua side.

I just wanted to see thousands of bubbles at 80FPS on my hardware.

I'm a bit tired, so I may or may not get to another one tonight- I was thinking of doing some fire sims, now that I finally have a tool that's really suitable, but I probably need to sleep. I'd like to encourage people to give this a try, though. With minor tweaks here and there, this is really powerful, and pretty easy to use, imo.

@AF: the black box is just a display of particle states, showing one of the FBO's updates. IIRC, it's set to position, so it's mainly black with the occasional short-lived gray thing (particles that have exceeded their lifetime). The updated Lua has the LOS FBO on display, instead.
Attachments
POPS2_Bubbly.lua
(27.55 KiB) Downloaded 14 times
POPS2.lua
(29.07 KiB) Downloaded 18 times
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: P.O.P.S.- Demo 2 available!

Post by manolo_ »

i tested the newer mod and it didnt failed, there was no difference to the other test mod u released in the past time, maybe coz of turned-off shadows, reflectives ans simplest water
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Demo 2 available!

Post by Argh »

Did you see bubbles?
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: P.O.P.S.- Demo 2 available!

Post by manolo_ »

no, just these 2 spheres (little one rotated around the bigger one)
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: P.O.P.S.- Demo 2 available!

Post by Tribulex »

wtf is this?
screen045.png
(2.92 MiB) Downloaded 41 times

Code: Select all

Microsoft  (build 7600)
Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz; 4090MB RAM, 8179MB pagefile
OS: emulated 32bit mode
Using read-write data directory: C:\Program Files (x86)\Spring Engine\
Using read-only  data directory: C:\Users\Rick\Documents\My Games\Spring\
Using read-only  data directory: C:\ProgramData\Spring\
Scanning: C:\ProgramData\Spring\maps
Scanning: C:\ProgramData\Spring\base
Scanning: C:\ProgramData\Spring\mods
Scanning: C:\ProgramData\Spring\packages
Scanning: C:\Users\Rick\Documents\My Games\Spring\maps
Scanning: C:\Users\Rick\Documents\My Games\Spring\base
Scanning: C:\Users\Rick\Documents\My Games\Spring\mods
Scanning: C:\Users\Rick\Documents\My Games\Spring\packages
Scanning: C:\Program Files (x86)\Spring Engine\maps
Scanning: C:\Program Files (x86)\Spring Engine\base
Scanning: C:\Program Files (x86)\Spring Engine\mods
Scanning: C:\Program Files (x86)\Spring Engine\packages
Video mode set to  1680 x 1050 / 32 bit
SpringApp::InitWindow(): 4119144382 ms
[      0] SDL:  1.2.10
[      0] GL:   3.0.0
[      0] GL:   NVIDIA Corporation
[      0] GL:   GeForce 9600M GT/PCI/SSE2
[      0] GLEW: 1.4.0
[      0] Connecting to local server
[      0] Sound: OpenAL info:
[      0] Sound:   Vendor:     Creative Labs Inc.
[      0] Sound:   Version:    1.1
[      0] Sound:   Renderer:   Software
[      0] Sound:   AL Extensions: EAX EAX2.0 EAX3.0 EAX4.0 EAX5.0 EAX3.0EMULATED EAX4.0EMULATED AL_EXT_OFFSET AL_EXT_LINEAR_DISTANCE AL_EXT_EXPONENT_DISTANCE
[      0] Sound:   ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_EFX
[      0] Sound:   Device:     Generic Software
[      0] Sound:   Available Devices:  
[      0] Sound:                       Generic Software
[      0] CPreGame(): 118 ms
[      0] Starting demo recording
[      0] Using map New_Lammas_v1.smf
[      0] Recording demo demos/local_20091009_123253_New_Lammas_v1_0.80.4.sdf
[      0] Using script Empty script
[      0] Using mod ANTS 0
[      0] Using mod archive Ants.sdd
[      0] Became player 0 (team 0, allyteam 0)
[      0] Loading console: 0 ms
[      0] Sound: CSound(): Successfully parsed 3 SoundItems from gamedata/sounds.lua
[      0] Loading sounds: 19 ms
[      0] Camera and mouse: 385 ms
[      0] Parsing unit icons
[      0] missing return table from gamedata/modrules.lua
[      0] Error loading modrules, using defaults
[      0] missing return table from gamedata/modrules.lua
[      0] Parsing definitions
[      0] could not load buildOption data: missing file
[      0] Error parsing units/default.lua: error = 3, units/default.lua, [string "units/default.lua"]:13: '}' expected (to close '{' at line 1) near 'Category'
[      0] Loading all definitions:  0.131000
[      0] Loading defs: 132 ms
[      0] You are missing the "ARB_shadow_ambient" extension (this will probably make shadows darker than they should be)
[      0] Loading map informations
[      0] Opening map file
[      0] Loading Map
[      0] Loading detail textures
[      0] Creating overhead texture
[      0] Creating ground shading
[      0] Loading tile file
[      0] Reading tiles
[      0] Reading tile map
[      0] Creating projectile texture
[      0] Number of damage types: 3
[      0] Loading weapon definitions
[      0] Loading unit definitions
[      0] Loading feature definitions
[      0] Generating trees
[      0] Creating unit textures
[      0] Initializing map features
[      0] Reading estimate path costs
[      0] Pathing data checksum: 8bf265db
[      0] Creating sky
[      0] Loading LuaRules
[      0] gf1 = LuaRules/Gadgets/fixresources.lua
[      0] gf1 = LuaRules/Gadgets/gui.lua
[      0] gf1 = LuaRules/Gadgets/mo_noshare.lua
[      0] gf1 = LuaRules/Gadgets/null.lua
[      0] gf1 = LuaRules/Gadgets/pops2.lua
[      0] gf1 = LuaRules/Gadgets/pops2_bubbly.lua
[      0] gf1 = LuaRules/Gadgets/pwnage.lua
[      0] gf2 = LuaRules/Gadgets/fixresources.lua
[      0] gf2 = LuaRules/Gadgets/gui.lua
[      0] gf2 = LuaRules/Gadgets/mo_noshare.lua
[      0] gf2 = LuaRules/Gadgets/null.lua
[      0] gf2 = LuaRules/Gadgets/pops2.lua
[      0] gf2 = LuaRules/Gadgets/pops2_bubbly.lua
[      0] gf2 = LuaRules/Gadgets/pwnage.lua
[      0] Loaded gadget:  ANTS GUI            <gui.lua>
[      0] Loaded gadget:  Bubble POPS         <pops2_bubbly.lua>
[      0] Loaded gadget:  Fix Resources       <fixresources.lua>
[      0] Loaded gadget:  POPS 1.0            <pops2.lua>
[      0] Loaded gadget:  Pwnage Management   <pwnage.lua>
[      0] Loaded gadget:  null                <null.lua>
[      0] gf1 = LuaRules/Gadgets/fixresources.lua
[      0] gf1 = LuaRules/Gadgets/gui.lua
[      0] gf1 = LuaRules/Gadgets/mo_noshare.lua
[      0] gf1 = LuaRules/Gadgets/null.lua
[      0] gf1 = LuaRules/Gadgets/pops2.lua
[      0] gf1 = LuaRules/Gadgets/pops2_bubbly.lua
[      0] gf1 = LuaRules/Gadgets/pwnage.lua
[      0] gf2 = LuaRules/Gadgets/fixresources.lua
[      0] gf2 = LuaRules/Gadgets/gui.lua
[      0] gf2 = LuaRules/Gadgets/mo_noshare.lua
[      0] gf2 = LuaRules/Gadgets/null.lua
[      0] gf2 = LuaRules/Gadgets/pops2.lua
[      0] gf2 = LuaRules/Gadgets/pops2_bubbly.lua
[      0] gf2 = LuaRules/Gadgets/pwnage.lua
[      0] Loaded gadget:  ANTS GUI            <gui.lua>
[      0] Loaded gadget:  Bubble POPS         <pops2_bubbly.lua>
[      0] Loaded gadget:  Fix Resources       <fixresources.lua>
[      0] Loaded gadget:  POPS 1.0            <pops2.lua>
[      0] Loaded gadget:  Pwnage Management   <pwnage.lua>
[      0] Loaded gadget:  mo_noshare          <mo_noshare.lua>
[      0] Loading LuaGaia
[      0] Loading LuaUI
[      0] This mod has locked LuaUI access
[      0] Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
[      0] LuaUI: bound F11 to the widget selector
[      0] LuaUI: bound CTRL+F11 to tweak mode
[      0] Loaded widget:  Autoquit            <autoquit.lua>
[      0] Loaded widget:  CameraShake         <camera_shake.lua>
[      0] Loaded widget:  State Reverse Toggle  <cmd_state_reverse_toggle.lua>
[      0] Loaded widget:  Show All Commands   <unit_showallcommands.lua>
[      0] Loaded widget:  RelativeMinimap     <minimap_relative.lua>
[      0] Loaded widget:  Point Tracker       <gui_point_tracker.lua>
[      0] Loaded widget:  AllyCursors         <gui_ally_cursors.lua>
[      0] Loaded widget:  BA Waypoint Dragger  <unit_waypoint_dragger_2.lua>
[      0] Loaded widget:  Selection Send      <gui_selectionsend.lua>
[      0] Reloaded cmdcolors with: cmdcolors.tmp
[      0] Loaded widget:  SelectionCircle2    <gui_selectioncircle2.lua>
[      0] Loaded widget:  CustomFormations2   <unit_customformations2.lua>
[      0] LuaUI v0.2
[      0] Finalizing...
[      0] Spring 0.80.4.1 (0.80.4.2-0-g2f09034{@}-cmake-mingw32)
[      0] Build date/time: Sep 18 2009 16:36:20
[      0]  -> connection established (given id 0)
[      0] Player Player finished loading and is now ingame
[      0] 2000, 0.01554000005126
[      0] 2000, 0.012900000438094
[      0] 2000, 0.026650000363588
[      0] 2000, 0.010440000332892
[      0] 2000, 0.010979999788105
[      0] 2000, 0.029629999771714
[      0] 2000, 0.019379999488592

Billions of random numbers followed....
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: P.O.P.S.- Demo 2 available!

Post by luckywaldo7 »

manolo_ wrote:no, just these 2 spheres (little one rotated around the bigger one)
sounds suspiciously like the normal map test
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Demo 2 available!

Post by Argh »

The billions of numbers are just output from an echo. And you didn't see anything except for the output diagnostic in that screenshot, because you didn't start the gamestate- both systems require LOS from a nearby Unit before they will operate.

IOW, sorry, if you just fire it up and don't hit CTRL+ENTER, it won't do much that's cool, because it's not supposed to ;)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: P.O.P.S.- Demo 2 available!

Post by Argh »

OK, so... any testing results with the Demos? AF says it works, manolo says it doesn't- what hardware do you have, manolo?

Anyhow, a fire demo is first thing on my list tomorrow night, then I need to spend some time working on management systems for various use cases (iow, if you're wanting to ask questions about applying it to specific issues, now is a good time, I will be too busy past tomorrow night to do so during next week).

Oh, and here's a quick hack to the bubbles dealing with various small stuff. I am still doing some investigation of certain issues that should allow flame / smoke systems to operate nicely, but I am pretty confident in the results now, although I may need to operate more than one system (it appears GLSL won't let me change blending settings in the fragment operation, so there are some issues there that I'll have to confront).
Attachments
POPS2_Bubbly.lua
(27.66 KiB) Downloaded 8 times
Post Reply

Return to “Lua Scripts”