Neikke Posted March 3, 2023 Share Posted March 3, 2023 (edited) Hey magicians, how would you seamlessly stitch two different heightfields using Vex (or VOPs)? Any ideas would be hugely welcomed! Edited March 3, 2023 by Neikke Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 3, 2023 Share Posted March 3, 2023 Hi Natiq, maybe there is a node for this, but you could overlap both height fields and sample them into a new one: float band = chf('band'); float h_0 = volumesample(1, 'height', v@P); float h_1 = volumesample(2, 'height', v@P); float mask = smooth(-band, band, v@P.x); f@height = lerp(h_0, h_1, mask); hf_blend.hip Quote Link to comment Share on other sites More sharing options...
Neikke Posted March 3, 2023 Author Share Posted March 3, 2023 2 hours ago, konstantin magnus said: Hi Natiq, maybe there is a node for this, but you could overlap both height fields and sample them into a new one: float band = chf('band'); float h_0 = volumesample(1, 'height', v@P); float h_1 = volumesample(2, 'height', v@P); float mask = smooth(-band, band, v@P.x); f@height = lerp(h_0, h_1, mask); hf_blend.hip 171.73 kB · 3 downloads Hey thanks a lot Konstantin! But will this method work if I need to stitch 6 height maps in this way? I marked areas that need to have perfectly matching relief accordigly: Do you have an idea how to approach this? Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 3, 2023 Share Posted March 3, 2023 Copy the height fields to the points of an octahedron to shape a cube, apply noise there and assign them to a cross. Alternatively try sampling the world position noise from a cube mesh right away: int index[] = array(0,2,1,3,5,4); vector bb = relbbox(0, v@P); vector uvw = set(bb.x, bb.z, 0.0); vector pos = primuv(1, 'P', index[i@primnum], uvw); float height = noise(pos * 50.0) * 200.0; f@density = height; heightfield_cube.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Neikke Posted March 4, 2023 Author Share Posted March 4, 2023 Great thanks I will check that! Thanks a lot! Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 4, 2023 Share Posted March 4, 2023 1 hour ago, Neikke said: Great thanks I will check that! Thanks a lot! I think you would still need to correct the point numbers to really make all the tiles match, but yeah, I'm glad it's useful. Quote Link to comment Share on other sites More sharing options...
Richard Posted March 8, 2023 Share Posted March 8, 2023 You could us the heightfield layer node to blend them together, overlap them a bit and then just paint a mask to control where the blend happens. However, you might be better off just making one big terrain and then making a cross shape extrude it up and use a hf cutout by object. If that works (I havent tried it) you would no longer have seams on any of the inner edges. For the outter edges maybe this is easier to solve as a texturing problem? Write out the Heightfield to disk and then in PS or in COPs, basically clone stamp the edges to get rid of any seams. Then bring the new seamless texture back in through a heightfield file node. 1 Quote Link to comment Share on other sites More sharing options...
Neikke Posted March 28, 2023 Author Share Posted March 28, 2023 On 3/8/2023 at 2:49 PM, Richard said: You could us the heightfield layer node to blend them together, overlap them a bit and then just paint a mask to control where the blend happens. However, you might be better off just making one big terrain and then making a cross shape extrude it up and use a hf cutout by object. If that works (I havent tried it) you would no longer have seams on any of the inner edges. For the outter edges maybe this is easier to solve as a texturing problem? Write out the Heightfield to disk and then in PS or in COPs, basically clone stamp the edges to get rid of any seams. Then bring the new seamless texture back in through a heightfield file node. Thanks that totally makes sense. I'm not too familiar with COPs but it's definitely possible in PS or in Substance Designer. Thanks a lot for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.