Iterate through pixels of textures/images

1649 篇文章 11 订阅
1623 篇文章 22 订阅

Hello KenzaburOe,

I have a setup that you may be able to use for your value collection. Please note that this will not go pixel by pixel but you can pull out the color values of a texture in blueprint.

Things that you will need:

  1. A material parameter collection

  2. A Texture that you would like to use

  3. A material

  4. A Blueprint

Step one:

To create a Material Parameter Collection you will want to go to the folder you would like to store it in (in the content browser) Right Click > Materials & Textures > Material Parameter Collection. Go ahead and name this as you would like. Open your MPC (Material Parameter Collection) and set it up like the following:alt text

Step two: Open your Material. To access the Collection Parameter Right Click > Type "Collection". After this you will need to bring in your texture. Right Click > Type Texture Sample > go into the Details panel and assign your texture. Then finish by setting up your material as follows: alt text

Step three: Open your Blueprint and you can Set/Get Scalar Parameter Values from there Here is an example: alt text

Please Note: In UE 4.5 as of 10/15/2014 there is an issue with this method. If you would like to try this in 4.5 you will need to do this in 4.4 and migrate these assets to 4.5 or preform this in 4.4 and upgrade the project to 4.5.

paramhelp.png (13.4 kB)
paramhelp2.png (124.1 kB)
paramhelp3.png (91.7 kB)
more ▼

answered Oct 16 '14 at 2:36 AM

Rudy Triplett gravatar image

Rudy Triplett ♦♦ STAFF 
33.2k  381  64  343

extropy gravatar image  extropy  Feb 12 '15 at 6:51 AM

Hello Rudy, this looks great, but im missing something... how can you promote or copy the numerical colour value from the texture into a parameter? There must be a way, surely? Do hope you can help

extropy gravatar image  extropy  Feb 15 '15 at 3:08 AM

Hello Rudy, this looks great, but im missing something... how can you promote or copy a numerical colour value from the texture into a parameter (to share between blueprints)? your answer implies that its possible but I cant see how

There must be a way, surely? I want to use an MF-generated pattern to drive a material, but also use it to drive actor behaviour. Im sampling the material in a scenecapture2d to a rendertarget - ,,,and then trying to extract colour data for a central pixel from that.

Textures / materials are a great way in principle to store complex data, if we could transfer data in and out...

Ive tried lots of approaches, its very frustrating that nodes available in one blueprint type are not available in other types..

Looks like I have to recreate the material function inside a blueprint, and then have the problem of creating a UV input the same as that in the material..

thanks

ash22 gravatar image  ash22  Dec 19 '15 at 8:54 PM  Newest
1

"how can you promote or copy the numerical colour value from the texture into a parameter?"

I have exactly the same question!

As far as I know it isn't possible to pass values from a material back to a blueprint (at least that's what I was told) so I was very intrigued by this post.

'Get Scalar Param Value' only retrieves the value of the U_Control/V_Control collection parameters.

Rudy, did you actually (somehow) retrieve a pixel colour in your blueprint?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值