• GMod - What are you working on? November 2016 (#63)
    287 replies, posted
[QUOTE=grunewald;51381602][img]https://s16.postimg.org/qh6b9kr1x/badfps.png[/img][/QUOTE] Can't you just make a clientside model for each object like the way the DModelPanel does it? Shouldn't that be simpler as it's already using a 3D context?
[QUOTE=AJ10017;51384658]are you recreating the DModel Panels each frame?[/QUOTE] I'm pretty certain those are spawnicons.
[QUOTE=bobbleheadbob;51389619]I'm pretty certain those are spawnicons.[/QUOTE] Spawn icons use DModel Panels to generate the image. Theres no reason why his frame rate would drop so much unless he was recreating everything every frame
[QUOTE=pierre0158;51384332]I bet it's because you can't code shit. [highlight](User was banned for this post ("Rude" - Blazyd))[/highlight][/QUOTE] not really, i tested some stuff and forgot that ive added more than 1000 icons, now it works fine. [sp]don't be rude, but i thing you got the lesson[/sp] [QUOTE=bobbleheadbob;51389619]I'm pretty certain those are spawnicons.[/QUOTE] your damn right Also, ive looked into the DModel at github and i am going to make something simmilar so users are tricked into thinking that it is an actual DModel
[QUOTE=grunewald;51390401] Also, ive looked into the DModel at github and i am going to make something simmilar so users are tricked into thinking that it is an actual DModel[/QUOTE] Uhh, wtf is that supposed to mean and why would you do that?
[QUOTE=mijyuoon;51391384]Uhh, wtf is that supposed to mean and why would you do that?[/QUOTE] Well basic, i am gonma try to make the DModelPanel work om 3d2d..
[QUOTE=grunewald;51393500]Well basic, i am gonma try to make the DModelPanel work om 3d2d..[/QUOTE] We got what you are trying to do... We want to know why you are doing it that way.
[QUOTE=grunewald;51393500]Well basic, i am gonma try to make the DModelPanel work om 3d2d..[/QUOTE] Well...DModelPanel runs inside a 3d2d, so you most likely won't be able to perform this task, there are really hacky ways to do it, but them won't most likely work Pageking means i have to show something :D [quote="Control group"][vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2016/11/2016-11-13_13-13-58.mp4[/vid][/quote][quote="Wang control"][vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2016/11/2016-11-11_00-15-05.mp4[/vid][/quote][quote="Search control"][vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2016/11/2016-11-08_11-54-31.mp4[/vid][/quote][quote="Analytics control"][vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2016/11/2016-11-06_15-16-40.mp4[/vid][/quote]
Finally got around to porting the compiler for Pancake Script to GLua. Took a bit of doing, especially since Lua is one-based and python is zero-based (lots of off-by-one errors, oh my gawd :cry:). Anyways, I still don't have a gui for the editor yet, so for now I'll just have to demonstrate the compiler's functionality using an external text editor. [video]https://youtu.be/kFf1jDpItdQ[/video]
copying more design because that's all I'm good at. working on my text screen tool again, added the option for some outlines on the text, and fixed some spacing issues. I'd ideally like to be able to use different fonts in the same line of text, as well as different colors, but too complicated. [t]http://zombine.me/ss/20161118205556_1.jpg[/t] [t]http://zombine.me/ss/20161118205334_1.jpg[/t]
[t]https://a.pomf.cat/owvlcw.png[/t] made this in paint :v it's absolute garbage but it is semi good for paint i guess [editline]a[/editline] $8 to whoever makes a proper svg for it and makes it not asymmetrical :v [editline]b[/editline] that was a joke don't do it ok
[QUOTE=MeepDarknessM;51394813][t]https://a.pomf.cat/owvlcw.png[/t] made this in paint :v it's absolute garbage but it is semi good for paint i guess [editline]a[/editline] $8 to whoever makes a proper svg for it and makes it not asymmetrical :v[/QUOTE] Interesting! Never seen a gamemode like this before.
[video] [url]http://www.youtube.com/watch?v=oTHwDfCb_0s[/url][/video] Made for a client. Note that it shouldn't ever actually fill your screen. Every other notification comes in from the left. The sound effects are stereo so they sound like they fly in from that direction.
[QUOTE=Revenge282;51393616]We got what you are trying to do... We want to know why you are doing it that way.[/QUOTE] The default DModelPanel dont om 3d2d :(
[QUOTE=grunewald;51395212]The default DModelPanel dont om 3d2d :([/QUOTE] [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/vgui/dmodelpanel.lua#L127-L145"]It does some cam.Start3D stuff here to draw the model [/URL]that you might be able to use in a 3D2D context
[t]http://i.imgur.com/J39Lulf.jpg[/t] I have no ideas how UV mapping works and scopes are hard [editline]19th November 2016[/editline] [t]http://i.imgur.com/hGMeEif.jpg[/t] I've come full misaligned oval (trying to get this: [url]http://1.bp.blogspot.com/_jAKdlVfsBY0/TBmJY_L6ZcI/AAAAAAAAALE/bBYGcu01qXQ/s1600/screenshot+1.jpg[/url] )
[QUOTE=code_gs;51395794]I have no ideas how UV mapping works and scopes are hard[/QUOTE] Though I don't know much about the topic it doesn't seem like that should be too hard. Can you just draw the circle in the center which takes the full screen height then do ScrW-CircleDiameter to know how big to make the black bars on the left and right? [url=https://youtu.be/B3pjri-5sPc]This[/url] video might come in handy.
[QUOTE=YourStalker;51395898]Though I don't know much about the topic it doesn't seem like that should be too hard. Can you just draw the circle in the center which takes the full screen height then do ScrW-CircleDiameter to know how big to make the black bars on the left and right? [url=https://youtu.be/B3pjri-5sPc]This[/url] video might come in handy.[/QUOTE] Figured it out; I ended up doing matrix-mirror operations on a set of initial set of UV values to align the texture edges. As for the shape, I took the height going outward from the centre with a 16th of buffer space for the x and y-coordinates. Final result: [t]http://i.imgur.com/0oaV8Q5.jpg[/t] Pretty damn close
[QUOTE=code_gs;51395794][t]http://i.imgur.com/J39Lulf.jpg[/t] I have no ideas how UV mapping works and scopes are hard [editline]19th November 2016[/editline] [t]http://i.imgur.com/hGMeEif.jpg[/t] I've come full misaligned oval (trying to get this: [url]http://1.bp.blogspot.com/_jAKdlVfsBY0/TBmJY_L6ZcI/AAAAAAAAALE/bBYGcu01qXQ/s1600/screenshot+1.jpg[/url] )[/QUOTE] Hey, I've done that! It's actually pretty simple. Part of doing this properly is knowing the screen's resolution. In most cases the screen's going to be wider than it is tall, which means we'd put black bars to the left and to the right on the screen, while in the middle we put a texture in a square that is the size of the screen's height. Like so: [code] local scrW = ScrW() local scrH = ScrH() local x = scrW / 2.0 local y = scrH / 2.0 local scope_size = scrH -- cover edges local sh = scope_size / 2 local w = (x - sh) local rect1 = {0, 0, w, scope_size} local rect2 = {x + sh , 0, w, scope_size} surface.SetDrawColor( 0, 0, 0, 252 ) surface.DrawRect(rect1[1], rect1[2], rect1[3], rect1[4]) surface.DrawRect(rect2[1], rect2[2], rect2[3], rect2[4]) surface.SetTexture( scope ) surface.DrawTexturedRectRotated(x, y, scope_size, scope_size, 0) [/code] EDIT: God damn it, I got ninja'd.
[QUOTE=raubana;51396152]Hey, I've done that! It's actually pretty simple. Part of doing this properly is knowing the screen's resolution. In most cases the screen's going to be wider than it is tall, which means we'd put black bars to the left and to the right on the screen, while in the middle we put a texture in a square that is the size of the screen's height. Like so: [code] local scrW = ScrW() local scrH = ScrH() local x = scrW / 2.0 local y = scrH / 2.0 local scope_size = scrH -- cover edges local sh = scope_size / 2 local w = (x - sh) local rect1 = {0, 0, w, scope_size} local rect2 = {x + sh , 0, w, scope_size} surface.SetDrawColor( 0, 0, 0, 252 ) surface.DrawRect(rect1[1], rect1[2], rect1[3], rect1[4]) surface.DrawRect(rect2[1], rect2[2], rect2[3], rect2[4]) surface.SetTexture( scope ) surface.DrawTexturedRectRotated(x, y, scope_size, scope_size, 0) [/code] EDIT: God damn it, I got ninja'd.[/QUOTE] Thanks for your advice; the main problem I was having was trying to figure out the order of the UV coordinates per quadrant, but I ended up guessing for the first two until I saw the mirroring pattern.
[vid]https://u.pomf.is/gfzyax.mp4[/vid] Wanted to make a good looking, easy to create and elaborate UI library once and for all. Here's some of the code from the example file (123 lines in total) [t]http://i.imgur.com/yUELy3r.png[/t] Also for the love of god someone explain to me why the text entries re-dock to the top once given focus :scream:
[QUOTE=Author.;51396319][vid]https://u.pomf.is/gfzyax.mp4[/vid] Wanted to make a good looking, easy to create and elaborate UI library once and for all. Here's some of the code from the example file (123 lines in total) [t]http://i.imgur.com/yUELy3r.png[/t] Also for the love of god someone explain to me why the text entries re-dock to the top once given focus :scream:[/QUOTE] It's very nice to look at, and seems very responsive! Very nice work! [sp]now do it with material design :)[/sp]
[QUOTE=Author.;51396319]Fancy shmancy stuff[/QUOTE] It looks good, but I feel like some of the colors contrast like there's no tomorrow. I also really like the way you made the library.
[t]http://images.akamai.steamusercontent.com/ugc/133249081668762592/3BD4AB664D410671710FB3BE26FC73CD94B94564/[/t] Interior electrics models for SeriousRP gamemode (WIP). Electrics in this gamemode will be 220V, 60Hz. Again, the double-switch effect is due to all bodygroups being visible at the moment - there is no Lua backing those entities yet.
[QUOTE=Author.;51396319][vid]https://u.pomf.is/gfzyax.mp4[/vid] Wanted to make a good looking, easy to create and elaborate UI library once and for all. Here's some of the code from the example file (123 lines in total) [t]http://i.imgur.com/yUELy3r.png[/t] Also for the love of god someone explain to me why the text entries re-dock to the top once given focus :scream:[/QUOTE] [del]Does it use Derma as the backend or it's completely from scratch?[/del] I see it's Derma. Well, it's certainly less painful to make this than what I was doing with making GMod UI system from scratch. (Which I haven't finished because I got bored of GMod :saddowns:)
[QUOTE=ph:lxyz;51397114][t]http://images.akamai.steamusercontent.com/ugc/133249081668762592/3BD4AB664D410671710FB3BE26FC73CD94B94564/[/t] Interior electrics models for SeriousRP gamemode (WIP). Electrics in this gamemode will be 220V, 60Hz. Again, the double-switch effect is due to all bodygroups being visible at the moment - there is no Lua backing those entities at this moment.[/QUOTE] You should disable shadows on the entities
it's not perfect, but i am working on it [video=youtube;dQw0fI2NfiA]https://www.youtube.com/watch?v=dQw0fI2NfiA&feature=youtu.be[/video]
I tried adding in an editor, but it turned out kind of shitty. The standard DTextEntry element is pretty mediocre so at some point I'll have to make a custom panel for the editor. I also added a light to the CPUs which can have their color changed using the script they're running. As a test, I also added really simple tracing, but... well, it didn't quite work... [video]https://youtu.be/mmKSoB74Jls[/video]
[QUOTE=raubana;51397934]The standard DTextEntry element is pretty mediocre so at some point I'll have to make a custom panel for the editor[/QUOTE] If you ever figure out a good override for DrawTextEntryText let me know
I have been working off and on for a couple months to make my next mod. I make train mods for gmod (Working vehicles), and my newest will be a 4-4-0 American Steamer. There are many IRL varients, So I mixed between them all. I have a video to show them working. Update video is 2 days old, I have added much more since then. [video=youtube;ImSykz5fdwY]https://www.youtube.com/watch?v=ImSykz5fdwY[/video] Just a 10 minute old picture [IMG]http://images.akamai.steamusercontent.com/ugc/264979370766267453/E48C3360F0ED396D13E2C380CA6D9CDC5F4525BA/?interpolation=lanczos-none&output-format=jpeg&output-quality=95&fit=inside|1024:576&composite-to%3D%2A%2C%2A%7C1024%3A576&background-color=black[/IMG]
Sorry, you need to Log In to post a reply to this thread.