• GMod - What are you working on? January 2015 (#41)
    781 replies, posted
[QUOTE=EthanTheGreat;46933456]I assume you've used [U]RenderTargets[/U] to generate that live picture of the world instead of our outdated env_cube system that exists. Applying a bump map and a [U]blur-filter[/U] gives you that shiny result. This by far is such a great idea. Glad someone thought of it because env_cubes are terribly outdated. I don't think it'd be that difficult to replicate either. Great stuff man, this brings new life to gmod.[/QUOTE] The bump map wouldn't be hard to replicate, but you can't replicate the microfacet shading seen in the closeup (especially between the grips). There's no blur filter. Those are microscopic scratches and dents. If I could zoom in about 20 more times, they'd be visible. [editline]14th January 2015[/editline] Every square inch of the floor has a million texels of microscopic abrasion and dent damage :v:
So, I have tried to add fancy effects to my weather thing... [t]http://i.imgur.com/xBINKuD.jpg[/t] Works with colors: [t]http://i.imgur.com/Ui8Natb.png[/t] And the flashlight: [t]http://i.imgur.com/2W3dDUB.jpg[/t] Unfortunately, there's just no way GMod can handle this amount of particles + a think function for each, and I can't even reference the env_projectedtexture entity from client, so it is horribly slow and well, not a thing that I can release. [editline]15th January 2015[/editline] Here's the new death screen for GMS too I guess: [t]http://i.imgur.com/yK447nJ.jpg[/t]
Has anyone figured out how to make static props lighten up again after setting lightmap stuff? Or is it just broken? [editline]14th January 2015[/editline] [img]http://i.imgur.com/2EOkLWj.png[/img] it was bound to happen... [media]http://www.youtube.com/watch?v=psjauozbT20[/media]
[QUOTE=Robotboy655;46934257]So, I have tried to add fancy effects to my weather thing... [t]http://i.imgur.com/xBINKuD.jpg[/t] Works with colors: [t]http://i.imgur.com/Ui8Natb.png[/t] And the flashlight: [t]http://i.imgur.com/2W3dDUB.jpg[/t] Unfortunately, there's just no way GMod can handle this amount of particles + a think function for each, and I can't even reference the env_projectedtexture entity from client, so it is horribly slow and well, not a thing that I can release. [editline]15th January 2015[/editline] Here's the new death screen for GMS too I guess: [t]http://i.imgur.com/yK447nJ.jpg[/t][/QUOTE] Are the cars normal scale?
[QUOTE=EthanTheGreat;46934578]Are the cars normal scale?[/QUOTE] He posts about adding new fancy particles into a weather system and about flashlights and how the particles will lags the game to much. Also not forgetting the nice looking death screen and you ask "Are the cars normal scale?" Dam you.. On other things it kinda sucks that Garry's mod can't handle the particles it does look very nice.
[QUOTE=PelPix123;46927267]I just realized: There's only one right answer to the question of "What do I do with a reflective floor?" [t]http://www.pelpix.info/reflectivity_test0004.jpg[/t] [t]http://www.pelpix.info/reflectivity_test0005.jpg[/t] [t]http://www.pelpix.info/reflectivity_test0006.jpg[/t] This is absolutely gorgeous in motion. Just walking around and looking at it. Holy shit.[/QUOTE] How much of a FPS impact do you think this has at average?
[QUOTE=TpsTheHunter;46935723]How much of a FPS impact do you think this has at average?[/QUOTE] Given the FPS drop that the portal gun had using just two render targets, I'm guessing about 20-30. [editline]clarity[/editline] 20-30 fps in total, that is; not a reduction of 20-30.
[QUOTE=bobbleheadbob;46936648]Given the FPS drop that the portal gun had using just two render targets, I'm guessing about 20-30.[/QUOTE] I set the portal depth to the maximum with no frame drop? (with ALL graphics related settings at maximum, including AA, AT, MB, HDR, etc.) at 1920x1080, VSync though. No frame drop in Portal 2 either, on max settings, at 1920x1080, in Co-Op mode, with 4 portals on screen at once.
He's talking about the addon...
[QUOTE=Nookyava;46937066]He's talking about the addon...[/QUOTE] Ah. I don't know much about that one. How is this post dumb? Is it because I'm not up to date with the shit everyone else here does? Seriously? I don't know much about this particular "Portal Gun addon", other than it involved a portal gun, apparently with portals that render using 2 RT textures.
Just added autocomplete to my adminmod. [t]http://p.sup.sx/i/1421311676.gif[/t] [t]http://p.sup.sx/i/1421311637.gif[/t]
[QUOTE=EthanTheGreat;46934578]Are the cars normal scale?[/QUOTE] As I said before, those are the TDM cars from workshop.
[QUOTE=StonedPenguin;46937714]autocomplete[/QUOTE] Does that work with quotes?
[QUOTE=Robotboy655;46934257]So, I have tried to add fancy effects to my weather thing... [t]http://i.imgur.com/xBINKuD.jpg[/t] [/QUOTE] I really like what you did with that 3d2d vehicle speed :)
[QUOTE=StonedPenguin;46937714]Just added autocomplete to my adminmod. [t]http://p.sup.sx/i/1421311676.gif[/t] [t]http://p.sup.sx/i/1421311637.gif[/t][/QUOTE] Autocomplete is a sorely underused feature. What's worse is when developers skip autocomplete AND they neglect the help text option. Always use that fourth argument in [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/concommand/Add]concommand.Add[/url].
[QUOTE=StonedPenguin;46937714]Just added autocomplete to my adminmod. [t]http://p.sup.sx/i/1421311676.gif[/t] [t]http://p.sup.sx/i/1421311637.gif[/t][/QUOTE] I always tried to make this work, could you publish an example ?
[QUOTE=bobbleheadbob;46939013]Autocomplete is a sorely underused feature. What's worse is when developers skip autocomplete AND they neglect the help text option. Always use that fourth argument in [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/concommand/Add]concommand.Add[/url].[/QUOTE] Since we're on the topic of auto-fill ( a very useful but underused system )... Here's what I'm working on: It is commonly misunderstood how to properly integrate it despite wiki having a good example. On top of that, if you define a console command on the server and want autocomplete you need to have the console command defined on the client and network it to the server to execute it on the server ( which is why I added that feature to my net system: [url]https://bitbucket.org/Acecool/acecooldev_base/src/master/gamemode/shared/classes/networking/cl_networking.lua?at=master[/url] first function; and I'll be adding helper functions to easily add it ) [code]networking:AddConCommand( "dev_spawnent", function( _cmd, _input ) // Set up out list, and process the input; it needs to be trimmed because the space ( which separates args ) isn't excluded... _input = ( !_input || _input == "" ) && "" || string.Trim( string.lower( _input ) ); local _list = concommand.GetAutofillEntityList( _cmd, _input, _list ) return { _cmd .. " <Entity ClassName>"; // This one is to show the player what is expected unpack( _list ); // And this shows data based on what the user is typing }; end, "[DEV] Spawns an entity, x, ( 5 feet + object size ) in front of the player." ); [/code] [code]// // This will be changed into a full fledged autofill system; this particular partial will be in charge of // replacing <entity> or whatever in the template text. // function concommand.GetAutofillEntityList( _cmd, _input ) // Helper function to avoid needing to repeat this code over and over... Pass by reference, we're modifying _list directly. local function ProcessEntityList( _cmd, _input, _data, _list ) for k, v in pairs( _data ) do local _bContains = !_input || _input == "" || string.StartWith( string.lower( k ), _input ); local _blacklisted = ( BLACKLISTED_ENTITIES[ string.lower( k ) ] || BLACKLISTED_WEAPONS[ string.lower( k ) ] ); if ( _bContains && !_blacklisted ) then table.insert( _list, _cmd .. " " .. k ); end end return _list; end // All of the _list = aren't needed because of pass by ref, the helper-function is modifying the actual list // so it isn't needed; but I plan on recoding it to make it much more robust so I'm leaving it... local _list = { }; _list = ProcessEntityList( _cmd, _input, list.Get( "SpawnableEntities" ), _list ); _list = ProcessEntityList( _cmd, _input, list.Get( "NPC" ), _list ); _list = ProcessEntityList( _cmd, _input, list.Get( "Weapon" ), _list ); _list = ProcessEntityList( _cmd, _input, list.Get( "Vehicles" ), _list ); return _list; end[/code] So I'm working on making it easy to add autofill so you can set up an autofill by specifying arguments ( like "<cmd> <ent_class>", "<cmd> <ent_id>", "<cmd> <player_steamid>", "<cmd> <player_name>" and see if I can add sub-options such as <player_steamid:display name> so a name will be displayed but the steamid will be used when selected ).. [editline]15th January 2015[/editline] [QUOTE=ExtReMLapin;46939089]I always tried to make this work, could you publish an example ?[/QUOTE] The wiki has a great tutorial, the function I provided to generate a list will also work ( just create the blacklist table, etc in the form: blacklists = { weapon = true, ent_class = true }; etc... ) [url]http://wiki.garrysmod.com/page/Autocomplete_Tutorial[/url]
[QUOTE=Acecool;46939090] [code] return { _cmd .. " <Entity ClassName>"; unpack( _list ); }; [/code] [/QUOTE] Why would you even... Just table.insert at the first position.
The function returns a table while the autocomplete system requires a table, not tables in tables. This was just the first "proof" I wrote to start developing the automatic auto-fill system so there will be changes to optimize it ( and when it is done it'll require an argument which sets the layout of the auto-fill meaning I can just return _list; because the list will automatically insert the layout string as the first entry and process any replacements ). I could define the table there and then using Lua pass-by-reference system to modify the table directly without needing to return anything which would also allow me to return _list but that just means more code the end-developer will need to write for the system to work. It'll be more of a 1 line thing when I'm done such as: [code]networking:AddConCommand( "ban", "<player_steamid:display name> <time:abs, duration>" );[/code] which would then add a clientside console command "ban" which networks to the server ( meaning the console command exists on the server and can have all of the checks but have a clientside autocomplete while the security checking remains on the server ) with automatic display of the helper string and player names which get replaced with steamid then number for ban time..
[QUOTE=Acecool;46940023]The function returns a table while the autocomplete system requires a table, not tables in tables. This was just the first "proof" I wrote to start developing the automatic auto-fill system so there will be changes to optimize it ( and when it is done it'll require an argument which sets the layout of the auto-fill meaning I can just return _list; because the list will automatically insert the layout string as the first entry and process any replacements ). I could define the table there and then using Lua pass-by-reference system to modify the table directly without needing to return anything which would also allow me to return _list but that just means more code the end-developer will need to write for the system to work. It'll be more of a 1 line thing when I'm done such as: [code]networking:AddConCommand( "ban", "<player_steamid:display name> <time:abs, duration>" );[/code] which would then add a clientside console command "ban" which networks to the server ( meaning the console command exists on the server and can have all of the checks but have a clientside autocomplete while the security checking remains on the server ) with automatic display of the helper string and player names which get replaced with steamid then number for ban time..[/QUOTE] [img]http://i.imgur.com/NUruZtb.png[/img]
Inserting at the first position is as bad as what the current code does. It inserts at the first position and shifts all other values over by 1 ( n times ) whereas the current one is n for the current table, ie n-1... It'll be revised and optimized so that unpack won't be needed in the future and the helper line will be the first entry before the others are added ( instead of the dev needing to create the list before the call to the helper/replacer function, etc... )
[QUOTE=Acecool;46940148]Inserting at the first position is as bad as what the current code does. It inserts at the first position and shifts all other values over by 1 ( n times ) whereas the current one is n for the current table, ie n-1... It'll be revised and optimized so that unpack won't be needed in the future and the helper line will be the first entry before the others are added ( instead of the dev needing to create the list before the call to the helper/replacer function, etc... )[/QUOTE] This code is ran once at startup. Optimization at this level means nothing.
[QUOTE=AirBlack;46938551]Does that work with quotes?[/QUOTE] Yes. [QUOTE=ExtReMLapin;46939089]I always tried to make this work, could you publish an example ?[/QUOTE] There's a pretty basic example on the wiki that should give an idea how it works. [url]http://wiki.garrysmod.com/page/Autocomplete_Tutorial[/url]
[QUOTE=bobbleheadbob;46940412]This code is ran once at startup. Optimization at this level means nothing.[/QUOTE] Actually, results change as the player types for auto-complete to narrow down the list; it isn't ran once...
[QUOTE=Acecool;46940832]Actually, results change as the player types for auto-complete to narrow down the list; it isn't ran once...[/QUOTE] But registering the autocomplete is ran but once, and that is where the dispute is.
[img]http://i.imgur.com/uXOuxyX.gif[/img] I finally figured out a perfect circle drawing function with surface.DrawPoly :v:
[QUOTE=Robotboy655;46940966][img]http://i.imgur.com/uXOuxyX.gif[/img] I finally figured out a perfect circle drawing function with surface.DrawPoly :v:[/QUOTE] Trigonometry!
[QUOTE=bobbleheadbob;46940974]Trigonometry![/QUOTE] Who would've thought that they teach kids in schools things that can actually be useful.
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/poly/simplified_circles_with_poly.lua.html[/url] Use draw.NoTexture( ) before drawing the poly to allow alpha to work, otherwise it'll always be translucent.
Textures! [img]http://i.imgur.com/HS5HpSv.gif[/img] Acecool, your method sucks a bit, as in, you set UVs, but they don't do jack shit: [img]http://i.imgur.com/VvOq0mj.png[/img] I'd think you'd at least make your lua examples working out of the box, if you are going to teach anybody anything.
Sorry, you need to Log In to post a reply to this thread.