• UE4 Development v2
    820 replies, posted
How could I go about switching my master material to a UV grid that represents the base texture's resolution. Say it's a 4k texture, the UV grid will be tiled according to that, and if I downres the textures from 4k to 2k, the UV grid applied on top also scales in relation to it. I've gotten it to a stage where the overlaid UV grid applies to everything, however I can't get it to adjust in realtime at the minute, I have to recompile the shader to get results and that's too long for what I'm doing since there's over 800 instances that need recompiling each time, I need quick adjustments to lookdev quickly. This is what I'm currently doing: [IMG]http://i.imgur.com/qgNTWeR.png[/IMG] This seems dumb so I could use a bit of help.
[QUOTE=Shirky;52402840]Couldnt you technically just make a box/sphere around the light that is invisible, but still casts shadows?[/QUOTE] What I want is reduce the amount of light in the scene. The game is a light and shadow game, where every light affecting gameplay must be dynamic, and I want to have a bunch of light in the scene. So, if I can use a shader to simulate light, it'll save a lot of calculations.
Was working on a marketplace asset last night and got sidetracked, ended up kind of recreating The Witness-esque stuff [t]http://i.imgur.com/x1n5qjR.jpg[/t] [t]http://i.imgur.com/n21tQXH.jpg[/t] [t]http://i.imgur.com/BVA3lJy.jpg[/t]
The one thing about that scene that irks me is that it lacks depth, which is really noticeable with the grass and the rocks. Are you using any sort of AO, because that might help a bit. Also, created another cool little decal atlas thing. [vid]https://my.mixtape.moe/frdnft.mp4[/vid]
I'm a noob, can you explain to me what you're doing and a brief how to? I've never used decals before. Also has anyone done any AR stuff in UE4? Is it even possible?
[QUOTE=Wickerman123;52410899]I'm a noob, can you explain to me what you're doing and a brief how to? I've never used decals before. Also has anyone done any AR stuff in UE4? Is it even possible?[/QUOTE] Something that UE4 lacks is the ability to use decal atlas maps, so you need a new texture for every new decal that you want (unless you use mesh decals). All Ive done is taken an atlas map consisting of numbers and letters, and allowed the material that the decal uses to scan across. It pretty much saves me from 36 textures for an alphabet and number set, and allows me to use a single texture. The other stuff Im showing off is dynamic roughness and wear, to give each decal a unique look for any situation. [t]http://i.imgur.com/6j4jBNz.jpg[/t]
[QUOTE=Wickerman123;52410899]I'm a noob, can you explain to me what you're doing and a brief how to? I've never used decals before. Also has anyone done any AR stuff in UE4? Is it even possible?[/QUOTE] I believe there's a google tango plugin for UE4, so I think some AR stuff is possible.
[QUOTE=Oicani Gonzales;52411007]you do that on a material level, right? you're just scrolling the uv?[/QUOTE] Yeah its done in a material, and controlled with a blueprint.
[QUOTE=Shirky;52411159]Yeah its done in a material, and controlled with a blueprint.[/QUOTE] Would you then be able to set it up where you could enter text into a text box and it would select your letters based on the coordinates of your uvs? So you don't have to scroll manually, but could just type it.
[QUOTE=CodeMaster;52411365]Would you then be able to set it up where you could enter text into a text box and it would select your letters based on the coordinates of your uvs? So you don't have to scroll manually, but could just type it.[/QUOTE] Well each decal is one letter, if the letters are in order its just some basic math to find the index of each letter in the atlas grid. Could be a neat blueprint tbh.
Can someone explain me why this doesn't work: Error: [url]https://i.imgur.com/WYUigRg.png[/url] [code] #pragma once #include "CoreMinimal.h" #include "GameFramework/HUD.h" #include "MyHUD.generated.h" USTRUCT() struct Message { FString message; float time; FColor color; Message() { time = 5.0f; color = FColor::White; } Message(FString iMessage, float iTime, FColor iColor) { message = iMessage; time = iTime; color = iColor; } }; /** * */ UCLASS() class GOLDENEGG_API AMyHUD : public AHUD { GENERATED_BODY() public: // The font used to render the text in the HUD UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUDFont) UFont* hudFont; // Add this function to be able to draw to the HUD! virtual void DrawHUD() override; TArray<Message> messages; void AddMessage(Message msg); }; [/code] If I move the struct after the class it works but then I can't use it anymore with AddMessage, it keeps saying: [url]https://i.imgur.com/YKSklOW.png[/url]
Looks like you're missing a GENERATED_BODY() within the struct
[QUOTE=BoowmanTech;52411854]Can someone explain me why this doesn't work: Error: [url]https://i.imgur.com/WYUigRg.png[/url] [code] #pragma once #include "CoreMinimal.h" #include "GameFramework/HUD.h" #include "MyHUD.generated.h" USTRUCT() struct Message { FString message; float time; FColor color; Message() { time = 5.0f; color = FColor::White; } Message(FString iMessage, float iTime, FColor iColor) { message = iMessage; time = iTime; color = iColor; } }; /** * */ UCLASS() class GOLDENEGG_API AMyHUD : public AHUD { GENERATED_BODY() public: // The font used to render the text in the HUD UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUDFont) UFont* hudFont; // Add this function to be able to draw to the HUD! virtual void DrawHUD() override; TArray<Message> messages; void AddMessage(Message msg); }; [/code] If I move the struct after the class it works but then I can't use it anymore with AddMessage, it keeps saying: [url]https://i.imgur.com/YKSklOW.png[/url][/QUOTE] A few things actually: - The error screenshot posted is not a compiler error, but an Intellisense one - No GENERATED_BODY for struct (already mentioned) - Structs generally are prefixed with an F (eg. FMyStruct). It's also best to avoid super generic names like "Message" just in case this conflicts with something. - AddMessage could pass by reference to avoid a copy - AddMessage could be UFUNCTION'd to expose it to BP. - Going against the Unreal coding style (inconsistent variable names, not using PascalCase) - "Declaration is incompatible with" would mean you are not including the header with your struct in it.
[QUOTE=FoohyAB;52412160]Looks like you're missing a GENERATED_BODY() within the struct[/QUOTE] Oh ok, I didn't know I needed that. [editline]29th June 2017[/editline] [QUOTE=SteveUK;52413500]A few things actually: - The error screenshot posted is not a compiler error, but an Intellisense one - No GENERATED_BODY for struct (already mentioned) - Structs generally are prefixed with an F (eg. FMyStruct). It's also best to avoid super generic names like "Message" just in case this conflicts with something. - AddMessage could pass by reference to avoid a copy - AddMessage could be UFUNCTION'd to expose it to BP. - Going against the Unreal coding style (inconsistent variable names, not using PascalCase) - "Declaration is incompatible with" would mean you are not including the header with your struct in it.[/QUOTE] - I tried to compile it in the editor but still didn't worked. - I didn't know I needed that but I know now. - Good to know. - I am sort of new to C++ and pointer and references kinda slip away. - I will have a look at Unreal's coding style - I do have the header included in the cpp file. I am following a tutorial (pdfs) and he is using 4.5 so there are things that I have to do differently.
A gift sent from heaven: (Blueprint Assist Plugin) [url]https://forums.unrealengine.com/showthread.php?147673-Blueprint-Assist-Plugin[/url] [media]http://youtu.be/IIJRHLEwdUY[/media]
Made some more cool things today I guess. Now I can change the paint on my walls on the fly. [t]https://i.imgur.com/OoL8nsfr.jpg[/t] [vid]https://my.mixtape.moe/immqhs.mp4[/vid] and I also made a blueprint for wires that uses a spline component so I can make some cool cables and such. [t]http://i.imgur.com/tTCe8Tx.png[/t]
Welcome to the poor mans Metro [vid]https://my.mixtape.moe/unlopl.mp4[/vid] Did some blueprint work today.
I am pretty sure my material broke the editor's grid. [vid]https://s1.webmshare.com/zNn83.webm[/vid] I think I'll keep it.
Hey everyone, I just put up my game on Kickstarter, and I'm looking for shares or retweets wherever I can get them. If you're feeling generous and wanna help signal boost my project, I'll love you forever! [media]https://twitter.com/hippowombat/status/881326741599297536[/media] Cheers!
Loading Tweet... [URL]https://twitter.com/ollymoss/status/881332128570421248[/URL] Uhh, I don't think you can get a better endorsement than that.
So I've been working in Unity C# daily for about three years, but now my find myself having to learn Unreal for a class I'm taking in the Fall. I decided to take some time to start getting a handle on things now though. I took a short C++ class using SDL last spring, so I'm not a complete foreigner, but Unreal is still an intimidating engine at first glance. [url]https://docs.unrealengine.com/latest/INT/GettingStarted/FromUnity/[/url] This page, and the included examples and the included editor tutorials are my current go-to sources, but the transition is still rough. Any tips, tricks, or suggestions for a Unity developer trying to learn Unreal?
[QUOTE=TheGoodDoctorF;52425243]So I've been working in Unity C# daily for about three years, but now my find myself having to learn Unreal for a class I'm taking in the Fall. I decided to take some time to start getting a handle on things now though. I took a short C++ class using SDL last spring, so I'm not a complete foreigner, but Unreal is still an intimidating engine at first glance. [url]https://docs.unrealengine.com/latest/INT/GettingStarted/FromUnity/[/url] This page, and the included examples and the included editor tutorials are my current go-to sources, but the transition is still rough. Any tips, tricks, or suggestions for a Unity developer trying to learn Unreal?[/QUOTE] It's not as intimidating as you think. Unreal has a reflection system, that's what the UCLASS, UPROPERTY and UFUNCTION macros are for, the preprocessor uses it to generate code to make reflection work, blueprints use that reflection data to work. Adding a UPROPERTY on anything that's a UObject will stop it from being garbage collected until it's no longer referenced. Use NewObject to create UObjects. Use Cast to cast any UObject. Think of blueprints as prefabs that can be used to run code on construction or tick. Attach components to actors. ActorComponent is a component with no transform. SceneComponent has a transform. PrimitiveComponent has a transform and can render geometry and be used as collision.
I saw that when you open a blueprint you can "Add New C++ or Blueprint" component, is that the equivalent of "Add Component" in Unity? I know you can create a C++ class deriving from Actor which can't be attached as a component because it is an object, am I correct? So the only way to attach new C++ classes to an object is by doing "Add New C++ .." in the blueprint?
If your class inherits from a component class like ActorComponent or SceneComponent, you can add it to an object as you would a static mesh or other built in component by using "Add Component" in Blueprint or "CreateDefaultSubobject" in c++.
[QUOTE=BoowmanTech;52427043]I saw that when you open a blueprint you can "Add New C++ or Blueprint" component, is that the equivalent of "Add Component" in Unity? I know you can create a C++ class deriving from Actor which can't be attached as a component because it is an object, am I correct? So the only way to attach new C++ classes to an object is by doing "Add New C++ .." in the blueprint?[/QUOTE] You can also use the FObjectInitializer in the constructor of an object to add default components with its CreateDefaultSubobject method.
[thumb]https://i.imgur.com/diqKFODg.png[/thumb] Re-purposing a open source ue4 quest & dialogue editor to work with my dialogue system, thing is the author is russian and the code is full of broken english but hey! im getting there. Whats left is: Sort out a proper data flow for the dialogue Make the panels resize to fit all the text inside ( new lines get cut-off) Make it support my custom tags
[QUOTE=FalconKrunch;52431100]You can also use the FObjectInitializer in the constructor of an object to add default components with its CreateDefaultSubobject method.[/QUOTE] FObjectInitializer is going to be deprecated eventually, you can just use a default constructor and use member function CreateDefaultSubobject instead. See: [url]https://docs.unrealengine.com/latest/INT/Programming/Tutorials/Components/1/[/url]
2000:1 A Space Felony, a game I've been making with a friend from uni is gonna be in the Humble Originals on Friday! :D It's a murder mystery courtroom drama, where you use evidence photographed throughout the ship to determine what happened to the crew, and cross-examine your primary suspect, MAL, the ship's AI. [media]https://youtu.be/hhTo1_7NAoM[/media] [url]https://nationalinsecurities.itch.io/2000to1-a-space-felony[/url] Feels good to have a first published game, here's hoping I'll be able to shift from working full-time with these projects alongside to full time on these projects! :v:
ITS OUT! :D [url]https://www.humblebundle.com/monthly[/url]
[URL="https://jameskelly3dartist.wixsite.com/portfolio/honours-project"]Uploaded my final year project[/URL] - feel free to try it out if you have access to a Vive.
Sorry, you need to Log In to post a reply to this thread.