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"

Convert a texture channel to a Texture2D

Hi, it is possible to convert a texture sampler`s channel to a Texture 2D? I would like to have 4 individual information in each channel and use it in functions like the NormalFromHeightMap. However, it only accepts a Texture 2D, making me work on each image individually inside photoshop.

Cheers

Product Version: Not Selected
Tags:
more ▼

asked Oct 13 '14 at 03:17 PM in Rendering

avatar image

danielvmacedo
207 16 17 129

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

2 answers: sort voted first

Hey danielvmacedo -

Currently there is no way to take a Texture Sampler and convert to a Texture Object (T2D input). However, the NormalFromHeightMap is a Material Function and you can pull the Instructions out of the Material Function and then use the regular Texture Samplers OR create a copy of the Material function and replace the Function Inputs in the Material Function with the actual Texture Samples you want to use. OR copy the function and pull off the texture samples in the Material Function from the appropriate RGBA channels then when you place the T2d it will pull the separate channels of that Texture as you have set up.

Thank You

Eric Ketchum

more ▼

answered Oct 15 '14 at 02:34 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 736

avatar image danielvmacedo Oct 15 '14 at 02:40 PM

This was what a actually did =), thanks! Don't you think that it could be a nice feature to have for material node setup!?

avatar image Sn4ke66 Jul 21 '15 at 08:19 PM

Hi, could show me how to do this?

avatar image Lovecraft_K ♦♦ STAFF Jul 21 '15 at 08:56 PM

Hi -

I think you mean how to pull out the information from a Material Function and place it into your Material. If so:

Let's use the NormalfromHeightMap Function for our example:

Open a New Material and place the above Material Function in your Material. The Double Click on the NormalFromHeighMap Node to open the Material Function. You can then select all the nodes in the Material Function minus the Output nodes and copy them. Back in your material paste them. You will have to go back and replace all your Function Inputs which will not paste correctly, but using the original Function as your guide it is not to hard. Finally your copied nodes will allow you to use any nodes that can be used in a Material, like the Texture Sampler.

Thank You

Eric Ketchum

avatar image Cute Waifu Girl Jan 02 '17 at 03:08 AM

Hello!

I've been following along, but I'm a bit stuck. I've copied the function and I called it back into my material. And I've replaced the texture objects with my texture samples and that part works. but.... I want to control normal map blending through vertex colours from height information, but unreal is being a bit of a pain. This is what I have:

alt text

Painting my objects with vertex colours have no impact, whatsoever.

1) Can I not pull vertex colour information inside a material function?

2) How can I get vertex colours to control the normalsFromHeightMap function?

aaaaaa.png (361.7 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I know that this was years ago, but I found myself wanting an answer. This seemed a bit complex for a simple action, so I managed to find a very easy way for those who stumble upon this. In the following image, I am getting the material of my gun, finding the PatternMap texture, casting to that texture as Texture2d, then setting a variable in a Widget that is of type Texture2d. The Widget then displays the texture. This seemed to do the trick!

Setting up Conversion

more ▼

answered May 11 '18 at 06:41 PM

avatar image

BubbaBonkers
128 4 6 9

(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