NeoFur : user maintenance thread

Hello everybody !

The NeoFur plugin is out of official maintenance since the 4.15 version of the engine.
Since the owner of the plugin are missing, you can’t buy it anymore but before to be taken by aliens, they release the source code to all licencies.

**The source code of NeoFur is not free and we can’t give it to anyone.
We can only share the modification we make in the source between person who already owns the sources…

This thread is for maintenance only. If you want to discuss the plugin or the situation, please, use the original thread :**
https://forums.unrealengine.com/comm…aces-and-more/

#freeNeoFur :slight_smile:
https://forums.unrealengine.com/core/image/gif;base64

That’s how people who bought it before Neoglyphic cease to exist were able to compile it for the 4.16 version of UE without any problem (some warnings tho…)
But it doesn’t compile anymore for the 4.17

I’m every thing but a coder but the error triggered by the compiler are so precise that I manage to find answer to the problems that occures.
I am now able to compile and run NeoFur for UE4.17 !

Here’s the final result of my empiric researches :

[SPOILER]

NeofurEditor.Build.cs :


public NeoFurEditor(ReadOnlyTargetRules Target) : base(Target) // 4.17 - Make the rule readOnly

Neofur.Build.cs :


public NeoFur(ReadOnlyTargetRules Target) : base(Target) // 4.17 - Make the rule readOnly

Many variables in a struct must be set to be accessible from BP…
NeoFurComponentSceneProxy.h :


USTRUCT(BlueprintType) // 4.17 - Make the STRUCT usable by BP

With these 3 changes only, the plugin compile with no error (but has 4 warnings I didn’t address yet…)

Now, we must deal with the shader files…
in the NeoFur/Shader folder, there’s 2 usf files.

In the NeoFurComputeShader.usf file, you must change this line :


#include "Common.ush"  // 4.17 - usf to ush

You have to copy the **NeoFurVertexFactory.usf **file and change its extension to .ush
In the newly created **NeoFurVertexFactory.ush **file, modify this line :


#include "LocalVertexFactory.ush"  // 4.17 - usf to ush

While the first load of the engine with NeoFur, it will check if the 2 shaders files are copied in the Engine file system.
We need to change the NeoFurShaderInstallCheck.cpp file :


FString ShaderDir = FPlatformProcess::ShaderDir();
ShaderDir = ShaderDir + "/Private/";  // 4.17 - while the check of the shader file, look in Engine/Shader/Private
FString OldShaderContents;

...

NeoFurCheckSpecificShader("NeoFurComputeShader.usf", NeoFurComputeShader_StaticBuffer);
NeoFurCheckSpecificShader("NeoFurVertexFactory.ush", NeoFurVertexFactory_StaticBuffer); // 4.17 - Copy the ush file instead of the usf one.

Now, the 2 shaders files are copied in the Private folder of the Engine/Shaders directory.

We must use these two file in there nex respective location. To do that, we have to change the implementation of the shaders :
in NeoFurVertexFactory.cpp , We have this line to modify :


IMPLEMENT_VERTEX_FACTORY_TYPE(
            FNeoFurVertexFactory, "/Engine/Private/NeoFurVertexFactory.ush",  // 4.17 - set an absolute path to the shaders files
            NeoFurRunShaderCheck_HijackBoolParameter(true), // Ugly hack alert
            false,true,false,false);

(don’t put Engine/Shaders/Private here… I don’t know why but this is the right path.)

And now, in the NeoFurComputeShader.cpp :


const TCHAR* FNeoFurComputeShaderCS::GetSourceFilename()
        {
            NeoFurRunShaderCheck();
            return TEXT("/Engine/Private/NeoFurComputeShader.usf");  // 4.17 - set an absolute path to the shaders files
        }

There’s a little problem left in the NeoFur_compression BP and the way to correct this is to change the definition of the* float ActiveShellCountScale* in the NeoFurComponent.h file as this (Thunderstruck) :


UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "NeoFur") //  4.17 - Correct the NeoFur_compression BP problem  
    float ActiveShellCountScale;

[/SPOILER]
Compile and serve fresh :slight_smile:
While the first successful launch of the 4.17 editor, it has been stuck at 45%…
Just delete the Engine->**DerivedDataCache **folder if you have the same problem.

Thanks to Nate and Thunderstruck for the shader files hacks ^^.

This is certainly very hacky and crappy but it works.
If you want to participate to the maintenance of NeoFur for the future release of UE 4 or can make better modification on the source for the 4.17 version of the engine, please, do it ! I didn’t understand the half of what I did here :slight_smile:

SPOILER ALERT !

Here’s the 4 warnings I didn’t address :
[SPOILER]


1>E:\Epic Games\UnrealProject\SauvageGit 4.17\Plugins\NeoFur\Source\NeoFur\Private\NeoFurAsset.cpp(328): warning C4996: 'FStaticLODModel::GetChunkAndSkinType': Please use GetSectionFromVertIndex. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>e:\epic games\ue_4.17\engine\source\runtime\engine\public\SkeletalMeshTypes.h(1409): note: voir la déclaration de 'FStaticLODModel::GetChunkAndSkinType'
1>E:\Epic Games\UnrealProject\SauvageGit 4.17\Plugins\NeoFur\Source\NeoFur\Private\NeoFurAsset.cpp(349): warning C4996: 'FStaticLODModel::GetChunkAndSkinType': Please use GetSectionFromVertIndex. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>e:\epic games\ue_4.17\engine\source\runtime\engine\public\SkeletalMeshTypes.h(1409): note: voir la déclaration de 'FStaticLODModel::GetChunkAndSkinType'
1>E:\Epic Games\UnrealProject\SauvageGit 4.17\Plugins\NeoFur\Source\NeoFur\Private\NeoFurComponent.cpp(385): warning C4996: 'USkinnedMeshComponent::GetSpaceBases': GetComponentSpaceTransforms is now renamed GetComponentSpaceTransforms Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>E:\Epic Games\UE_4.17\Engine\Source\Runtime\Engine\Classes\Components/SkinnedMeshComponent.h(760): note: voir la déclaration de 'USkinnedMeshComponent::GetSpaceBases'
1>E:\Epic Games\UnrealProject\SauvageGit 4.17\Plugins\NeoFur\Source\NeoFur\Private\NeoFurComponent.cpp(387): warning C4996: 'USkinnedMeshComponent::GetSpaceBases': GetComponentSpaceTransforms is now renamed GetComponentSpaceTransforms Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>E:\Epic Games\UE_4.17\Engine\Source\Runtime\Engine\Classes\Components/SkinnedMeshComponent.h(760): note: voir la déclaration de 'USkinnedMeshComponent::GetSpaceBases'

[/SPOILER]
They are not a problem for the 4.17 but they will be soon… I didn’t found any understandable (by me) documentation on these yet :slight_smile:

I don’t own NeoFur, but from the crash log, you should rename "NeoFurVertexFactory.usf’ to “NeoFurVertexFactory.ush”. Btw, since 4.17 you can have shaders in your plugin’s “Shaders” folder.

@JoGoiA
I’m also trying more or less with your results …
Have you also changed:
#include “/Engine/Private/Common.ush” in “NeoFurComputeShader.usf” and
#include “/Engine/Private/LocalVertexFactory.ush” in NeoFurVertexFactory.usf

Thanks for your help, Nate
I try to just change the file extension but it didn’t work neither…
The debugger didn’t react anymore to the IMPLEMENT_VERTEX_FACTORY_TYPE and start the editor until… The debugger stop it and give me this as an error :


[2017.09.14-16.04.09:873]  0]LogShaderCompilers: Guid format shader working directory is 7 characters bigger than the processId version (../../../../UnrealProject/SauvageGit 4.17/Intermediate/Shaders/WorkingDirectory/8900/).
[2017.09.14-16.04.09:873]  0]LogShaderCompilers: Cleaned the shader compiler working directory 'C:/Users/florent/AppData/Local/Temp/UnrealShaderWorkingDir/8DA422AF43F8C2896BBEE7B06FDDF732/'.
[2017.09.14-16.04.09:876]  0]LogShaderCompilers: Display: Using Local Shader Compiler.
Fatal error: [File:D:\Build\++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\ShaderCore\Private\ShaderCore.cpp] [Line: 476]
Couldn't find source file of virtual shader path '/Engine/Private/NeoFurVertexFactory.ush'
UE4Editor.exe a déclenché un point d'arrêt.

usH files aren’t header files ? The ShaderCore can’t load my usf file change to ush. I think we need to build a specific ush file…

EDIT : I just see your message Thunderstruck ^^. I will try this ASAP :slight_smile:
It seems that we can keep the NeoFurComputeShader.usf as a usf. The IMPLEMENT_SHADER_TYPE3 didn’t triggers any error.

EDIT 2 : there’s no Common.ush nor LocalVertexFactory.ush in Engine/Private…

EDIT 3 : I did it ! Thanks to you, Thunderstruck !
The Common.ush and LocalVertexFactory.ush files are located in Engine->Shaders->Private.
I make a copy of the **NeoFurVertexFactory.usf **, change it to **NeoFurVertexFactory.ush **and modify the include in it to


#include "LocalVertexFactory.ush"

I keep the NeoFurComputeShader.usf as usf but I change the include :


#include "Common.ush"

I change the NeoFurShaderInstallCheck.cpp file to copy these shaders from NeoFur/Shader to Engine/Shaders/Private (where are the common.ush and LocalVertexFactory.ush files). It’s a Private folder as specified and all files are in it so, no problem to found them from any ush/usf file ^^.


...

FString ShaderDir = FPlatformProcess::ShaderDir();
ShaderDir = ShaderDir + "/Private/"; // write the shader files in the folder "Private" in the Engine Shaders directory.
FString OldShaderContents;

        ...

NeoFurCheckSpecificShader("NeoFurComputeShader.usf", NeoFurComputeShader_StaticBuffer);
NeoFurCheckSpecificShader("NeoFurVertexFactory.ush", NeoFurVertexFactory_StaticBuffer); // Copy the ush file instead of the usf one.

The files are copied in the good folder, includes the ush files with no problem and the editor launch with no crash !!!
It had been stuck at 45% during the first loading, I think because of all the crappy tests I made… I just had to delete Engine->DerivedDataCache and relaunch to open the editor :slight_smile:

The shaders are actually compilling… 5284 left and I will see if every things are fine… Can’t wait !

EDIT 4 : Youhou !!
NeoFur_4.17.jpg
I’m so happy :slight_smile: I will soon compile the final result in the first post !
But I feel a bit like Flemming who discover the peniciline… The plugin works in 4.17 now but I have to confess that’s because I forget to change the lines


IMPLEMENT_VERTEX_FACTORY_TYPE(
FNeoFurVertexFactory, "/Engine/Private/NeoFurVertexFactory.ush",

and


const TCHAR* FNeoFurComputeShaderCS::GetSourceFilename()
{
    NeoFurRunShaderCheck();
    return TEXT("/Engine/Private/NeoFurComputeShader.usf");
}

NeoFur keep looking at an inexistant Engine/Private folder but the shaders files are in fact in the Engine/Shaders/Private and that how the things works. If I haven’t forget to change this, Maybe I will keep trying with no success… Unbelievable :slight_smile:

@JoGoiA,
Thanks, for the guide step by step…
Works all fine now!

Next steps for maintenance UE 4.17+:

  1. Fix the warnings, but they seem quite explained.
  2. Remove the shader copy and use the own in a new local folder “Shaders/Private” to follow the new Plugins’ rules…

About your 2, I fear that it will not be so simple. I believe that the files are modified (something with the version number added to them) during the copy in the folder…
I’m not sure…
I will check this :slight_smile:

EDIT :
In the NeoFurComputeShader.usf file copied in the engine directory, I found this line :


#define NEOFUR_UE4_ENGINE_MINOR_VERSION 17

Witch is not in the original file (the one in the plugin shaders folder)…
But we could make this change during the copy of the files from NeoFur/Shaders to NeoFur/Shaders/Private :slight_smile:
We just have to find an equivalent of this


FString ShaderDir = FPlatformProcess::ShaderDir();
ShaderDir = ShaderDir + "/Private/";  // 4.17 - while the check of the shader file, look in Engine/Shader/Private

in the InstallCheck.cpp file and make ShaderDir point to the Shader/Private folder of the plugin and it will make the same things but in the right folder…

Then, we will probably have to change the 2 IMPLEMENT line to get the shader files…

EDIT 2 : After further test in editor, we’ve got another problem…
The NeoFur_compression BP has a compile error. I didn’t open it yet to check if it is serious…

This seem only a tag with the engine subversion for future use:


// Automatically tag the engine version in this shader so we can do some #if trickery later.

    PluginShaderFileContents =
        FString("#define NEOFUR_UE4_ENGINE_MINOR_VERSION ") +
        FString::FromInt(ENGINE_MINOR_VERSION) +
        FString("

") + PluginShaderFileContents;

Anyway no hurry,
for now it’s okay

I think they use this to check if the files in the Engine folder is up to date or must be rewrite for a newer version of UE, in case they made changes in the shader files.
We should keep this behavior, maybe we will make such changes one of these days :slight_smile:

Did you look at the compression BP ?
I will soon but I’m working now and can’t access UE until this evening ^^.

Yes, The error is easy to resolve in “NeoFurComponent.h”:


UPROPERTY(EditAnywhere, **BlueprintReadWrite**, Category = "NeoFur")
    float ActiveShellCountScale;

Well done Thunderstruck !
I added this line in the step by step guide ^^
I don’t think I’d find this easy… I never think to look at this file to correct a compilation problem in a BP :slight_smile:

Hi, how can I get a version of this?

Sorry, if you didn’t buy it when it was available, you can’t get it now :frowning:
No one sell it… We all hope that the situation will change but we have no positive sign of this…

https://forums.unrealengine.com/community/released-projects/80421-neofur-fur-fibers-fuzzy-surfaces-and-more

Unreal Engine 4.18 OK?

I didn’t made the test yet… I will soon but I’m in some dark place, with no bandwidth… I’m almost offline for few days (the landscape is beautifull tho^^)

I did it. It’s compiled fine with the same mods of 4.17 and works well…

Great news :slight_smile:
We still have the 4 warning, I guess… We’ll have to deal with them one of these days :slight_smile:

If someone would be so kind as to send me a binary version for 4.18 (if it compiles and works), I’d appreciate it! I had the more basic license that didn’t cover source code access :frowning:

(Send me a PM and we can work out the details).

Edit: Problem solved :slight_smile:

Thanks for this. Using this guide I was able to successfully compile for 4.18 today

Nice work here. Something I noticed is adding a virtual bone to a skeleton of the mesh using the fur breaks the plugin. I wasn’t able to figure out why yet. There doesn’t seem to be a error message or output log just no fur. So no virtual bones at the moment.

Don’t want to sound like a negative nancy, props to you guys for trying to make this work, but if you ever intend to release your game I suggest just abandoning this. It’s not maintainable in a consistent way and unless they just hand over the source, it’s dead in the water.