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"

Draw Material Simple is too dark

Hey,

in my game I want to show a mugshot of a NPC for a few seconds in the top left corner of the screen. Therefore I created a SceneCaptureComponent2D and set the TextureTarget to a TextureRenderTarget2D. Then I created a material using this texture with the these settings:

alt text

as you can see, it looks fine but when I draw it using the HDU class and DrawMaterialSimple it get's really dark. When I put the material on a box it also looks okay:

alt text

Does anyone know what I'm doing wrong? Furthermore, when using DrawMaterial instead of DrawMaterialSimple the box in the upper left corner is completly black.

Product Version: Not Selected
Tags:
more ▼

asked Sep 23 '14 at 10:11 AM in Rendering

avatar image

NoMonkey89
139 9 14 21

avatar image MDMD Jun 24 '15 at 06:13 PM

Hey I'm having the exact same problem. Does anyone know the answer?

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

1 answer: sort voted first

This worked for me.

Instead of drawing the Material, draw the Texture. But you maybe have to click on the little arrow and set Translucent to Opaque

alt text

answerss.png (41.9 kB)
more ▼

answered Jun 24 '15 at 07:05 PM

avatar image

MDMD
41 1 2 5

avatar image ErebusWolf May 04 '16 at 06:33 AM

This solution worked for me. Thank you so much! To the original poster you probably haven't filled all the fields in correctly for DrawMaterial. uwidth and uheight should be 1.0

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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