GMod - What are you working on? January 2015 (#41)
781 replies, posted
[QUOTE=WalkingZombie;47020468]3 render targets... each mirror needs to work properly for proper driving. Trust me, I should know, me mother is an automotive safety manager.[/QUOTE]
Were the dumb ratings because I mention my mother? Whatever, my point was that you would need 3 render targets, one for each mirror. The side mirrors would need their own RT texture, if not only because they are at slightly different angles, because seeing the side of the car in said mirrors is very helpful for proper driving. I do understand that 1 render target texture could be stretched to each mirror using different UV coordinates, but without perspective from the different reflective angles those side mirrors would be pointless.
I think the dumb ratings are because you're treating a car with mock physics in gmod as if it requires all the same features as a real car. You're taking it way too seriously.
[QUOTE=Giraffen93;47019112][t]http://i.imgur.com/cmLxRWw.jpg[/t]
i still get this thing though, the same as when i tried earlier[/QUOTE]
Now it works, but I don't like how much FPS it takes. Drops me down dramatically.
[t]http://i.imgur.com/tUnDImV.jpg[/t]
RenderTarget is 64x64. The smaller I make it, the lower fps demand yet it looks more pix-elated.
On a side note, my dropbox has been getting so much traffic, it closed my public links... fml
[B]EDIT:[/B]
Only uses one.
fps drops like roughly 50 from using mirror reflections.
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_263.png[/t]
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_264.png[/t]
Also, for some reason, some polygons wont display the mirror correctly. Depends on the car and how well it's been modeled. Possibly because of the UV positions messing up
[QUOTE=EthanTheGreat;47024146]Now it works, but I don't like how much FPS it takes. Drops me down dramatically.
[t]http://i.imgur.com/tUnDImV.jpg[/t]
RenderTarget is 64x64. The smaller I make it, the lower fps demand yet it looks more pix-elated.
On a side note, my dropbox has been getting so much traffic, it closed my public links... fml[/QUOTE]
You could probably get away with one rendertarget stretched across all 3 mirrors.
Actually i really like to do this...This weren't THAT hard...But looks cool [url]http://pastebin.com/AxE1338t[/url]
[vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2015-01/2015-01-27_23-30-57.mp4[/vid]
[QUOTE=gonzalolog;47024393]Actually i really like to do this...This weren't THAT hard...But looks cool [url]http://pastebin.com/AxE1338t[/url]
[vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2015-01/2015-01-27_23-30-57.mp4[/vid][/QUOTE]
Looks like call of duty but second one.
[editline]28th January 2015[/editline]
Creating examples for touchscreen library.
It does not requires entity.
[media]http://www.youtube.com/watch?v=ikXC0jiawHI&feature=youtu.be[/media]
i made a module
[media]http://www.youtube.com/watch?v=G8htrcHFoDM[/media]
[lua]
require("k70")
k70.open()
local function update()
local o = (LocalPlayer():Health() / 100) * 255
for i = 1, 144 do
k70.set(i, 255 - o, o, 0)
end
k70.send()
end
local lastHealth = 0
timer.Create("hpKey", 0.25, 0, function()
local health = LocalPlayer():Health()
if (lastHealth != health) then
update()
end
end)
[/lua]
[QUOTE=Ott;47024207]You could probably get away with one rendertarget stretched across all 3 mirrors.[/QUOTE]
For simplicity, and saving resources, that works, but forget real life physics, light bounces off the side mirrors at different angles, allowing you to see even more of the area around you.
Understanding it's not a real car, having all of the mirrors showing the same camera perspective would feel very weird. In fact, having the mirrors reflecting in different directions would add a better sense of dimension. As for using render targets in the first place, you're likely not even making a mirror. I would assume it acts more like you just have a camera on the back of your car.
I guess using just 1 "camera" would work, but I still believe 3 is the best option, for the sake of preserving a better feeling of depth.
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_265.png[/t]
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_266.png[/t]
Finally got to doing some sort of visual effects for my HUD.
Personally, I like the second one more.
[B]EDIT(2):[/B]
Regarding the mirrors.
The issue with using that is that not only does it take up [I]useful[/I] FPS time (50fps for highest quality), it also doesn't work with all car models.
While some car models have supported UV positioning for the polygons to render, some don't. Usually they look like a very blury representation like in this [url=http://vps31814.vps.ovh.ca:4568/screenshots/C_264.png]photo, side mirror.[/url]
Chances are I wont include it unless I can figure out a method of making a material use it's own preset [B]UV positions[/B]
I don't think that exists as far as I know. I've tried a lot of things so far, but no result.
[B]EDIT(3):[/B]
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_267.png[/t]
See how it's flipped?
Stuff like this happens when the car's vertex UV cords aren't perfected.
All those textures are the same btw.
Side note, if more than one car would be active in the map at the same time, hopefully you're only rendering the mirrors on the driver's local client, otherwise even having just 1 mirror per car would bog down performance immensely! Best method for the sake of saving performance would be to have mirrors drawn only for the driver, and using cubemaps otherwise.
[editline]28th January 2015[/editline]
50 FPS isn't that bad, but I'm sure many people will disagree with me. When I had shit for cash, 30 FPS was heaven. Gaming consoles get away with 30 FPS too, as well as youtube, while I know everyone would much prefer 60 FPS or 120 FPS. Well, one note however, 50 FPS on a 60Hz monitor would cause a small lack in synchronization with the monitor, but for a lot of people FPS doesn't stay static at 60 for every game anyway.
More Map Manipulation Examples with Map Script Plugin in NutScript 1.1
:DD
[media]http://www.youtube.com/watch?v=2e-l0BqUQYE[/media]
[media]http://www.youtube.com/watch?v=ztK6q4waMy0[/media]
-snip- I can't read
Hey where is that guy who made that beautiful console coloured print thing? I want it.
[QUOTE=Chessnut;47025131]i made a module[/QUOTE]
Really neat, I want to do some stuff with PC backlights like that. I just need to figure out which one, I was thinking of getting a Mad Catz Cyborg amBX, but still looking atm.
Another Example, Jail Door Manager
[media]http://www.youtube.com/watch?v=wzOpuTjPnnc[/media]
[QUOTE=EthanTheGreat;47025532][t]http://vps31814.vps.ovh.ca:4568/screenshots/C_265.png[/t]
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_266.png[/t]
Finally got to doing some sort of visual effects for my HUD.
Personally, I like the second one more.
[B]EDIT(2):[/B]
Regarding the mirrors.
The issue with using that is that not only does it take up [I]useful[/I] FPS time (50fps for highest quality), it also doesn't work with all car models.
While some car models have supported UV positioning for the polygons to render, some don't. Usually they look like a very blury representation like in this [url=http://vps31814.vps.ovh.ca:4568/screenshots/C_264.png]photo, side mirror.[/url]
Chances are I wont include it unless I can figure out a method of making a material use it's own preset [B]UV positions[/B]
I don't think that exists as far as I know. I've tried a lot of things so far, but no result.
[B]EDIT(3):[/B]
[t]http://vps31814.vps.ovh.ca:4568/screenshots/C_267.png[/t]
See how it's flipped?
Stuff like this happens when the car's vertex UV cords aren't perfected.
All those textures are the same btw.[/QUOTE]
consider parenting mirror-shaped models that exist only clientside to where the mirrors are, to get the material UV right
[editline]28th January 2015[/editline]
and go for really really pixelated mirrors, to not hurt fps
then apply blur to them
[editline]28th January 2015[/editline]
which is as simple as drawing a blur material ontop of them, or perhaps even a flag like phong is; i don't know much about blurring methods
try to avoid post-process
Still occasionally working on a 4 player (wave-based/survival'ish) gametype for my gamemode, where you have one different character per player:
[media]http://www.youtube.com/watch?v=JSlFwZhQVas[/media]
(video may contain greed, akimbo shotguns, me, dying a lot, and a perturbator on the background)
imagine a game like that where everyone controls the same player and their inputs are averaged
[QUOTE=bitches;47025828]consider parenting mirror-shaped models that exist only clientside to where the mirrors are, to get the material UV right
[editline]28th January 2015[/editline]
and go for really really pixelated mirrors, to not hurt fps
then apply blur to them
[editline]28th January 2015[/editline]
which is as simple as drawing a blur material ontop of them, or perhaps even a flag like phong is; i don't know much about blurring methods
try to avoid post-process[/QUOTE]
Wouldn't creating an IMesh with the mirror material applied be better than creating a clientside entity? Simply store the mirror vertices + position for each car model, create the IMeshes and translate + rotate them to the car mirrors should work just fine.
[QUOTE=bitches;47025841]imagine a game like that where everyone controls the same player and their inputs are averaged[/QUOTE]
Hah.
Well I meant that you can't have duplicate characters, because of that :v:
[QUOTE=bitches;47025841]imagine a game like that where everyone controls the same player and their inputs are averaged[/QUOTE]
And integrate it into Twitch to let the viewers play the game!
[QUOTE=Chessnut;47025131] snip [/QUOTE]
Can you make it flash for when really low health??
[QUOTE=grobov13;47025836]Still occasionally working on a 4 player (wave-based/survival'ish) gametype for my gamemode, where you have one different character per player:
[media]http://www.youtube.com/watch?v=JSlFwZhQVas[/media]
(video may contain greed, akimbo shotguns, me, dying a lot, and a perturbator on the background)[/QUOTE]
Everyone, give this gamemode more love
It's amazing and Necrossin is super talented
[t]http://i.imgur.com/HFodwSf.jpg[/t]
just reached 1600 sounds, and this thing needed some modifications to handle it..
now reads folders instead of categories, and it's much easier to add to it
[QUOTE=FPtje;47025713]Hey where is that guy who made that beautiful console coloured print thing? I want it.[/QUOTE]
Whoops, I forgot about it. Here you go: [url]https://gist.github.com/mentlerd/d56ad9e6361f4b86af84[/url]
For those who don't know what is that all about:
[img_thumb]https://dl.dropboxusercontent.com/u/7659139/Facepunch/PrintTableGrep.png[/img_thumb]
I created a Lua-JS bridge, which atm only supports calling JS functions from Lua.
Basically you can do this
[CODE]
local dhtml = vgui.Create("DHTML")
dhtml:SetHTML([[
<script>
test = {}
test.inner = {}
test.inner.func = function(str, num, obj) {
console.log("str: " + str);
console.log("num: " + num);
console.log("obj.str: " + obj.str);
console.log("obj.num: " + obj.num);
console.log("obj.innerTable.key: " + obj.innerTable.key);
}
</script>
]])
local bridge = dhtml.Bridge
bridge.test.inner.func("Hello JS", 42, {
str = "string",
num = 13,
innerTable = {
key = "value"
}
})
-- Need to give some time for JS to run
timer.Simple(2, function()
dhtml:Remove()
end)
[/CODE]
and it'll print
[IMG]http://i.imgur.com/6wPOZrp.png[/IMG]
Here's the repository: [url]https://github.com/wyozi/gmod-luajsbridge[/url].
[QUOTE=MDave;47026429]Whoops, I forgot about it. Here you go: [url]https://gist.github.com/mentlerd/d56ad9e6361f4b86af84[/url]
For those who don't know what is that all about:
<img>[/QUOTE]
[img]http://i.imgur.com/B5Ww8dG.png[/img]
I've wanted a generic show function for ages, one that prints useful representations of both normal values [I]and[/I] tables. Both [I]print[/I] and [I]PrintTable[/I] fail in that regard. Thanks for making it happen!
[QUOTE=grobov13;47025836]Still occasionally working on a 4 player (wave-based/survival'ish) gametype for my gamemode, where you have one different character per player:
[media]http://www.youtube.com/watch?v=JSlFwZhQVas[/media]
(video may contain greed, akimbo shotguns, me, dying a lot, and a perturbator on the background)[/QUOTE]
this would actually make me play single player gmod
Seriously, why with the dumb ratings? I continue not to understand. Well the simple fact that drawing mirrors for only the driver would be a lot better for performance. In the case that there is more than one car at a time, this idea would also greatly improve performance. I also understand that using only one RT texture would increase performance.
I'm still struggling to get shit done on my Naval Warfare gamemode. Boats, planes, airships, that fun stuff. My coders kind of suck at the whole being-reliable thing, and I've been trying to un-break resourcing on my own.
[url]https://vimeo.com/118036910[/url]
[video=vimeo;118036910]http://vimeo.com/118036910[/video]
I have no idea how to get video linking to work. :V
Sorry, you need to Log In to post a reply to this thread.