x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Custom UMaterialExpression Node - works but fails Packaging

I managed to write an extended UMaterialExpression that actually worked as a custom node in the editor and all it did was take a Texture2D and check the pixels one by one for highest/lowest values on RGB and then throw that value out by abusing compiler's Compiler->Add (just for testing purposes so I didn't have to edit the engine itself) by adding the value i got + 0 together so that I would get the calculated value as output.

And it worked GREAT in the editor, however when we tried to package the project it failed.

 FTexture2DMipMap* MyMipMap = &Texture->PlatformData->Mips[0];
 FByteBulkData* RawImageData = &MyMipMap->BulkData;

The issue is here. For some reason DURING packaging it fails because it can't access the mips (the base texture does have a setting of no mipmaps (which was the only way to get this to work in the first place in the editor.)

Any ideas how i could read the pixels from a texture in a different manner rather than from mips?

as a side note I also tried implementing it directly into the engine (so placed exactly the same way as all the other ones are with the same result.

Product Version: UE 4.20
Tags:
more ▼

asked Oct 05 '18 at 08:55 AM in C++ Programming

avatar image

Mercus
113 8 9 160

(comments are locked)
10|2000 characters needed characters left

The question has been closed Nov 13 '18 at 03:10 PM by Mercus for the following reason:

Problem is not reproducible or outdated


0 answers: sort voted first

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question