# \[simple question\] custom expression

**URL:** <https://forums.unrealengine.com/t/simple-question-custom-expression/92984>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [May 26, 2017, 9:04am UTC](https://forums.unrealengine.com/t/simple-question-custom-expression/92984 "2017-05-26T09:04:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_6b526487](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6b526487](https://forums.unrealengine.com/u/anonymous_user_6b526487)\
**Post date:** [May 26, 2017, 9:04am UTC](https://forums.unrealengine.com/t/simple-question-custom-expression/92984/1 "2017-05-26T09:04:44Z")

</div>

Hello,  
I think this is a very simple question for you.  
I’m quite new to ue4.

I want to use custom expression nodes, I’m just playing with them and I see that I cannot generate a color from a custom expression node,  
for example if inside the custom expression I do something like this:  
float3 mycolor = (1.0,0.0,0.0); return mycolor;

and then I connect the output of the custom expression block to base color of a material I would expect a red color. Instead I have a black color…

Why? What I’m missing! I think that code is the simplest I can try.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6b526487](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6b526487](https://forums.unrealengine.com/u/anonymous_user_6b526487)\
**Post date:** [May 26, 2017, 9:21am UTC](https://forums.unrealengine.com/t/simple-question-custom-expression/92984/2 "2017-05-26T09:21:26Z")

</div>

Look also at this case:  
The input is 0,0,0, I add 1,0,0… the result is black… why? should not be red again?

 ![Untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/6/462ea02596e4551237b4d53055f1406c497067a3.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6b526487](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6b526487](https://forums.unrealengine.com/u/anonymous_user_6b526487)\
**Post date:** [May 29, 2017, 7:26am UTC](https://forums.unrealengine.com/t/simple-question-custom-expression/92984/3 "2017-05-29T07:26:05Z")

</div>

[Update]  
Anybody know how to make this work? 😕
