May as well turn this into a thread with all of my troubles, as there will be many to come. The thread title lets people know if something they read last week has been solved this week, or if there are new issues. Help is welcome if you have the time or have done something similar to what I'm talking about, or have even some ideas on things I might try?
1.Strange lighting on terrain? (Solved)
Would anyone know what's causing this?I've played with settings for the terrain object and the light, but every time I rebuild lighting it puts a black rectangle there.
There was a Semi-Solid plane which I'd used for water in the basin which was casting a shadow. I have since replaced with a static mesh plane and it's fixed.
2. Give ammo to player via Kismet? (Solved)I want to have my own material on weapons and ammo pickups for this project, so what I've done is place a static mesh for the rocket launcher, overwrite the material then use 'destroy' and 'giveinventory' to disappear the mesh and give the weapon. But for ammo this method doesn't work, as ammo is not in the dropdown list of items you can award to the player. I'm wondering how else to do it.Finally got it, after much trial and error. I placed an ammo actor on top of the static mesh and set this to toggle invisible on level startup. Then a separate event "Touch Status" for the ammo actor, 'touched' is wired into a destroyed action object with both meshes (as variables) wired to the input node. I might be able to replace this method with a script later, but for now this does what I need.
3. Blending animations for custom weapon? (Semi stuck, but some ideas to try.)
I don't think anyone here knows or can help with this, but I'll mention it again anyway. I'm wondering how to make an altfire animation blend between three states. Ie. player turns hand and gun sideways, then fires a shot sideways, then the gun and hand turns back to normal. I've made the animations for these three movements, but have no idea how to 'drive' them in a script or animtree ... or even if an animtree should be used?4. Lens Flares? (Solved)I've added them to my level but don't know how to control the brightness and scale based on distance. I want them to get smaller and dimmer the closer you get, but the default setup seems to be the other way around (dimmer further away, bright up close). Could not find _any_ tutorials on how to edit properties or play with the curve editor, I've tried the trial and error approach but I have no idea what I'm doing.
In the LF editor under source element, near the bottom is a category called "DistMapScale". I changed the distribution to "DistributionVectorConstantCurve", and added a few points.
[DistMapScale]Point  InVal: 256.000000, OutVal: 0.000000 for x,y,z. (This makes the flare invisible at less than 256 unreal units away.)Point  InVal: 1000.000000, OutVal: 1.000000 for x,y,z. (Between 256 and 1000 units away, the flare grows from a scale of 0 to 1.)Point  InVal: 5000.0000000, OutVal: 0.000000 for x,y,z. (Between 1000 and 5000 units away, the flare shrinks from a scale of 1 to 0.)
"InVal" is the distance from your camera to the flare, while "OutVal" controls the scale. I did not touch Arrive or Leave fields, and it looks like Epic doesn't bother with those fields either.[Bounds]bUseFixRelativeBounds=true (ticked)[FixedRelativeBounds] Minimum: 4.000000Maximum: -4.000000In the tests I've done, smaller numbers seem to give more accurate occlusion, and prevent a flare from shining through say, a pillar, or the pole of a chainlink fence. Higher numbers have given me better results for outdoor areas like foliage, where a texture plane might be at such an angle the flare thinks it has to be hidden behind it but should be allowed through. I decided to duplicate my flare and have one for indoors (4,-4 bounds) and one for outdoors (16,-16) to get the best of both worlds.5. Grass lit at night time? (Solved)The grass material in the stock ut3 package "UN_Foliage" is emissive, so I copied the material setup to my own version to make it diffuse. This stops it being bright green outside with night lighting, but now the back faces of the grass are dark and looks terrible. A dynamic light fixes the problem, but I cannot tell it to light only the grass layer in the terrain object. If I try to use ambient lights, the whole scene becomes too bright.
I made a copy of the grass material, diffuse instead of emissive, masked and non-directional. In doing this I noticed another issue with thin strips of bright grass on the y axis, but turning on 'usedirectlightmaps' and doing a full rebuild made this issue disappear.
-- Edited by Winter Dragon on Thursday 13th of September 2012 02:33:12 PM
I like playing with stuff!
Stevie's cornerA blog dedicated to UE4, UDK, UT99 / 2004 / III / 4.All UT4 CTF custom maps. All UT4 remakes. UE4 links (guide, tut). UE4 resources, Software tools & resources.
Thankyou, it was a semi-solid brush inside the asian mesh forming a water plane that was causing the black rectangle. I'd almost forgotten about it!
ps. Oh and look, Hourences tutorials: Do not use BSP planes for water surfaces as those will cast a shadow nowadays.
Do not use BSP planes for water surfaces as those will cast a shadow nowadays.
stevelois wrote:Good, it's solved :D
Good, it's solved :D
Lord_PorkSword wrote:stevelois wrote:Good, it's solved :D +1!
AMD FX9590@5ghz-ASUS Crosshair V FormulaZ-2xMSI GTX780Lightning-KINGSTON HyperX 16GB-SAMSUNG 850Evo-LOGITECH G19-CORSAIR VengeanceM65 & HX1200i-COOLERMASTER HAF Stacker915R/935/915F-Custom Loop
Nichts wäret ewiglich, nur die Natur bleibt bestehen.
Regarding no.2!A possible 'cheat' way is to just regive the player the same weapon of the ammo type you want. Say you have a static mesh just to show the ammo. Then use a kismet trigger to run a 'Give Inventory' event to give the player the weapon which I think will just give them extra ammo as they already have the weapon. You also might need to set "bClearExisting" in the 'Give Inventory' to completly regive the weapon plus ammo.Haven't tried this so I don't know if it'll work for sure though. The other way is you'd need to write a mutator for the ammo type and get the editor to call that mutator. [looking at Google searches], see Engine/SeqAct_GiveInventory.uc as a starting place for the code.Regarding no.3. I'd think that you'd have to use the weapons Animtree for this. Maybe some kind of node blend that calls the animations in order. Unfortunately my Animtree knowledge is very, very basic so I don't know myself for sure, to help you out. Maybe start with the base human animtree and find any sequence that links multiple animations and see how Epic have set this up in their Animtree.(if they even do this??)
EDIT: Thinking about it you may even need to make them 3 seperate animations into 1 long animation that the animtree calls when alt-fire is used.Good luck M8! :)
#2 solved. I did something different to what you said Lord but- without reading your idea I probably wouldn't have thought of it. So thankyou.#3 will read a tutorial on animtrees either this week or next.The grass, I almost have what I want now but there are annoying streaks of bright grass running along the y axis of the terrain. Like this:
That's the best I've been able to get it so far, I'll try the vertex idea next.
First post has green text under each solved problem explaining what I did, but I snuck it in earlier when you weren't here,
I placed an ammo actor on top of the static mesh and set this to toggle invisible on level startup. Then a separate event "Touch Status" for the ammo actor, 'touched' is wired into a destroyed action object with both meshes (as variables) wired to the input node. I might be able to replace this method with a script later, but for now this does what I need.
Stops the item respawning too.
Can you post a larger screenshot? What I can see on the pic is streaks on the terrain texture - and these are caused by the foliage layer?Which kind of light setup do you use?This is what a very simple setup (directional light, sky light, static lighting) looks like for me:
Apologies about the small screenshot but you've helped me track down the culprit. "UseDirectLightMap" was unticked on my directional, I'd been performing dynamic tests and forgot to turn this back on. Solved!
Edit: And, today I solved the lens flares! :D I will post a write-up at the top either tonight or tomorrow.
I _hope_ the way I have shared isn't bad, all I can say is it worked for me. This is the material for my flare, really simple. Not even sure if it's done the right way lol.
Blending animations for custom weapon.* could you use a random fire method?;- i.e.-- sometimes it plays one animation, sometimes it could play another. - Alternatively; you could look at the rocket launcher code and have 3 animations [like the grenades, ]-^^ i know that is not exactly what you want, but it is a way of coding 3 different animations in to one weapon; and maybe it will help some ideas to start flowing.- it is a tough one without trying to code it/ seeing the codes current state.- As for your lensflare.- Connecting the "White Output node" from your LensFlare Texture will remove the blurry outer edges.- you do not need lensflare intensity where you have it- but i do not know where you are using your texture so maybe this is what you want.- I would think about using lensflare occlusion instead of Intensity
Remember these 2 things:
you can use the unreal lens flare editor
UT3 Old, New & Phys X Server: Check your Browser :)
Unreal Info, Content & projects:http://unrealbyfusilade.wordpress.com/