Download

Doubt with spotlight and blueprint creation

Hey guys.

I just recently started learning unreal engine 4.

The first guide i covered was intro to ue4, the second guide was introduction to blueprints.

While watching the blueprint guy, i followed what the guy was doing in the video in my own editor, and could successfully create a blueprint.

But now when i’m trying to do the same thing again, ie creating a blueprint that has a spotlight, there is an “X” mark on the light in the viewport part of the blueprint window.

Also, when i am selecting the components like triggerbox and spotlight, and when i right click on the event graph, i get no option to create events for them, even though i literallly did that 2 days ago.

So what’s going on?

https://i.sli.mg/4ngkCC.png

This is because you likely have four or more shadowed stationary lights overlapping. Even if it doesn’t look that way, the attenuation radii of the spotlights may still be slightly overlapping. Keep in mind that if you have a stationary directional light that uses shadows it will also count toward that 3 shadowed stationary light limit. So if you have a single directional light, you can have up to 2 stationary spotlights, if you have two directionals, you’ll only have 1 stationary spotlights left to allocate.There’s ways to work around:

Use static and mobility lighting instead:

Static lights are far more performance efficient than both stationary and mobility lights, but they have their drawbacks as well. Being that they render once when you build lighting through lightmass, and will remain unchanged unless they are changed by you in the editor. They also cannot be changed whatsoever during gameplay. And the other major drawback of static lights is that they only affect static objects that can bake lightmaps. So they won’t light moving things like characters and dynamic objects. While mobility lights don’t have that problem, they are extremely performance hungry, so use them as sparingly as possible. Ideally you’d be using all three types in different circumstances and in combination with each other.

Spread Them Out and Clamp Them:

You can either spread them out so they have no overlapping areas, or you can still have them close together but just as long as the areas they light aren’t overlapping.

Only Enable Shadows on Lights That Will have the greatest impact:

You can still have as many stationary lights as you’d like. As long as there isn’t four shadowing sources. You can have 10, 20, or even 100 stationary lights overlapping as long as they have their shadowing disabled and everything will be fine.

Hope this helps.

I had not placed even a single light into the level, forget about overlapping them.

I was directly creating a blueprint as shown in the above image.

However, when i was replicating the actions from the blueprint intro videos in my editor, i had no such problem.

I could successfully create blueprints, and i had added 7-8 of them, none of them overlapping.(Here i have not placed even 1)

Also, when i select a component from the components panel and right click on the event graph, the “Create Event” stuff doesn’t appear.

Someone asked me about the objects in world outliner, so i posted the following reply to him(copypasted here):-

First step, opening third person example map:-

https://i.sli.mg/q7KT7V.png

Second step, creating a blueprint class under basic asset, then selecting “Actor”:-

https://i.sli.mg/gy4kjG.png

Third step, dragging a lamp prop to the blueprint components, then dragging it onto DefaultSceneRoot to make it root:-

https://i.sli.mg/NsIagx.png

Fourth step, adding a spotlight into the components:-

https://i.sli.mg/gFvrZr.png

Fifth step, hit a wall because X on spotlight:-

https://i.sli.mg/vaH92T.png

Sixth step, checking the world outliner for other lights.There are three light related stuff ie LightMassImportanceVolume, LightSource and SkyLight:-

https://i.sli.mg/JnUFsG.png

So what am i doing wrong??

I didn’t even try to create nodes since i want to solve this problem first, then move on to the next one.

I quickly set up an identical blueprint to see what the issue is. You’re having these issues because you are trying to assign the light through a child actor component. Don’t do that with lights. I’m not sure what video you are referencing specifically but that individual was either incorrect, it was misinterpreted, or he/she was using an older version of the engine which that could be done but the use of it in that manner has since been deprecated.

You should just be using a simple Spot Light Component, and not trying to route it through a child actor reference. I’ve added screenshots to help illustrate my point.

EDIT: Don’t drag the spotlight from the viewport, use the green “Add Component” tab that’s located right above the component tree in your blueprint.

Hope this helps you.

3 years later your answer helped me. Thx :slight_smile: