Page 1 of 1

[SOLVED(ish)] Refraction error!

Posted: Tue Dec 05, 2006 1:39 pm
by IanC
This puzzled me until I found it's cause.

This picture shows the problem:

Image


The lenses all have exactly the same IOR and are the same shape. However, one was scaled in edit mode and the other in object mode. This means that one has the vertex positions stored, then a scale of 0.5x1x1, whereas the other has the vertex positions stored where they actually are (scale of 1 in all dimensions). The original one is the one on the right.

The first (scaled, on the left) is refracting as though it's IOR is about 4 times higher. This is interesting as it refracts more than the original mesh, even though scaled smaller!

I'm having a crack at a camera again, and this will be quite important! Thought I'd let you know, Ono :)

Thanks for indigo, it's been a lot of fun to use, and is incredibly powerful :)

Ian

Posted: Tue Dec 05, 2006 8:44 pm
by zuegs
Hi IanC,

This is not a problem of Indigo, it's a problem of blender and the blender exporter. The thing is that the normals get scaled the same way as object. If you have a non-uniform object scale, then the mesh normals gets someway wrong :oops: :cry: ... just apply scale-transformation befor export or scale in "edit-mode" would help here :wink: ... i will have a look if this could be fixed :roll:

Posted: Wed Dec 06, 2006 2:11 am
by IanC
Ah ok, thanks!

I had thought it an indigo problem as I hadn't thought about the normals being calculated before exporting, which was silly.

I'll have a shufty through the code myself. Doubt I'll find anything but what the hell.


ian