Lately, I was doing the HeightField Painter Tutorial and there are so many quirks to it, that I wanted to report the tutorial and propose proper fixes
1. Project Setup:
The tutorial never directs the user to work within the Content Examples project. Thus if you start from scratch, you are going to miss the “M_Crosshair” material that it uses. The tutorial should either point the user to a usable texture (for example "TargetIcon from Engine Content/Editor Materials) and show material setup or mandatorily direct the use to work from withing a ContentExamples project
2. Required Asset Creation & Setup
The tutorial goes on in creating a content browser asset for the RenderTargetnamed “RT_Height_Filed_Painter” Unfortunately this is never ever used in the tutorial because the later created blueprint dynamically creates a RenderTarget within its construction script. Also, when copying the expression graph for “MAT_HeighfieldPainter”, the user is never directed about which Texture he should supply to the TextureParameter2D. One can use any texture as it is overwritten in BP but as it is empty after copy/paste, there should be some clarification. On another note, I always thought that the naming convention for materials is “M_” at Epic. If so, why are there “MAT_” prefixes used in this tutorial! Quite inconsistent.
3. Blueprint Setup
3.1 Components Setup
StaticMesh “SM_Plane1000_512” is only again avaible from within the Content Examples. So either tell the user to work from within a Content Examples project or create a note that a tesselated plane is needed. From a clean project, one could use “PlanarReflectionPlane” from Engine Content as it is tesselated.
3.2 Trace from Camera Function Setup
For me, the ApplyPoint Damage from within the function got called but the Event in the EventGraph did not. This is also overly complicated and should be replaced with a custom event with the HitLocation as a vector parameter. This works at least and gets called for me.
3.3 Event Graph Setup
The conversion into Texture Space never works for me. At the end, I understand the vector gets divived but because of the nature of the conversion, values are always in between “-0.5 to 0.5”. I guess because the component/actor pivot is centered. Thus, after dividing by 1000 (or whatever number one needs), you will have to add 0.5 to match the texture with the hit position.
On another note, when pasting the Execution Graph, the user has to replace “StaticMeshComponent” as the tutorial started by adding a StaticMesh component and never went on to give it a proper name. Thus, giving a proper name would get rid of this little inconsistency, I guess.