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"

How to get access to particular pixel in sprite

Hey i want to display perlin noise on sprite thus access every pixel in it. Is there any clean way to do it or should i just create/overwrite file with noise values whenever values changes?

Product Version: UE 4.19
Tags:
more ▼

asked Sep 09 '18 at 11:38 AM in C++ Programming

avatar image

I_am_a_Dolphin
1 1 2

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

1 answer: sort voted first

You can make this in the Material Editor using the SpriteTextureSampler material expression.

You should not have trouble implementing any kind of noise there...

more ▼

answered Sep 10 '18 at 09:28 AM

avatar image

dZh0
1.3k 6 5 10

avatar image I_am_a_Dolphin Sep 10 '18 at 03:29 PM

thanks but i'm asking specificly in c++

avatar image dZh0 Sep 11 '18 at 07:51 AM

Graphics (texture manipulation) is usually handled by the GPU - faster and cleaner.

Pixel information is handled by the application programming interface (OpenGL / DirectX / Vulcan / ...) + graphic driver.

Manipulation of pixel information is done in the shader language of the specific API (HLSL for DirectX). Shader creation is done through Material Editor in UE4. If you want to import HLSL directly in the engine you can use a Custom Expression node. (HLSL is based on the C language)

This is not to say that you can't manipulate bitmap data in purely in C++, however this will be sub-optimal. You will manipulate the image on your CPU and you will then still have to send it to the GPU through the API. (which could have done the manipulation faster anyway)

In short - It will be either clean or in C++ ;)

Choose your poison!

(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