Jump to content

Ruud033

Former Developers
  • Posts

    1081
  • Joined

  • Last visited

Everything posted by Ruud033

  1. Nice! The moment you have set the LODdistancefactor of the landscape to 3 your decals dis appeared. Maybe it's got something to do with that! Honestly I don't think we need to place cells in the air because that would only mean we would cull out stuff above or below us.. since most of the to-be-culled-crap is horizontal anyway, why bother placing cells in the air?
  2. Ruud033

    Harvester Spawn

    Have to use "attach to event" Link the instigator and attachee to an object variable. Why don't you teleport the harvesters that spawn at 0,0,0 to an other place?
  3. Download my map and you're able to buy it
  4. You can also use the foliage for the trees (once again) and add the foliagecollisionvolume if you want to. Here's the stuff you need: https://www.dropbox.com/sh/j6t9bx7zdkdm ... NDx0a?dl=0 Just copy-paste the folder into your main folder. The new collision works fine in my opinion. Once I culled the stuff out, performance was great. Even some guys testing the stuff said performance was good, so.. At the moment, servers only need a mutator to run this script. Maybe we can get RypeL to integrate these files into RenX_Game someday, that'd be great. There are a few conditions on this new volume: 1. Foliage which supposed to have new collision actors MUST have an existing collision mesh already computed in the static mesh editor, else it will fail to apply 2. Everything inside the volume gets a new collision actor. if a foliage item is not completely in, it won't get collision. 3. Be careful with adding collision to tiberium. A quick workaround is to remove the collision on the tiberium mesh in the static mesh editor to not have it have collision inside the foliage volume 4. Servers MUST run the mutator (at the moment, maybe we can get this custom volume in the renx_game.u in the future) 5. Foliage culling (the instanced mesh) is still done via the foliage tool, along with it's grouping etc.. The invisible collision actor is completely separated from this foliage instance in terms of spawn rate Spawned collision actors will get culled out at a distance of 500 by default. This is more than enough because you only need the collision mesh up close, when you 'hit' something. It also accepts cull distance volumes if you want to bring it down even more.
  5. Awesome dude! Can't believe you got it to work so well! I imagined this process when you talked about it, never realised it would take so much time! Maybe you can get a better performance if you turn down the overall shadow quality? Since they're on the move I think it's questionable if you really want to have a high shadow quality. Especially for the trees in the middle .. I can only imagine that they're causing the performance hit and drag FPS to 33 overall. Maybe this is a good start to begin map optimisations? I'd like to see how you optimise your map.. making the map pretty is pretty much shown already (I think, prove me wrong). For ex; I don't think many people know that Mesa_II has 64 light bounces and therefore takes a shit while to render etc etc.. Making the stuff look pretty is something that also can be done of camera perhaps? Except for the helipad's I think
  6. True, but what I meant was that particles affect the rendering process even more with shadows.. might have used the wrong words there.
  7. If its not possible to build on 1 machine it is not possible to build with 2+ The only difference is the amount of time required to build. I build like this all the time as well. on topic : please disable shadow casting for any object where the shadow is never going to get noticed from! (background trees etc) or set the light map resolution really low if you really want to get a shadow! For things that you're able to see up close, you want to set the resolution either to 64(really detailed) or 32(acceptable) Note that there is a tree in the game (the one from the screenshot @ DaKuja) that has a light map resolution of 256(insane) by default! Set this to 64 maximum. Lights in tiberium fields, turn shadow casting off at them. They do not require a shadow and dynamic objects (vehicles, players) have to calculate the shadows - >performance hit. Also, be care full with using smoke / particles in general and shadow casting, the particles also interfere with the shadow, which again has to be calculated.. Bla bla bla Also, try using 64 bit, I always do it Good luck!
  8. Awesome! Keep up the good work! Be sure to put them in a seperate package for the mappers.
  9. Thanks for the feedback! I'll include a precomputedvisibility volume next build.. see if that affects performance. I think the airstrip and the amount of lights also affects performance yeah. I've got a few performance drops near the middle tib field myself, I think this is due to the many lights I use there. Im thinking of reducing the lights there and amp up the brightness of the remaining ones.. should give the same effect and less of a performance hit, also thinking of cutting off shadows in those lights.
  10. Download test version here http://doctorb0ng.com/renx/CNC-Crash_Site.zip
  11. Yeah I know, need to optimise terrain later on.. I've fixed the orca&titan in the next build. Good to hear that performance has increased! Skeleton cave will return.. with time Thanks for the feedback! Edit: new build up! Got the titan and orca fixed. Also added more background foliage. Keep track of that performance! Personally i've had a bit of a dip near the center due to the many lights I applied I think. I'll look into that.
  12. Awesome dude. Keep up the good work. I've released a new build. Added now.
  13. Uploading a new version right now! * scaled down the map by a factor of 0,7 (did i mention that before already?) * Fixed a lot of stuff * Removed a lot of stuff * Map still needs some touching * Removed "press E to blablabla" at the destroyed WF PT (waiting for the SDK patch to come out) * Added FoliageCollisionVolumes !! PLEASE TEST PERFORMANCE DUE TO THESE COLLISION VOLUMES !! * Added New foliage (still need to update this I know. * Added the TITAN vehicle released by Havoc89! * New custom PT Overall I'm really happy with the new scale, it really makes a difference in gameplay I think! Makes the map less of a drag
  14. Maybe, use the scripts in post #4 or 5, where ever I said I used these; viewtopic.php?f=136&t=75255&p=150515#p150515 Might be worth testing!
  15. Don't forget! Since the files you made are in RenX_Game, you adjust the RenX_Game.u file. Therefore the entire community needs to recompile stuff first before being able to use this (for ex; in a custom map) Unless we make a mutator out of this. Can the dev team push out this patch anytime soon? So people don't have to download an extra mutator etc..?
  16. You're the best, we love you man. Peace.
  17. After compiling and adding to the cooked PC folder AND adding the mutator to the startup from the server we still get the yellow ish errors as before. What could be going wrong here (have loaded the non-settimer version btw, for testing purposes) Edit: Nevermind, I GOT IT TO WORK!! I forgot to re-reference something, slap me please. It works perfectly once the mutator file is installed.. awesome! gonna test this out fo sure.
  18. So it becomes?? ?? I have constant critical errors rebuilding this. Could you give an example by copy-pasting the code and inserting that in ?
  19. Just tested the first run in singleplayer. The script does not seem to work when all is built in singleplayer. Maybe it's got something to do with singleplayer as the fellas with the mutators also had issues with the PostBeginPlay() function. They had no issues on MP so I'm gonna test this in MP first. I'll edit this post to share knowledge. (it does work in the SDK) In MP I was also able to drive trough the trees, this is what the server said during compiling: Im gonna try n fix that Edit: Fixed
  20. The two scripts I use: BlockingMesh.uc //============================================================================= // FoliageCollisionVolume: a vehicle collision solution // used to collide certain classes of actors // primary use is to provide collision for non-zero extent traces around static meshes // Created by Pinheiro, https://forums.epicgames.com/threads/913559-How-to-enable-collision-on-foliage //============================================================================= class BlockingMesh extends DynamicSMActor_Spawnable; defaultproperties { Begin Object Name=StaticMeshComponent0 HiddenGame = true //we don't wanna draw this, it's just used to test collision BlockRigidBody=true //DynamicSMActors have collision disabled by default CastShadow=false MaxDrawDistance = 500 bAllowCullDistanceVolume=true End object bCollideActors=true //same here bTickIsDisabled = true //greatly improves performance on the game thread } and FoliageCollisionVolume.uc /** Creates collision for foliage instances inside the volume */ class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } function PostBeginPlay() { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; super.PostBeginPlay(); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } }
  21. GOT IT TO WORK!! AWESOME! And the performance is magnificent! I've used method 1 This is what it looks like in the editor (yes that is foliage, i'm not cheating) Standing up close (within 1000 Unreal Units) I've set the MaxDrawDistance in the script via code. Standing a bit further away (more than 1000) 1000 Unreal Units was a value I just randomly picked, but seems to suit just fine. You only load a small amount of collision mesh near the foliage, this is awesome!!!
  22. Pessimists. @Hande, Maybe, lets put it to the test! I'd just like to try this out first before I get to the time consuming placing static mesh actors and rescaling the crap. I know that is A solution, however I do not want to give up just yet on this. If this turns out to work in the end, we'll have a new fast and easy way of having trees in the map. with collision. I would like RypeL to check the code and say if it's doable or not..
  23. Heya people, Im trying to add collision to foliage by spawning a DynamicSMActor_Spawnable actor which has collision on it. (with the proper dimensions etc.) The problem is that, right now in the code, it spawns ALL of the actors at once in the level once the game has started using "PostBeginPlay ()". This gives a lot of lag and performance issues. 1 way of fixing this is culling them out, I have not succeeded in this just yet, so that's why I made this post. I'm currently approaching the issue in 2 ways namely: 1. Spawning all actors at once and culling them out afterwards (working on this) 2. Spawning the actor once visible I have a question about method 2 and will go deeper into this. I have found a function that might do the job here: I do not really understand this function, when does it fire and what do I need to put in the brackets for it to fire when foliage is visible? For example: Should it be like PostRenderFor (InstancedFoliageActor) and not more? I don't know how to fill this in. The part where this should be inserted is inside a volume. The volume spawns a "BlockingMesh" which is an extent. First of, here's the BlockingMesh code: class BlockingMesh extends DynamicSMActor_Spawnable; defaultproperties { Begin Object Name=StaticMeshComponent0 HiddenGame = true //we don't wanna draw this, it's just used to test collision BlockRigidBody=true //DynamicSMActors have collision disabled by default End object bCollideActors=true //same here bTickIsDisabled = true //greatly improves performance on the game thread } This is interesting but, I want to control the spawning rate of these blocking meshes so I have to be in the volume code, here's the volume code: /** Creates collision for foliage instances inside the volume */ class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } function PostBeginPlay() { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; super.PostBeginPlay(); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } } As you can see, I use the PostBeginPlay() function here, which means all of the foliage get's the DynamicSMActor_Spawnable right at the beginning of the level attached to it. What if, I can transform this spawn rate to something more performance friendly like, say: spawn when the foliage is visible (not culled) I intend to use the PostRenderFor function, so I think the code will look like this: /** Creates collision for foliage instances inside the volume */ class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } function PostRenderFor (InstancedFoliageActor) { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; super.PostRenderFor (InstancedFoliageActor); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } } Please give me some feedback on this. I don't know much about code and triggers.. I can see the logic in this and can do a process analysis but I'm not a coder. I took my knowledge and logic from http://wiki.beyondunreal.com/UE3:Actor_events_%28UDK%29 I think the idea is pretty much explained. I'd like to see your input. Edit: I was thinking like, what if I register the touch volume event and THEN spawn the collision for the piece of forest? I'd also have to remove the collision again when it untouches (for performance sake) /** Creates collision for foliage instances inside the volume */ class FoliageCollisionVolume extends Volume placeable; static final function vector MatrixGetScale(Matrix TM) { local Vector s; s.x = sqrt(TM.XPlane.X**2 + TM.XPlane.Y**2 + TM.XPlane.Z**2); s.y = sqrt(TM.YPlane.X**2 + TM.YPlane.Y**2 + TM.YPlane.Z**2); s.z = sqrt(TM.ZPlane.X**2 + TM.ZPlane.Y**2 + TM.ZPlane.Z**2); return s; } function Touch (Actor Rx_Actor) { local InstancedFoliageActor ac; local InstancedStaticMeshComponent comp; local vector loc, scale; local Rotator rot; local BlockingMesh CreatedBlockingMesh; local int i, j; super.Touch (Actor Rx_Actor); //look for the InstancedFoliageActor foreach AllActors(class'InstancedFoliageActor',ac) { //iterate through the various foliage components for(i=0; i { comp = ac.InstancedStaticMeshComponents[i]; if (comp.StaticMesh.BodySetup != none) { //iterate through the various meshes in this component, if it has a collision model for (j=0; j { //decompose the instance's transform matrix loc = MatrixGetOrigin(comp.PerInstanceSMData[j].Transform); if (ContainsPoint(loc)) //check if this instance is within the volume { rot = MatrixGetRotator(comp.PerInstanceSMData[j].Transform); scale = MatrixGetScale(comp.PerInstanceSMData[j].Transform); CreatedBlockingMesh = Spawn(class'BlockingMesh',ac,,loc,rot); CreatedBlockingMesh.StaticMeshComponent.SetStaticMesh(comp.StaticMesh); CreatedBlockingMesh.SetDrawScale3D(scale); } } } } } } Just how do I remove this afterwards? Would like to see your input on this.
  24. Got it to work, don't ask me how and/or why but it works now. Tried several combo's. I didn't manage to cull the spawned blockingmeshes though. I'll take a closer look at those and see if I can modify the script to get them culled anyway. I'd really like to see this working and I got a feeling somewhere that I'm on the right track. Gravity volumes as you also proposed are also possible of course, but I'm gonna investigate this first. Will share my knowledge when I got it to work. (or not)
×
×
  • Create New...