• gmcl_renderx - Extended Render Library
    379 replies, posted
i got banned 4 usign this beware or u will be banned too..
[QUOTE=U MAD?]i got banned 4 usign this beware or u will be banned too..[/QUOTE] For gods sake.
[QUOTE=U MAD?]i got banned 4 usign this beware or u will be banned too..[/QUOTE] I got banned for bad spelling. Beware, or you'll be banned too... [b]Edit:[/b] :v: I just love those prophets of doom.
I hope he realized that this was clientside, and, if used properly, would only make you invisible to yourself. Which you can do already without the module. Meaning that the module isn't what got you banned. It was your spelling or your Chinese hacks. Probably the hacks.
I vote for speeling.
I guess this ain't gonna be used for anything that gets released.
I know this is really pathetic but... would anyone mind talking to me in person or explaining how it functions in a simpler way? I understand what clip planes are, I just don't know how adding a binary module will allow you do make a prop which can block the rendering of the objects underneath it. Heck... I have tons of questions: -If the object is dissapeared (check first video), does it still have a physical model or is it completely gone? -What happens if you drop the object inside the portal? Could you still get it out? And where is it at that moment? Can you undo it? Does it have a physical state? Why isn't it being rendered? -Why is the object in the first video acting like a magical hat with a container on the other side? Like a second dimension? -Is the object stored in the game cache? -In what language did you write the module? C++? -If I add this module, what could I do with it that I can't do right now? -How did you script the object (in your first movie) so that it stopped the objects "in it" from rendering? -Could anyone post some links to interesting topics about this? I'd love to learn all about this. I'd rather get links, actually :) -If I'd want to re-create one of those portal PHX plates like in your first vid, would I have to code it? If so, would it act as an entity or a basic prop? Would it be coded in .lua then? And what are the avaible vars that you've added? Holy... I've just got too many questions. I'd really appreciate it if someone would mind explaining, or at least give me some nice links to learn from. I don't know anything about this, so I'd really love to learn. Thanks in regard!
YAY! WIRE MOD LINKABLE CAMERAS! (more like portals with no magi doors =D)
[QUOTE=lucasmontec]YAY! WIRE MOD LINKABLE CAMERAS! (more like portals with no magi doors =D)[/QUOTE] So has anyone done anything fun with this?
[QUOTE=DieHardDeus]So has anyone done anything fun with this?[/QUOTE] Homeworlds style hyperdrive.
[QUOTE=DrFattyJr]Homeworlds style hyperdrive.[/QUOTE] I found one video from this but where can i download this hyperdrive? :(
This module is loads of fun to play with! I'm trying to emulate that homeworld warp but it's costing me an arm and a leg... I'll figure it out eventually though! Also, Jinto, do you think you could document how you are clipping the physicsmodel? I've just been creating a new physmodel box or keeping the players away with a repulsion field while the object is being warped. Actually clipping the physicsmodel would be ideal though, did you make a binary module for that too or can it be done with lua? Any feedback would be greatly appreciated!
[QUOTE=ZeikJT;13190154]This module is loads of fun to play with! I'm trying to emulate that homeworld warp but it's costing me an arm and a leg... I'll figure it out eventually though! Also, Jinto, do you think you could document how you are clipping the physicsmodel? I've just been creating a new physmodel box or keeping the players away with a repulsion field while the object is being warped. Actually clipping the physicsmodel would be ideal though, did you make a binary module for that too or can it be done with lua? Any feedback would be greatly appreciated![/QUOTE] You can't clip it with Lua, and i think it would be hard to do it with a module but not impossible.
[QUOTE=kevkev;13205462]You can't clip it with Lua, and i think it would be hard to do it with a module but not impossible.[/QUOTE] Well, Jinto said he had a way, but yeah I'm guessing he's written a binary for it too... Do you think he'd be willing to release it? I'd be all for it. I've got a lot of progress into using the renderclipplanes now, but the physics would complete it all. Making fake physboxes just isn't the same. Also, it might just be possible in lua, after all there is a Entity:PhysicsFromMesh( table ) function to be used. I could (in theory) calculate a plane's intersection with a basic bounding box and create a mesh table to be used by this function, it could then have angular slices and such... but the math required might become very strenuous. Mesh functions are very underused in gmod so getting help would be slim too. I might have to try it anyways though... sounds like a huge undertaking though! Haha.
He just said he had a way, he didn't specify whether it was binary or Lua.
I'm kinda a noob with this stuff, and I'm sure this has already been asked before, but where exactly do I put the files/ what do I do with this?
You need lua programming knowledge to be able to do much of anything with this. Do you have any intention of coding? If you don't then turn around and leave this thread right now. If on the other hand you do, then using this module is pretty darn simple. 1.) Put the gmcl_renderx.dll into your garrysmod/garrysmod/lua/includes/modules 2.) Whip up a new SEnt or STool or whatever you wish to use the render clipping with. 3.) Add this line to the clientside you will be coding in: require( "renderx" ) 4.) Then you can use these two simple lines of code on an entity to 'cut' it in half: [code] Plane( entity:GetForward( ), entity:GetPos( ) ) entity:SetRenderClipPlaneEnabled( true ) entity:SetRenderClipPlane( p.Normal, p.Distance )[/code] The Plane function comes with the render library as well if I'm not mistaken, it turns a direction vector and position vector input into plane data that the renderclipplane function can use. If you are simply making an entity clip itself you can use some of the other functions to just affect the entity itself, the advantages are that you will be able to push and pop planes onto it.
Hrmm. How do I flip the RenderView so it would be mirror like? EDIT: And how do I make props not show through?
Whatever happened to GPortal.
Enough people seem to want to be able to control the fog in the map instead of their own draw calls. So, I'm giving you guys access to fogparams_t on the local player. This is the fog on gm_construct. [code] ] lua_run_cl PrintTable( LocalPlayer():GetFogParams() ); Direction = 1.0000 0.0000 0.0000 StartLerpTo = 0 ColorPrimaryLerpTo: a = 0 b = 228 g = 208 r = 203 Enable = true Duration = 0 Blend = true LerpTime = 0 MaxDensity = 1 FarZ = -1 ColorPrimary: a = 0 b = 228 g = 208 r = 203 End = 40000 Start = 200 ColorSecondary: a = 0 b = 231 g = 176 r = 133 EndLerpTo = 0 ColorSecondaryLerpTo: a = 0 b = 231 g = 176 r = 133 [/code] This will create a red/green blend fog. [lua] require( "renderx" ); /*------------------------------------- SetupFog -------------------------------------*/ local function SetupFog( origin, angles ) // setup the table containing the fog settings we want to use local fog = { ColorPrimary = Color( 255, 0, 0, 255 ), ColorSecondary = Color( 0, 255, 0, 255 ), Direction = Vector( 1, 0, 0 ), Start = 200, End = 20000, Enable = true, Blend = true, MaxDensity = 1, }; LocalPlayer():SetFogParams( fog ); LocalPlayer():SetFogParamsSkybox( fog ); end hook.Add( "RenderScene", "SetupFog", SetupFog ); [/lua] [img_thumb]http://cdbarrett.com/dump/screenshots/garrysmod/gm_flatgrass0018.jpg[/img_thumb] [img_thumb]http://cdbarrett.com/dump/screenshots/garrysmod/gm_construct0020.jpg[/img_thumb] [img_thumb]http://cdbarrett.com/dump/screenshots/garrysmod/gm_construct0019.jpg[/img_thumb] [b]New functions:[/b] [list] [*]Player:GetFogParams() [*]Player:SetFogParams( table ) [*]Player:GetFogParamsSkybox() [*]Player:SetFogParamsSkybox( table ) [/list] [b]Download:[/b] [url=http://www.facepunch.com/showpost.php?p=11917511&postcount=1]First post[/url]
Why when I use a rendertarget does it have a tendency to flash?
[QUOTE=Lutin;14746801]Why when I use a rendertarget does it have a tendency to flash?[/QUOTE] Nope, if you're drawing it on top of something, ensure there isn't any Z fighting going on.
Well how else would I render it? And I tried to get rid of the Z-fighting a while back, but I can't seem to do it. And it seems like it's updating too fast for my refresh rate or something
Just increase the distance between what you're drawing, close proximity is what causes z-fighting. Even just adding a unit vector to the distance will solve this. Can you show your code?
Yeah sure. I can nearly guarantee I'm doing something wrong. [url]http://lutin.pastebin.com/d794281dc[/url]
Move CreateRenderTargetTexture out of RenderScene, you only need to call it once at the top of the file. I suggest you use CreateMaterial to create the material, don't use the debugwhite material, it's VertexLitGeneric, which will cause flickering if you try to use it in screenspace. I have some example math for calculating a mirrored view for a portal. [url]http://www.facepunch.com/showpost.php?p=12005812&postcount=73[/url]
Yeah I tried messing around with that some but I'm sorta rusty on vector math so I sort of gave up and tried just random things.
Huh, why am I unable to use self from RenderScene?
Because it's a hook.
Is there any way to access it or other local variables?
Sorry, you need to Log In to post a reply to this thread.