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"

Canvas cannot draw UMaterialInstanceDynamic

Hello there,

I've been getting completely black texture result from Canvas drawing UMaterialInstanceDynamic. It's rendering fine with UMaterialInstanceConstant and all. Here's the code I used:

//----------------OnInit()--------------- //

UMaterialInterface* nMat= Cast'(StaticLoadObject(UMaterialInterface::StaticClass(), NULL, path));

if (nMat) T = UMaterialInstanceDynamic::Create(nMat, this);

//----------------- OnRender()------------------------- //

if (T) Canvas->K2_DrawMaterial( T, .....);

I'm at my wits end. Hope someone can shred some light on this.


Product Version: Not Selected
more ▼

asked Dec 11 '14 at 02:34 AM in Rendering

avatar image

186 12 17 38

avatar image Sachamora Dec 11 '14 at 01:21 PM

Not sure if it helps but try to use emission for color (or anything you are trying to do) instead of diffuse in your base material (Because I suppose there is no light in canvas :D). Even if this didn't work I think your problem is with your material not with your code.

avatar image KillerPenguin Dec 15 '14 at 12:58 AM

Well, the material is rendered properly when it's set as UMaterialConstant, so I don't think my material is at false here. (And yes, I use emissive channel and all that jazz, following all the guides closely here.)

Thanks for the help though. Will there be any other answers for chances that they might help strike the spot? T_T

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question