# Polygon Mesh reflections

## Recommended Posts

Hi everybody,

I've got a Polygon Mesh sphere with reflective material. The reflection of the grid in the sphere has some incorrect breaks (look at the blue square). I think it's caused by the polygons of the spehere. Is there a way to achieve smooth reflections on a low-poly model? I've been also playing with facet but with no success.

Checking "Polygons As Subdivisions" makes the reflection smooth but I can't use it because my original object (the sphere is just a simplified model) needs to have some sharp edges.

Any hints how to solve the problem?

Thanks

##### Share on other sites

Hey Berija,

What's causing this is the interpolation of both normals and positions. The reflection vector is dependent not only on the surface normal "N", but also on the incident vector "I" -- and "I" is in turn dependent on P. So even though you're interpolating smooth normals, the positions remain on the surface of each polygon, and so the result is not smooth at that coarse a level.

The solution is to do what has become common practice for game graphics: you grab a high resolution version of your model, then bake out a texture map with object-space (or rest-space) positions, and another texture with the normals. Then, for the final shading of your low-poly object, instead of using the globals P, N, and I, you use the values from the baked texture maps, transformed back to current space. In this context, the new incident vector "I" is the P you baked out to the texture, minus the camera position global "Eye":

```vector newI  = ptransform("space:object","space:current",Ptex)-Eye;
vector newIn = normalize(newI);```

Here's a hip file that uses this technique. Just fire off the "Mantra_MP" ROP -- it will first bake the P and N maps for the high-res model, and then render the low res model using these textures.

lowpolyrefl.hip

Hope that makes some sense.

Cheers.

##### Share on other sites

Changed the UV mapping so it let's you alter the low-poly divisions without "shifting UV" problems, and also changed the filter used when baking out the textures for a slightly better result.

lowpolyrefl.hip

P.S: You could improve on this by actually displacing the points based on the baked textures (instead of just "pretending" that the surface is in a different place, which is all this method is doing at the moment).

Cheers.

##### Share on other sites

Mario,

thank you very much.

Now I can understand the logic behind low-poly reflections. This is what I was looking for.

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×