Makes sense. This will make me sad if Mac can’t support Parallax. Seems we’re restricted quite a bit over PC users. I guess that’s to be expected but dang I hope there are some work-arounds to get this functioning. I already can’t use due to DX11 only feature. This was my backup plan for getting more detail out of some of my materials. sigh
ok. it may just be the compiler not liking it. let me know if you are able to try the constant steps input.
This is the line of the log that you requested:
LogRHI: OpenGL MajorVersion = 4, MinorVersion = 1, ShaderPlatform = GLSL_150_MAC, FeatureLevel = SM4
I tried setting the min/max steps to 2.0 like you suggested, then connected the append node and still freeze hang.
Ok thank you for your help in tracking this down. I have created some bugs to track down what is going on. now I am curious if any forloop stuff works on mac, such as the blur we describe in the custom node documentation here:
No problem, thanks for trying to help me get this figured out! … I did try what was listed in that documentation and it seems to work fine, I guess? I’m not sure what the exact intended result is supposed to be, but this is what I got:
Before (with the texture sample plugged directly into Base Color):
After (with the Custom node plugged into Base Color):
ok thanks. I still think somehow it is the samplegrad function that mac isn’t liking. I will do some more testing here and figure it out.
edit I think I am on to something… Going to see if I can install ue4 on my wife’s mac later. I have a few ideas to try but can’t verify any of them without a mac.
Cool cool, hopefully you can get it figured out! Let me know how it goes
I love how this has been in development for ages and as soon as it goes into a release build, someone finds an edge-case haha… gotta love Game Development!
I tried to launch UE4 on my wife’s mac but it never finished. I don’t know much about mac’s but hers is the kind where everything is inside the monitor but it still has 4gb ram and 2.4ghz cpu and some kind of lightweight radeon… so I thought it would work but oh well.
Anyways, one of the graphics guys here took a look and said the problem is most likely because the variable ‘i’ was not initialized as 'int i = 0; '. So it may fix the compile error to find that line and make it equal 0. Should be near the top.
Is there a way to set how far away from the camera POM is rendered? I could do this with LOD’s and separate materials but wouldn’t that require more drawcalls due to more materials being used?
Yes, you could use a the material function “Camera Depth Fade” to control the number of min/max steps. What I would probably do is use it to lerp both of those values to 1 or 2. The reason something like that is not built into the function is because it’s already a fairly expensive function and not everybody will want to control it via distance. Typically in the distance the cost is less anyways due to less screen pixels being used, but if you are using this on terrain or something that takes up a ton of space everywhere, fading the steps with distance makes a lot of sense.
Wow, such a simple fix was the problem. I changed the int i; to int i = 0; and that fixed it. It no longer freezes and the heightmap channel to append to heightmap channel input no longer freezes either.
I’m facepalming now though because I’m a programmer and didn’t catch that Good to know it works now though! happy dance
Thanks a bunch Ryan!
That’s exactly why I was inquiring, thanks so much
Don’t feel bad. It isn’t an obvious thing to look for unless you’ve spent years staring at arcane shader code trying to make it work on the Mac
Haha, I suppose you’re right. Now just to figure out how to apply this POM to a terrain material and have it work with landscape coordinates as well. So far, no luck.
It works fine with worldposition-XY, try that.
Thanks for the heads up! I’ll try it
Hmm… not sure that will work with my current setup. I pulled some stuff from the Landscape Mountains project (in regards to distance-based texture tiling) and created my own material function to do it. I’m not entirely sure how to set up the WorldPosition-XY with the Parallax and the distance-based tiling. Since the WorldPosition-XY requires a float input and both the Parallax UV output is a float2 and the material function for distance-based tiling provide a float3 output, therefore it gives an error via the Divide node within the WorldPosition-XY function no matter how I calculate them together. I have to either truncate a float off of the end result or append one depending on which way I go about it. Neither of which provide reasonable results.
Okay. I have the distance based tiling setup as follows, very similar (in fact probably nearly identical to) the Landscape Mountains material, with exception that I added a new function which provides distance based tiling for roughness on a per-layer basis using a “Roughness Splat Map”:
Top layer blend attaches to Base Color
I’m just not sure how to incorporate the POM node for each layer into that setup. The material function(s) that I created gives a float3 output, the parallax gives a float2. I’ve tried to append a float onto the Parallax and tried to break the float3 apart and only keep 2 of them to calculate with the POM and it gives me this with the dirt layer lol:
Here’s the original material progress (far tiling) before attempting to calculate the POM into it:
It says invalid attachment so I can’t see what is going on.
But I can tell you without seeing the attachment, that POM will not work on a function that blends a near and a far automatically. You will need to move the POM function into the layer itself, and do one POM node for each near/far distance texture set, or purposefully decide not to hook it up to the far one (probably wasted expense there).
You put it in by replacing the UVs for single textures inside the function. I’ll set up an example later but my PC is stuck in production lighting rebuild mode for a while.