Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dukecg

Pages: 1 [2] 3 4 5
16
Brilliant! That's the two of the three bugs I reported, now for that pesky packaged game crash :(

17
Slope blur!

18
I appreciate the artistry and technical knowledge of fully procedural materials, but whatever works is usually best.

19
Content - Substance Source - All RDT textures gone?
 on: February 07, 2018, 01:02:24 pm 
I revisited this article:
https://www.allegorithmic.com/blog/substance-source-breaking-new-ground-new-hybrid-materials

...and wanted to download a few of them, but to my surprise none of them appear on substance source. Were they removed?

20
Yeah make sure you're using the GPU engine.

21
If you have an archive with one animated graph and the rest are single frame, Substance Player exports all as though they have animation.

22
Ok i've isolated it as best I can. Can I PM the project to someone?

23
I have a project here that when built, the substances won't build and they stay at their lowest MIP. I think it has to do with creating the asset from code rather than blueprint? The project is private - i've stripped it down to its bare minimum to show the error - who can I send it to?

24
This happens when the generation mode is set to SGM_Baked as well. I'm trying to isolate the issue but im not having much luck.

edit: It's hitching on line 706 of FastReferenceCollector

25
An alternative way of finding where they're referenced, instead of explicitly finding materials is this:

      for (TObjectIterator<USubstanceTexture2D> TexItr; TexItr; ++TexItr)
      {
         USubstanceTexture2D* Tex = (*TexItr);
         if (Tex->OutputCopy && Tex->ParentInstance && Tex->ParentInstance->Instance && Tex->ParentInstance->Instance->mInstanceUid == GraphItr->Instance->mInstanceUid)
         {
            TArray<FName> Referencers;
            const FName SelectedPackageName = Tex->GetOutermost()->GetFName();
            FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(TEXT("AssetRegistry"));
            AssetRegistryModule.Get().GetReferencers(SelectedPackageName, Referencers, EAssetRegistryDependencyType::Hard);
         }
      }

Then interrogate Referencers

26
Sometimes, and I can't pin it down, the substance graph instances lose their output settings on reimport. When reimporting you check for outputs by id, so it may be that the id is being changed when you reexport the substance or something. To remedy this, i've done a lookup by output name as well or id.

In SubstanceFactory.cpp, replace ReimportData with:
struct ReimportData
{
   FString PackageURL;
   UMaterial* OwnedMaterialReferencee;
   TMap<uint32, USubstanceImageInput*> ImageSources;
   TArray<MaterialParameterSet> ReferencingMaterials;
   TArray<MaterialInstanceParameterSet> ReferencingMaterialInstances;
   TArray<uint32> EnabledOutputUIDs;
   TArray<FName> EnabledOutputNames;
   SubstanceAir::shared_ptr<SubstanceAir::Preset> PreviousPresetData;

   ReimportData(const FString& packageURL, UMaterial* owningMaterial, SubstanceAir::shared_ptr<SubstanceAir::Preset> preset,
                TArray<MaterialParameterSet>& referencingMaterials, TArray<MaterialInstanceParameterSet>& referencingMaterialInstances, TMap<uint32, USubstanceImageInput*>& imageSources, TArray<uint32>& enabledOutputUIDs, TArray<FName>& enabledOutputNames)
   {
      PackageURL = packageURL;
      ImageSources = imageSources;
      PreviousPresetData = preset;
      EnabledOutputUIDs = enabledOutputUIDs;
      ReferencingMaterials = referencingMaterials;
      ReferencingMaterialInstances = referencingMaterialInstances;
      OwnedMaterialReferencee = owningMaterial;
      EnabledOutputNames = enabledOutputNames;
   }
};

...and line 429 with:
if (!OutputItr->mUserData && (GrItr.EnabledOutputUIDs.Contains(OutputItr->mDesc.mUid) || GrItr.EnabledOutputNames.Contains(FName(OutputItr->mDesc.mLabel.c_str()))))

... and lines 663 to 675 with:
      //Array of all of the enabled output UIDs
      TArray<uint32> EnabledOutputs;
      TArray<FName> EnabledOutputNames;

      //Save the enabled state of all of the outputs
      for (const auto& OutputItr : GraphItr->Instance->getOutputs())
      {
         if (OutputItr->mEnabled && OutputItr->mUserData)
         {
            EnabledOutputs.AddUnique(OutputItr->mDesc.mUid);
            EnabledOutputNames.AddUnique(FName(OutputItr->mDesc.mLabel.c_str()));
         }
      }

27
Howcome these arent on github anymore? That was handy.

I've run into a bug that I've fixed on my end using the source, so if the github repo still exists somewhere i can submit a pull request.

28
What the topic says, import a substance, create a material instance of something with a texture parameter and occupy it with a substance texture and reimport. It's magically gone!

29
This is very disappointing. I really wanted to showcase what Substance integration can do, particularly for build size but the amount of bugs i'm running into makes it totally impractical.

Pages: 1 [2] 3 4 5