1. Post #361
    asshat
    PelPix123's Avatar
    August 2006
    3,394 Posts
    I assume you've used RenderTargets to generate that live picture of the world instead of our outdated env_cube system that exists. Applying a bump map and a blur-filter 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.
    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.

    Edited:

    Every square inch of the floor has a million texels of microscopic abrasion and dent damage
    Reply With Quote Edit / Delete United States Show Events Lua King Lua King x 1Dumb Dumb x 1 (list)

  2. Post #362
    Don't PM me about moderation - PM any of the mods.
    Robotboy655's Avatar
    May 2008
    15,873 Posts
    So, I have tried to add fancy effects to my weather thing...


    Works with colors:


    And the flashlight:


    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.

    Edited:

    Here's the new death screen for GMS too I guess:
    Reply With Quote Edit / Delete Estonia Show Events Artistic Artistic x 3Winner Winner x 1Optimistic Optimistic x 1 (list)

  3. Post #363
    ( ͡° ͜ʖ ͡°)
    Giraffen93's Avatar
    December 2006
    20,944 Posts
    Has anyone figured out how to make static props lighten up again after setting lightmap stuff? Or is it just broken?

    Edited:



    it was bound to happen...

    Reply With Quote Edit / Delete Sweden Show Events Funny Funny x 7Lua King Lua King x 6Disagree Disagree x 1Artistic Artistic x 1 (list)

  4. Post #364
    EthanTheGreat's Avatar
    September 2010
    607 Posts
    So, I have tried to add fancy effects to my weather thing...


    Works with colors:


    And the flashlight:


    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.

    Edited:

    Here's the new death screen for GMS too I guess:
    Are the cars normal scale?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  5. Post #365

    August 2014
    86 Posts
    Are the cars normal scale?
    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.
    Reply With Quote Edit / Delete United Kingdom Show Events Funny Funny x 1 (list)

  6. Post #366
    TpsTheHunter's Avatar
    November 2014
    245 Posts
    I just realized: There's only one right answer to the question of "What do I do with a reflective floor?"





    This is absolutely gorgeous in motion. Just walking around and looking at it. Holy shit.
    How much of a FPS impact do you think this has at average?
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 1 (list)

  7. Post #367
    Your local friendly Lua helper!
    bobbleheadbob's Avatar
    July 2011
    1,890 Posts
    How much of a FPS impact do you think this has at average?
    Given the FPS drop that the portal gun had using just two render targets, I'm guessing about 20-30.

    Edited:
    20-30 fps in total, that is; not a reduction of 20-30.
    Reply With Quote Edit / Delete United States Show Events Optimistic Optimistic x 1 (list)

  8. Post #368
    WalkingZombie's Avatar
    June 2013
    1,182 Posts
    Given the FPS drop that the portal gun had using just two render targets, I'm guessing about 20-30.
    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.
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 6Funny Funny x 2 (list)

  9. Post #369
    your lack of title is bothering me
    Nookyava's Avatar
    January 2013
    3,417 Posts
    He's talking about the addon...
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  10. Post #370
    WalkingZombie's Avatar
    June 2013
    1,182 Posts
    He's talking about the addon...
    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.
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 4 (list)

  11. Post #371
    Not another server
    StonedPenguin's Avatar
    August 2013
    1,589 Posts
    Just added autocomplete to my adminmod.


    Reply With Quote Edit / Delete United States Show Events Winner Winner x 5Lua King Lua King x 1 (list)

  12. Post #372
    Don't PM me about moderation - PM any of the mods.
    Robotboy655's Avatar
    May 2008
    15,873 Posts
    Are the cars normal scale?
    As I said before, those are the TDM cars from workshop.
    Reply With Quote Edit / Delete Estonia Show Events

  13. Post #373
    AirBlack's Avatar
    April 2012
    263 Posts
    autocomplete
    Does that work with quotes?
    Reply With Quote Edit / Delete Windows 7 Russian Federation Show Events

  14. Post #374
    kpjVideo's Avatar
    March 2013
    825 Posts
    So, I have tried to add fancy effects to my weather thing...
    I really like what you did with that 3d2d vehicle speed :)
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  15. Post #375
    Your local friendly Lua helper!
    bobbleheadbob's Avatar
    July 2011
    1,890 Posts
    Just added autocomplete to my adminmod.


    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 concommand.Add.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 4 (list)

  16. Post #376
    Dennab
    February 2012
    1,342 Posts
    Just added autocomplete to my adminmod.


    I always tried to make this work, could you publish an example ?
    Reply With Quote Edit / Delete France Show Events Agree Agree x 2 (list)

  17. Post #377
    Acecool discovered a way to get classes working in Lua; MetaTable users hate him, ArmA devs love him

    February 2012
    5,839 Posts
    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 concommand.Add.
    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: https://bitbucket.org/Acecool/acecoo....lua?at=master 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:
    //
    // 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
    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 )..

    Edited:

    I always tried to make this work, could you publish an example ?
    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... )

    http://wiki.garrysmod.com/page/Autocomplete_Tutorial
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 11Funny Funny x 3Useful Useful x 1 (list)

  18. Post #378
    Gold Member
    MDave's Avatar
    April 2010
    821 Posts
    Code:
    	return {
    		_cmd .. " <Entity ClassName>";
    		unpack( _list );
    	};
    Why would you even... Just table.insert at the first position.
    Reply With Quote Edit / Delete Hungary Show Events Funny Funny x 3Disagree Disagree x 1 (list)

  19. Post #379
    Acecool discovered a way to get classes working in Lua; MetaTable users hate him, ArmA devs love him

    February 2012
    5,839 Posts
    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>" );
    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..
    Reply With Quote Edit / Delete United States Show Events Useful Useful x 2Informative Informative x 1 (list)

  20. Post #380
    Gold Member
    cartman300's Avatar
    April 2011
    3,199 Posts
    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>" );
    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..
    Reply With Quote Edit / Delete Croatia Show Events Zing Zing x 1 (list)

  21. Post #381
    Acecool discovered a way to get classes working in Lua; MetaTable users hate him, ArmA devs love him

    February 2012
    5,839 Posts
    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... )
    Reply With Quote Edit / Delete United States Show Events

  22. Post #382
    Your local friendly Lua helper!
    bobbleheadbob's Avatar
    July 2011
    1,890 Posts
    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... )
    This code is ran once at startup. Optimization at this level means nothing.
    Reply With Quote Edit / Delete United States Show Events Zing Zing x 3Agree Agree x 2Funny Funny x 1Disagree Disagree x 1 (list)

  23. Post #383
    Not another server
    StonedPenguin's Avatar
    August 2013
    1,589 Posts
    Does that work with quotes?
    Yes.

    I always tried to make this work, could you publish an example ?
    There's a pretty basic example on the wiki that should give an idea how it works. http://wiki.garrysmod.com/page/Autocomplete_Tutorial
    Reply With Quote Edit / Delete Mac United States Show Events Late Late x 1 (list)

  24. Post #384
    Acecool discovered a way to get classes working in Lua; MetaTable users hate him, ArmA devs love him

    February 2012
    5,839 Posts
    This code is ran once at startup. Optimization at this level means nothing.
    Actually, results change as the player types for auto-complete to narrow down the list; it isn't ran once...
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 1 (list)

  25. Post #385
    Your local friendly Lua helper!
    bobbleheadbob's Avatar
    July 2011
    1,890 Posts
    Actually, results change as the player types for auto-complete to narrow down the list; it isn't ran once...
    But registering the autocomplete is ran but once, and that is where the dispute is.
    Reply With Quote Edit / Delete United States Show Events

  26. Post #386
    Don't PM me about moderation - PM any of the mods.
    Robotboy655's Avatar
    May 2008
    15,873 Posts


    I finally figured out a perfect circle drawing function with surface.DrawPoly
    Reply With Quote Edit / Delete Estonia Show Events Artistic Artistic x 5Late Late x 4Useful Useful x 1 (list)

  27. Post #387
    Your local friendly Lua helper!
    bobbleheadbob's Avatar
    July 2011
    1,890 Posts


    I finally figured out a perfect circle drawing function with surface.DrawPoly
    Trigonometry!
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 7 (list)

  28. Post #388
    Don't PM me about moderation - PM any of the mods.
    Robotboy655's Avatar
    May 2008
    15,873 Posts
    Trigonometry!
    Who would've thought that they teach kids in schools things that can actually be useful.
    Reply With Quote Edit / Delete Estonia Show Events Funny x 8Zing x 3Optimistic x 3Agree x 2Dumb x 1 (list)

  29. Post #389
    Acecool discovered a way to get classes working in Lua; MetaTable users hate him, ArmA devs love him

    February 2012
    5,839 Posts
    https://dl.dropboxusercontent.com/u/..._poly.lua.html

    Use draw.NoTexture( ) before drawing the poly to allow alpha to work, otherwise it'll always be translucent.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Disagree Disagree x 1 (list)

  30. Post #390
    Don't PM me about moderation - PM any of the mods.
    Robotboy655's Avatar
    May 2008
    15,873 Posts
    Textures!


    Acecool, your method sucks a bit, as in, you set UVs, but they don't do jack shit:

    I'd think you'd at least make your lua examples working out of the box, if you are going to teach anybody anything.
    Reply With Quote Edit / Delete Estonia Show Events Zing Zing x 11Agree Agree x 2Lua King Lua King x 1Funny Funny x 1 (list)

  31. Post #391
    Acecool discovered a way to get classes working in Lua; MetaTable users hate him, ArmA devs love him

    February 2012
    5,839 Posts
    You're right, that example doesn't have the uvs set properly... It's an old tutorial though so I haven't updated it yet with the new code but I'll do that in a bit ( I may phase it out though and extend the creating shapes tut when I finish the full poly meta-table ).

    I do have an option for the UV to spiral with the circle on one of the releases vs just stay flat )...

    Which will be in this soon: https://bitbucket.org/Acecool/acecoo....lua?at=master

    Code:
    //
    // Creates a circle
    //
    function poly:MakeCircle( _x, _y, _r, _points, _textureScale )
    	// U is how many times the texture should repeat along the X
    	local _u = ( _x + _r * 1 ) - _x;
    	local _u = 1;
    
    	// V is how many times the texture should repeat along the Y
    	local _v = ( _y + _r * 1 ) - _y;
    
    	//
    	local _textureScale = _textureScale || 0.099;
    	local _slices = ( 2 * math.pi ) / _points;
    	local _poly = { };
    	for i = 0, _points - 1 do
    		local _angle = ( _slices * i ) % _points;
    		local x = _x + _r * math.cos( _angle );
    		local y = _y + _r * math.sin( _angle );
    
    		// i / _points
    		// i * _angle / _points
    		table.insert( _poly, { x = x; y = y; u = _u; v = ( ( i * _angle / _points ) * _textureScale ) } );
    	end
    
    	return _poly;
    end
    There's the one that spirals ( and can be changed to go from straight to spiral )...
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 4Dumb Dumb x 1 (list)

  32. Post #392
    Gold Member
    Revenge282's Avatar
    July 2007
    3,004 Posts
    Am I missing something, or is this intentional? Initializing _u twice?

    Reply With Quote Edit / Delete United States Show Events Funny Funny x 10Agree Agree x 1Lua King Lua King x 1 (list)

  33. Post #393
    Gold Member
    EvacX's Avatar
    July 2010
    2,959 Posts
    even better, he declares _v but he never actually uses it
    Reply With Quote Edit / Delete Sweden Show Events Funny x 10Informative x 1Agree x 1Lua Helper x 1Lua King x 1Dumb x 1 (list)

  34. Post #394
    Exho's Avatar
    March 2014
    3,222 Posts
    Who would've thought that they teach kids in schools things that can actually be useful.
    I'll take that back once I have to divide polynomials
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Funny Funny x 1 (list)

  35. Post #395
    Don't PM me about moderation - PM any of the mods.
    Robotboy655's Avatar
    May 2008
    15,873 Posts
    Reply With Quote Edit / Delete Estonia Show Events Winner Winner x 1 (list)

  36. Post #396
    AIX-Who's Avatar
    October 2013
    876 Posts


    Anyone guess what i've been working on?

    In case it's not that obvious, a pay day gamemode for gmod.

    Player model, unlocks and current character data will be displayed on the menu as a filler of empty space.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Dumb Dumb x 1Winner Winner x 1 (list)

  37. Post #397

    July 2013
    162 Posts


    Anyone guess what i've been working on?

    In case it's not that obvious, a pay day gamemode for gmod.

    Player model, unlocks and current character data will be displayed on the menu as a filler of empty space.
    I worked on something like that. You might be able to use some of my ideas. https://github.com/wyozi/budgetday/
    Reply With Quote Edit / Delete Finland Show Events Friendly Friendly x 1 (list)

  38. Post #398
    Your local friendly Lua helper!
    bobbleheadbob's Avatar
    July 2011
    1,890 Posts
    I'll take that back once I have to divide polynomials
    I actually had to divide polynomials while making Luabee.
    I don't remember why, or for what purpose, but I remember at some point while making that addon that I looked up and realized that holy fuck I'm actually using this again.
    Reply With Quote Edit / Delete United States Show Events

  39. Post #399
    Gold Member
    Divran's Avatar
    April 2008
    2,626 Posts
    To join the circle bandwagon, there's one in wiremod here: https://github.com/wiremod/wire/blob...cts/circle.lua although I didn't make it. If I remember correctly, it was a guy named Sk8. His version supports ellipses as well, by allowing you to set width and height separately. Also supports rotation (useful if it's an ellipse).

    EDIT: hnnngg why do some of you insist on using table.insert (to push items to the end of the table) 100 times per frame, instead of just t[#t+1] = v or better yet, t[i] = v. my inner optimization nazi commits suicide
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Funny Funny x 5Agree Agree x 4 (list)

  40. Post #400
    Exho's Avatar
    March 2014
    3,222 Posts
    Eat your heart out WalkingZombie, making folders sucked ass but they are pretty much done! They still error occasionally, you can't rearrange stuff inside them yet (but you can move them out), and there is some wacky-ass behavior I need to fix with my special text entry (invisible DTextEntry with a DLabel on top, I made the caret myself). And thanks Neth for that sexy blur code!



    Edit: Almost forgot, I had a huge concern with the limit of apps with the old system (4x5 I think) and I didn't know how to nicely implement pages. So now with folders the max amount of apps you can have is now 180 instead of 20, I think...
    Reply With Quote Edit / Delete United States Show Events Friendly Friendly x 1Winner Winner x 1 (list)