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"

Material Function Reentrant Expression error

I'm making a scene that requires very high resolution texture maps. To do this, I'm using a material function to stitch multiple textures together, remapping them to 0-1 UVs. This works, but my issue is when I start applying parallax mapping using the BumpOffset function. My material function takes two textures and a UV mapping, and stitches them into a single texture across the X axis:

Horizontal texture stitching

As you can see from the previews, this works, but it produces problems when used twice in succession, as is necessary for heightmaps:

Reentant Expression

Note the error - reentrant expression. As far as I understand it, this means there is some kind of expression that feeds back into itself, and may not terminate, but this graph is essentially two function calls. Assuming both of those terminate (which they must), two calls to it must also terminate (a standard, provable logic identity).

Could someone tell me why I can't use this function twice like this? What is the problem, and why does Unreal seem to think this could possibly not terminate?

Product Version: Not Selected
texturestitch.png (225.0 kB)
reentrant error.png (151.4 kB)
more ▼

asked Sep 02 '14 at 06:00 PM in Rendering

avatar image

388 41 46 60

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

1 answer: sort voted first

I think this is a bug, we have an issue like this in the database, however it has proved difficult to fix without breaking other things. Sorry about that. Maybe you can find a workaround?

more ▼

answered Sep 03 '14 at 02:01 AM

avatar image

1.9k 31 11 72

avatar image Hoeloe Sep 03 '14 at 03:07 PM

Ah, thanks for clearing that up. The workaround I've found just uses two very similar material functions, and as long as I don't use the same one twice within the same flow (though I can use the same one twice on different branches, which given the nature of the error makes sense) then I have no problems.

It did eventually turn out that I didn't even need to do this, though, as I hit sampler limits after about 12 samplers (not sure where the first 4 went, though), and had to dial back the resolution to cut down on stitching. The heightmaps were some of these, as the lower resolution is not immediately noticeable.

(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