[SOLVED(ish)] Refraction error!

Feature requests, bug reports and related discussion
Post Reply
3 posts • Page 1 of 1
IanC
Posts: 147
Joined: Thu Aug 24, 2006 4:46 am

[SOLVED(ish)] Refraction error!

Post by IanC » Tue Dec 05, 2006 1:39 pm

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
Last edited by IanC on Wed Dec 06, 2006 9:54 am, edited 1 time in total.

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Tue Dec 05, 2006 8:44 pm

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:

IanC
Posts: 147
Joined: Thu Aug 24, 2006 4:46 am

Post by IanC » Wed Dec 06, 2006 2:11 am

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

Post Reply
3 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests