Add units to things

There’s something engine does a lot that’s been driving me crazy as a numbers-oriented programmer. Here’s a couple examples, but it’s all over.


Ok great, I can make the camera lag. 10 somethings over something. What is that? Degrees? Pixels? UU? Per what? Second? Millisecond? Frame? Tick? You engine devs and vets know what it is, but no one else does. We have to guess.


The materials nodes are particularly bad. I don’t think I saw a unit on anything. So what’s time? A float? a uint32? What is the equivalent function in UE4 if we want to get the exact same value and inject it as a material param? No idea.

I could find a lot more examples. Add units to things, please.

1 Like

Material is like shader blueprint, it generate HLSL code for GPU, Time is not function but parameter send to GPU, which is just increasing number and let you change things over time, which usally you just scale so it does not matter what is it. As it is shader, its a float, because GPU practicly works only on floats

I just did some search and there 2 time parameters being send to GPU

https://github.com/EpicGames/UnrealEngine/blob/9dad25829a2c2d9a44fb11fab9ce5511323e7788/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp#L488

RealTime and GameTime and my guess the Time is UWorld’s game time

[=;227554]
https://github.com/EpicGames/UnrealEngine/blob/9dad25829a2c2d9a44fb11fab9ce5511323e7788/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp#L488

RealTime and GameTime and my guess the Time is UWorld’s game time
[/]

Yes it is GameTime, I had to look into . If you plug the time node into a DebugScalarValues node you can see the current Time (measured in seconds). In the material graph it is using the time since UE4 was opened, in game it is time since game began.

Ah didn’t know about that one :slight_smile:

Thanks guys, good info. But I wasn’t asking a question, I was making a suggestion to the Epic guys so that you and I wouldn’t have to look into the source to find basic info like that. :slight_smile:

Hi Backov,

Thank you for your request. I have entered a request, UE-10878 to be considered by the development staff.