Distance Poly Reduction

   2239   2   1
User Avatar
Member
4 posts
Joined: Sept. 2015
Offline
Hi,

I would like to reduce a highres polyplane that I got from a displacement in another software in realtion to the distance to the camera. I already checked the distance tap in the polyreduce node but this is meant for capsulated objects in space and not a surface that streches over the distance. To put it in another way the plane shall be reduce in the distance but not in front of the camera.

Thank You!
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
Hi cosmo,

inside polyreduce there is an attrib weight parameter responsible for reducing details over distance.

You can create the weight attribute in a point wrangle:

// Read in camera position
matrix m = optransform(chs('cam'));
vector cam_pos = cracktransform(0,0,0,{0,0,0}, m);
// Inverted distance from each point to camera
@weight = sqrt ( distance(cam_pos, @P) * 2);
@weight = fit(@weight, 0, 30, 20, 0);

Attachments:
landscape_LOD.hipnc (79.3 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
4 posts
Joined: Sept. 2015
Offline
Hey Konstantin,

thank you! that is great help!
  • Quick Links