Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: UT3 UP help thread (4 solved, 1 to go)


Unreal Old Friend

Status: Offline
Posts: 54
Date:
UT3 UP help thread (4 solved, 1 to go)
Permalink  
 


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 [0]
InVal: 256.000000, OutVal: 0.000000 for x,y,z.  (This makes the flare invisible at less than 256 unreal units away.)

Point [1] 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 [2] 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.000000
Maximum: -4.000000

In 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



-- Edited by Winter Dragon on Monday 17th of September 2012 12:35:45 PM

__________________


Connoisseur of Bourbon!

Status: Offline
Posts: 2912
Date:
RE: ut3 terrain lighting 'bug'?
Permalink  
 


Remember with terrain the higher the light map resolution the better the lighting! (compared to lower is better for BSP)
Although that does look rather interesting. What happens if you move the light. Does the square still appear?

__________________

I like playing with stuff!



Unreal Old Friend

Status: Offline
Posts: 54
Date:
Permalink  
 

I gave it a lightmap of 64 on the terrain but it's exactly the same as using 2 in the above screenshot. Moving the light, deleting the light and making a new one still causes the artifact. I also deleted all the terrain layers, I had 4 including a foliage and deco, but that's made no difference either.

__________________


...

Status: Offline
Posts: 4235
Date:
Permalink  
 

Odd... look like your asian mesh is casting shadows but the shadows on the terrain is to suqarish ? Did you activate dynamic light on the terrain (whic isn't a good idea anyway but just to know) ?

__________________

Stevie's corner
A blog dedicated to UE4, UDK, UT99 / 2004 / III / 4.



Unreal Old Friend

Status: Offline
Posts: 54
Date:
ut3 terrain lighting 'bug'? (solved)
Permalink  
 


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.



-- Edited by Winter Dragon on Wednesday 5th of September 2012 12:35:41 AM

__________________


...

Status: Offline
Posts: 4235
Date:
Permalink  
 

Good, it's solved :D

__________________

Stevie's corner
A blog dedicated to UE4, UDK, UT99 / 2004 / III / 4.



Connoisseur of Bourbon!

Status: Offline
Posts: 2912
Date:
Permalink  
 

stevelois wrote:

Good, it's solved :D


 +1!



__________________

I like playing with stuff!



Unreal Old Friend

Status: Offline
Posts: 54
Date:
Permalink  
 

Thanks again,

Oh and also I realized a full rebuild has to be done as well, or the black rectangle of death comes back!

__________________


Amateur UT mapper

Status: Offline
Posts: 736
Date:
Permalink  
 

Glad to see its sorted.

Was good to have a bit of brush up on this sort of thing, cheers.

__________________


...ǝp¡s ɹǝɥʇo ǝɥʇ uo

Status: Offline
Posts: 4290
Date:
Permalink  
 

Lord_PorkSword wrote:
stevelois wrote:

Good, it's solved :D


 +1!


 ....+1 more wink



__________________


AMD RYZEN 7 1800x@ 4.0ghz-MSI X370 PRO CARBON-MSI RTX2070SuperGamingX Trio-Corsair Vengeance DDR4 16GB-SAMSUNG 850Evo-LOGITECH G19-MSI DS300 & HX1200i-COOLERMASTER HAF Stacker915R/935/915F-Custom Loop



Unreal Old Friend

Status: Offline
Posts: 54
Date:
RE: UT3 UP help thread (1 solved, 2 unsolved)
Permalink  
 


I decided to turn this thread into the home for all problems related to my Unreal Project, I'll add more as they come up.

__________________


Connoisseur of Bourbon!

Status: Offline
Posts: 2912
Date:
UT3 UP help thread (1 solved, 4 unsolved)
Permalink  
 


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! :)



-- Edited by Lord_PorkSword on Tuesday 11th of September 2012 03:39:31 PM

__________________

I like playing with stuff!



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

Grass lighting is a big problem with UT3. Usually you should use the NonDirectional lighting mode to lit it uniformly but UT3 will still turn the faces dark, as if it were Phong.
However it did work fine for me when using a terrain foliage layer but grass static meshes will be half black.
Using the transmission slot can also improve the look, but the problem won't be solved completely.

Another way is to modify vertex normals in 3dsmax for a uniformly shading but I'm not sure if UT3 will accept those normals (UDK does).


__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Unreal Old Friend

Status: Offline
Posts: 54
Date:
Permalink  
 

Thanks mAlk, I'll delete the outdoor light and try a foliage layer again. Maybe I did something wrong, or didn't do something.

__________________


Unreal Old Friend

Status: Offline
Posts: 54
Date:
UT3 UP help thread (2 solved, 3 unsolved)
Permalink  
 


#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.



-- Edited by Winter Dragon on Wednesday 12th of September 2012 07:48:32 AM

__________________


Connoisseur of Bourbon!

Status: Offline
Posts: 2912
Date:
Permalink  
 

How did ya solve no.2 M8?

__________________

I like playing with stuff!



Unreal Old Friend

Status: Offline
Posts: 54
Date:
UT3 UP help thread (3 solved, 2 unsolved)
Permalink  
 


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.



-- Edited by Winter Dragon on Thursday 13th of September 2012 10:49:43 AM

__________________


Unreal Old Friend

Status: Offline
Posts: 54
Date:
RE: UT3 UP help thread (2 solved, 3 unsolved)
Permalink  
 


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.



__________________


calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

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:

terraingrassfoliaget4pg8.jpg



__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Unreal Old Friend

Status: Offline
Posts: 54
Date:
UT3 UP help thread (4 solved, 1 to go)
Permalink  
 


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.



-- Edited by Winter Dragon on Thursday 13th of September 2012 02:46:33 PM

__________________


calculating Pi by hand

Status: Offline
Posts: 768
Date:
RE: UT3 UP help thread (3 solved, 2 unsolved)
Permalink  
 


Good to hear you've solved it.
I was going to ask how UT3 lenflares work and suggest a material - distance (player to object) based solution.

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Unreal Old Friend

Status: Offline
Posts: 91
Date:
UT3 UP help thread (4 solved, 1 to go)
Permalink  
 


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:

  •  tick BUsedWithLensFlare
  • you can use the unreal lens flare editor

:)



-- Edited by TKBS on Friday 5th of March 2021 11:29:02 AM

__________________

UT3 Stuff:https://unrealbyfusilade.wordpress.com/pc-gaming/ut3/



Unreal Old Friend

Status: Offline
Posts: 54
Date:
Permalink  
 

For now I just copied the enforcer script and commented out all the dual equip stuff. There is something in there about "Akimbo mode" and looking at the animations the enforcer can shoot sideways, but I have never seen it do so in the time I've been playing.

__________________


Connoisseur of Bourbon!

Status: Offline
Posts: 2912
Date:
Permalink  
 

Sideways fire normally happens when you use the alt-fire mode. Maybe also when dual weilding enforcers...can't remember exactly but I've seen it quite a few times.

__________________

I like playing with stuff!



Unreal Old Friend

Status: Offline
Posts: 54
Date:
Permalink  
 

Ahh, I found the code for Akimbo. So the gun can turn sideways when you shoot a dead corpse, or if you kill someone less than 150 unreal units away. All I think I need to do now is make it so that holding down rmb turns akimbo on, and releasing it turns akimbo off. I have asked on the epic scripting forums if this is possible to do.

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard