• Stargate Event Horizon
    210 replies, posted
So, I've started my project based around using Jinto's render clipping module to create a more true-to-the-show effect. I've got the clipping and touch hooks for when it is completely inside or completely removed working flawlessly! Problem: I am making the objects that make contact with the event horizon into the collisiongroup WORLD so they gain the ability to actually go through anything else (which is good in most cases). Thing is, if I applyed it to the stargate mod made by aVoN then an object could touch the EH then slip out of the gate boundaries. Any idea on how I could contain them? Is there any way to add a hook to an entity that isn't the one you are coding in? I am avoiding using any think hooks in the event horizon itself, but I may have to add one for this. I tried creating a dummy scripted entity that would take the exact position and model of the original and it would detect and prevent gatemodel collisions. Needless to say the model never took the exact positon of the original and it would flip out. Credits: The event horizon model is from the Stargate Addon, whenever I tried to make my own it would have the wrong dimensions. Jinto made the clipping module that makes this possible. What I have so far: [media]http://www.youtube.com/watch?v=aeNtRUhiy5Q[/media] Comments? Critique? Suggestions? Update 1: Alright, I've got it able to recalculate the clipping planes if it's position changes AND only for things it is touching, so no think event added! Yay! Problem that arose because of this is apparently it doesn't detect when it hits a static prop, the prop itself has to move. I might have to change the way the horizon handles hit detection. Can I completely override physics actions by adding a StartTouch hook instead of it just being a regular function? ______________________________________________________________________________________ ------------------------------------------------------------------------------------------------------------------------ UNFINISHED RELEASE: I give up, no one was really of any help and I don't play gmod very often anymore. Here's the SVN link: [url]http://wip-eventhorizon.googlecode.com/svn/trunk/[/url] I don't know about the username/password, probably anon or anonsvn... whatever google code uses as its default. Things you will need, Jinto's Render Library (yes there are working links in the thread): [url]http://www.facepunch.com/showthread.php?t=620137[/url] Things you might want, the guardian module for touch hook awesomeness (buggy, also there are working links in the thread): [url]http://www.facepunch.com/showthread.php?t=599022[/url] There are some config option at the top of the entity's init.lua file. Feel free to mess with them.. if you want to. The .bak and .txt files are there because I did make some crappy backups and I wrote down some idea tests... I don't really care if you all see them anyways. So yeah, modify it all you want, I don't care to further this project anymore. If you want to ever release it or use it in a video I'd appreciate some credit for it. It's only really useful for videos and pictures as it is now because if just deletes/kills entities.
oooh that looks nice :O now i dont know anything about Lua, but wouldnt it be possible to make a new collisiongroup somehow that ignores anything but the stargates?
[QUOTE=cebt;13214464]oooh that looks nice :O now i dont know anything about Lua, but wouldnt it be possible to make a new collisiongroup somehow that ignores anything but the stargates?[/QUOTE] If I could find where the collisiongroups are set then yeah, but I've got a sneaking suspicion they aren't editable... are they?
Nice, very nice. What do you do about physics and the clipping of it?
That looks pretty nice man good job
[QUOTE=Deco Da Man;13214585]Nice, very nice. What do you do about physics and the clipping of it?[/QUOTE] The clipping is set when the object first touches the horizon (well it never really touches but I have the SetTrigger(true) to catch it anyways.) That's why moving the horizon right now would look weird, it wouldn't update the clipping plane location, I'm working on getting this fixed now. When the entity touches the horizon it loses its gravity and it begins to get pulled toward the horizon. When the EndToch is triggered it checks which side the entity entered from and if it was still going the same direction when it stopped touching, if so it gets deleted (teleport added later) if it changed direction then just restore it's gravity and collision group. I want to add decremental gravity as well, it would calculate the distance of the center of the object and use that to determine how much attraction and counter-gravitational force to apply, the closer it got the less gravity would affect it and the easier it would slip into the horizon.
Yes, but Jinto's module only handles rendering, not physics. If I were to run into the invisible part of the prop, would I collide? If so, I suggest using AzuiSleet's Collision Guard module, and returning false if it is with the prop and the collision point is on the opposite side of the plane.
[QUOTE=Deco Da Man;13214970]Yes, but Jinto's module only handles rendering, not physics. If I were to run into the invisible part of the prop, would I collide? If so, I suggest using AzuiSleet's Collision Guard module, and returning false if it is with the prop and the collision point is on the opposite side of the plane.[/QUOTE] Ah, it's mentioned in the first post: I set the entity to collisiongroup world so it doesn't collide with anything. I am looking for newer and better ways to make this more realistic so I will totally look into that module! Thanks! :D EDIT: Hmm, so far no luck on finding that module.. ah, he was using a different account.
The thread is [url=http://forums.facepunchstudios.com/showthread.php?t=599022]here[/url], but the garrysmod.org download has gone. You can get it from [url=http://azuisleet.gayluadad.net/]here[/url], though. And sorry, the collision group to WORLD (why caps?) went totally through my head and out the other side, not quite with it at the moment.
Oh because I literally copy pasted it (sorry, wasn't shouting), the group is called: COLLISION_GROUP_WORLD Also, that module is another dll and I'd like to keep those down to a minimum, it will be a good alternative to have though, thanks!
I'm afraid that module is the only way you can control collision, unless ou do some neat work with PhysicsFromMesh.
[QUOTE=Deco Da Man;13215616]I'm afraid that module is the only way you can control collision, unless ou do some neat work with PhysicsFromMesh.[/QUOTE] Yeah, I might just make two versions, one using the best tools I have available with just using lua and another using the extra dll. I still don't even know if I'll ever get this into a "release worthy" state. EDIT: Funny thing, I can't even get that guardian file to run with gmod. It just crashes, even with the most minimal of scripts.
This... Is.... [b]AWESOME![/b] [sp]Bet you weren't expecting that![/sp]
Is this EH a modification of my current one or a completely new SENT, where you just added modelclipping and "move slowly in" effects? If it's the second, I would like to add these codes to my EH (but not for February since I'M currently busy with exams again)
i would like it too avon :D also, why wouldn't you be able to add it if he has just edited your gates? i dont understand lua, i'm sure there is good reason :D
I would be able too (cope file to the svn - done). But I like to add new code manually so I can see how it works, if it is compatible/well coded etc.
This would sure be a nice add to the current stargates :) By the way, what is that song playing in the background?
[QUOTE=aVoN;13219936]Is this EH a modification of my current one or a completely new SENT, where you just added modelclipping and "move slowly in" effects? If it's the second, I would like to add these codes to my EH (but not for February since I'M currently busy with exams again)[/QUOTE] Oh no, it's not integrated into your code. This a new SENT written completely from scratch, I even made my own material to make sure it looked different (It's a good one too, done in aftereffects without hitch in it's loop). The model is yours though, I should have mentioned that in the first post, I'll add it now. There are currently some problems with the way it works and you might not want to add it for those reasons: 1.) If there is a static object on the ground and the horizon comes down on it it won't be detected to hit at all! I don't know why yet. 2.) Once the entity hits the horizon it goes into the collision group world and can then escape the gate boundaries because it no longer collides with anything. 3.) It doesn't handle constrained props yet, so it would just take the whole mess apart! 4.) It doesn't work on players, but these could work like your normal ones do, the only possible problem would be if the player is in a vehicle, but I'm sure I could work up a conditional to catch that scenario, maybe draw a blue screen on the player? (since they are technically, "inside the gate") 5.) When I was trying it out in singleplayer I used a camera to see myself but the gate wouldn't clip me, any ideas why? Is the model a separate entity? If you'd like to see the code I can drop you a PM, I'd love some constructive criticism! [QUOTE=Ankpuss;13222297]This would sure be a nice add to the current stargates :) By the way, what is that song playing in the background?[/QUOTE] Oh the song is The End of the Beginning by God is an Astronaut.
are you by any chance trying to make the prop reaper through the other gate once it is completly through?
[QUOTE=Halo 228;13223960]are you by any chance trying to make the prop reaper through the other gate once it is completly through?[/QUOTE] Right now it is only the one working entity. I'll get to that once I've ironed out the problem of getting the collisions to work as they should and detecting constrained entities.
Here's what you see inside the gate, it's at 00:21. [media]http://www.youtube.com/watch?v=gqDS6eOG_hM&feature=PlayList&p=D867721D1EBEE6E2&index=0[/media] You can also see this in the episode 2000.
[QUOTE=DieHardDeus;13224457]Here's what you see inside the gate, it's at 00:21. [media]http://www.youtube.com/watch?v=gqDS6eOG_hM&feature=PlayList&p=D867721D1EBEE6E2&index=0[/media] You can also see this in the episode 2000.[/QUOTE] Haha yeah, I know what it looks like inside. But that would be quite a costly animation to have in .vtf, plus it would look terrible streched to fit the screen and if it was screen size it would be even larger a file!
[QUOTE=ZeikJT;13224482]Haha yeah, I know what it looks like inside. But that would be quite a costly animation to have in .vtf, plus it would look terrible streched to fit the screen and if it was screen size it would be even larger a file![/QUOTE] Or just make some blue spritey things and have them floating around.
[QUOTE=DieHardDeus;13224930]Or just make some blue spritey things and have them floating around.[/QUOTE] I was thinking about repositioning the player camera to right outside the gate, so they see whatever is going in until it is done. How does that sound?
It'd be pretty nice if the camera changed to third-person (zooming out from first-person) as you approach the horizon, and then zoom back in when you walk through; it'd give you the feeling that you actually walked through yourself.
You can see in that video that the bubbly horizon effect warps when people enter. This would be a very neat effect to have, and I believe it can be done using stencils, blur textures and morph textures. The latter two can be found [url=http://code.garrysmod.com/?into=garrysmod/lua/postprocess]here[/url].
[QUOTE=Deco Da Man;13232942]You can see in that video that the bubbly horizon effect warps when people enter. This would be a very neat effect to have, and I believe it can be done using stencils, blur textures and morph textures. The latter two can be found [url=http://code.garrysmod.com/?into=garrysmod/lua/postprocess]here[/url].[/QUOTE] As cool as it might look, it would be much more informative to know how much longer it will take before the rest is in the gate and you get transported. I mean, can you imagine being stuck looking at that wormhole effect for minutes because some jerk decided to freeze one of your props halfway in with you attached? There are so many things that have to be ironed out before the asthetics can be considered.
That should be easily done by finding the furthest point of bounding box.
[QUOTE=Deco Da Man;13233034]That should be easily done by finding the furthest point of bounding box.[/QUOTE] Yeah, I know how to find the furthest point, but what happens to whatever is "inside" if a constrained prop is frozen halfway through? Such as a vehicle with a player in it. Must they sit there, not knowing what is going on outside? I guess it would be just as realistic, we can't really have relativity in gmod. I'll defenitely consider it, but keep in mind, this is still very experimental... Very.
I see your problem... According to the show, whatever is dematerialised within the event horizon does not physically move. (Although, this may not be true, as Lieutenant Ford's hand was sticking out of the horizon in 38 Minutes, one of the first episodes of StarGate Atlantis, yet it wasn't affected by lack of blood. And if things aren't physically active while dematerialised, do people actually see their journey through the StarGate?) Maybe, let's say, if their shoot position is within the horizon, it counts as if they are entirely materialised. If it is out, they can get out of the vehicle. You'll probably have problems with them getting out on the wrong side of the vehicle, but those problems should be easily fixed with a few hacky fixes. Also, with contraptions, it should be easy to not teleport the contraption until all props have been fully materialised.
Sorry, you need to Log In to post a reply to this thread.