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"

Shader tesselation question(custom node)

Hi everyone...

I use some custom material node along with noise to create create a procedurally generated material.

The problem I am facing is at the end of the material, I get a grey scale material. But, I cannot use it in height map. It is showing some error.

The custom material node just return a float but I get error when I connect my node to world position.

alt text

Product Version: Not Selected
Tags:
capture.jpg (77.4 kB)
more ▼

asked Nov 17 '14 at 09:13 AM in Rendering

avatar image

envenger
418 76 117 145

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hey envenger -

We are going to continue to look into the issue with the Custom node, in the meantime, the logic of you script can be replicated using the following material setup:

alt text

I will keep you informed as we investigate the custom node.

Thank You

Eric Ketchum

customreplace.jpg (132.2 kB)
more ▼

answered Nov 18 '14 at 05:04 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.8k 702 256 733

avatar image envenger Nov 18 '14 at 05:19 PM

Thanks for reply.

I got another small question though. Can this grey scale image be used to create a normal map? The heightmap to float node asks for Texture2D and doesn't accept floats.

avatar image Lovecraft_K ♦♦ STAFF Nov 18 '14 at 06:20 PM

Hey envenger -

Not direct through that particular material function, the Normal from Heightmap, it is setup to take only a texture 2D as the heightmap image. You can however open that function and use the logic and replace with your generated greyscale image just replacing it in place of the Texture Samples in the Material Function.

Hope that helps out -

Eric Ketchum

(comments are locked)
10|2000 characters needed characters left

Hey envenger -

Without looking at your scripting itself, I would guess that you have a call in your script that tries to connect a vertex shader parameter to a pixel shader parameter which cannot be done implicitly and must be set up through a variable structure.

If you are comfortable doing so, feel free to post you code and I will give it a glance to see if I can resolve the call.

Thank You

Eric Ketchum

more ▼

answered Nov 17 '14 at 07:21 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.8k 702 256 733

avatar image envenger Nov 18 '14 at 07:20 AM
 if(Input >= 0 && Input < F2)
 {
 return 0;
 }
 else
 {
 return 1;
 }

 if(Input >= 0 && Input < F2)
 {
  float Output;
  Output = Input/F2;
  return Output;
 }
 else
 {
 return 1;
 }

These 2 are in the custom material nodes.

They return a float. I wanted to use this has a height map so that I could convert it into a normal map but that doesn't seem possible. It shows "cannot convert from float to Texture2D" So I thought of using tessellation.

avatar image svv3dUDN Nov 18 '14 at 07:57 AM

Hi!

This problem exists in UDK too. And solution was to change the type of the class node in the shader source code. The problem is that the output value of a node expression has a data format of "float", but the compiler believes that the data type is not correct. Even if we use this as an alpha and connect to "Lerp" in WorldDisplacement. All the same, an error occurs. It is either a bug. Or needed method for converting data type.

avatar image spaceharry May 07 '16 at 07:52 PM

Can u share how u changed it and which class node?

(comments are locked)
10|2000 characters needed characters left
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