How to smooth this

Do you use displacements? And looks good…
But question of heightfield :wink:

@schultzeworks, I use not displacements, but heightfield

No - here i used heightfields - btw. displacement works more or less like hightfield (only on render mesh but idea is roughly the same).

tif 16 bit - 1024 x 1024 px - sampled 256 x 256 points -> custom render mesh stuff // or make heightfield to mesh and use weaverbird - catmul subdiv

1 Like

How have you achieved such result? :smiley:

I wrote above :wink: Key here is 16bit map and custom render mesh (props panel) :wink:

I tried to use 16bit the image, but I didn’t try to pass into the custom mesh mode. I will check later!

And if to use more vague image? The ripples are absent? Can you check? :slightly_smiling_face:

Look - i made 16bit rgb doc in ps with slightly blured clouds (unfortunately forum does not accept tif img):

Then heightfield with: 256 x 256 pt to srf (last opt in dialog) → now rebuild to taste i found 64x64 pt is ok - but yes even 16bit gave here weird wrinkles and ripples on srf (i thought firstly that 16bit isn’t supported but 8bit is even worse - but yes those wrinkles looks like sth is wrong here) - quick fix could be made on meshes with multiple smooth cmd with small amount:

Very small adjust on render mesh and result:

@pascal as i understand to achieve best possible smooth result interpolated pixels should be as CP? Does 16bit indeed work with heightfield? Could you check that?

EDIT:
Other small test wit image found online:


Sampled at 256x512 result looks pretty nice - this time without any special tweeks:

1 Like

If to use the vague image - the tif format, 16bit, change of the Render mesh quality settings - everything is useless, there are ripples. :frowning_face:


After application of Rebuild surface:

Even if I use not strong smoothing - the result has defects:


At change of the Render mesh quality settings:

I use the tif format, 16bit. There is a card:

The wrinkle or crease in the middle is an Aliasing artifact. The Rhino heightfield command doesn’t do subpixel sampling so you will get aliasing when your sample spacing changes. You want Rhino to sample every 4th pixel which it does for most of the image but at the point where you see the wrinkle the sample spacing changes to get the number of samples you requested. You may be able to get rid of the wrinkle by either increasing or decreasing your sample spacing or changing the original resolution by 1 or 2 pixels. The idea is to get constant sample spacing across the whole image.

The heightfield command should be doing subpixel sampling. The simplest way to do that would be to make a mesh at the native image resolution and then sample the mesh at whatever resolution the user requests. This would not completely eliminate aliasing but would reduce it and spread it evenly across the entire image. An even more effective way to do subpixel sampling would be to make a spline surface using the native image resolution and then resampling the surface at whatever resolution the user asks for… This is equivalent to rebuilding the surface to another resolution after making the heightfirld to the native image resolution

4 Likes

This is a cool process and you guys have made some great suggestions. I’m going to add it to my Rhino Tips Tricks and Techniques course.

2 Likes

Many thanks!

I had it (the card 300px on 300px):


When I have reduced the image size on 1px on width and height, but have specified in the heightfield window 300x300, result excellent: :smiley:

Flamingo:
2017-10-30_182746

1 Like

Can you explain more clear? How exactly…

I’m not sure what you want explained. The method of sampling that Rhino uses in the heightfield command is called “nearest neighbor interpolation”. The 2nd method I described is called bi-linear interpolation . The third method would be spline or bi-cubic interpolation. There is lots of information if you google any of those phrases.
The nearest neighbor method is the least accurate and is the root cause of some of the unwanted artifacts that you have seen.

I haven’t understood how to correct a problem at the 2nd way. :wink:

That was an explanation of how Rhino should be doing it.

You could probably do it yourself if you are willing to go to a lot of trouble.
First make a mesh heightfield where each vertex in the mesh matches to a pixel in the image. Then project a grid of points onto the mesh and then use surface from point grid or surface from control point grid to make the surface.
That isn’t going to fix everything It will just get rid of the effects of nearest neighbor sampling.

Actually u don’t need to project them just grab mesh hit f10 and go further u can even patch those points :wink:

Yes but you are missing the point. Rhino offers the user the option to sample the image with any number of samples the user chooses, but you get crap if you don’t pick the right numbers. I was explaining how it could be programmed so that the user actually does have a choice. What’s the point of offering a choice and then telling users it will only work well if you pick one of the choices?

You’re right @jim i just said that there is shortcut where u don’t have to necessarily project points :wink:

I have a set of points… How to me to make a surface on points?
If to use SrfPtGrid is too long! Or I don’t understand something?

And by the way, why the ripples on a surface (appear at strong degradation) - somebody knows?

@D-W

I think we should think from behind - main question here is what u want to achieve developing this surface. Do u need it for production or rendering?