Bump Map Issue

Please use this forum for general user support and related questions.

Moderator: coordinators

Forum rules
Please include your operating system type/version, LuxRender version and Exporter version used when submitting a support post.

Make sure you have read the Release forum thread for Release and RC (Release Candidates) builds as these threads contain information on known problems and workarounds: Test Builds Forum

Re: Bump Map Issue

Postby forgeflow » Wed Nov 04, 2009 11:51 am

tinus wrote:Surely the C4D exporter can't be messing up the normals like that if you define them correctly while modeling? It would show up in a lot of situations (for example, glass).

I've been working with the latest C4D exporter and everything is golden now - I've not had any flipped bumps or bad looking bumps so far.
forgeflow
 
Posts: 137
Joined: Sun Sep 13, 2009 3:51 pm
Location: Saskatoon, Canada

Re: Bump Map Issue

Postby abstrax » Wed Nov 04, 2009 2:48 pm

Dade wrote:
abstrax wrote:First I thought the same, but no I don't think there should be any conversion thing necessary, except I'm missing something here. A UV coordinate is just defining a location of a vertex in texture space, right? And as long as this position in texture space means the same location in the texture bitmap, it should be fine, shouldn't it? And that's the case here: If I take UV coordinates (0,0) or (1,0) or (1,1) or (0,1) it means the same bitmap location in C4D as well as Lux. But unfortunately the shading goes wrong. So what do I have to do: I have to break the UV coordinates by inverting V and fix it again by inverting V scale. Does't sound right to me, does it?


Abstrax, what about vertex order ? I mean, are you exporting all vertices in a clock-wise or counter-clock wise order ?

Look, this is a rendering done with 2 triangles exported with vertices in the same order:

order1.png


While if I change the order of the vertex indices of one of the 2 triangles:

order2.png


See ? The "sign" of the bumpmapping is inverted :idea:


Sorry, I didn't have time to answer yesterday: I don't think LuxC4D exports the vertices and normals incorrectly. This weekend I looked most of the time at the geometry and forgot about the UV map and didn't get anywhere. I even imported the sphere from the Blender scene and exported it via LuxBlend and LuxC4D and the vertex order of the triangles was the same (just rotated) and the normals were also the same. -> I'm pretty sure it's not that, but tonight I will create an example scene of 2 triangles, that you can then check. Just for sanity.

And flipped normals or triangle orders don't explain why flipping the UV map solved the problem. Flipping the UV map should just, well, flip the texture. It should not change the shading. There is no in- or out-side of a UV map. A UV map is just a mapping of a polygon area to a texture area, i.e. you can calculate a texture position for every point on that polygon. Nothing more. Let me guess, what's going on here: I think when Lux calculates the shading normals, there is an implicit assumption about the clockwise order of the U and V axis of the UV map, mapped onto the polygon (there are 2 possibilities). But it shouldn't make any difference, because the outside of a polygon should be defined by the geometry normals and not by the UV map. If you know, what I mean.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Re: Bump Map Issue

Postby jeanphi » Wed Nov 04, 2009 2:52 pm

abstrax wrote:But it shouldn't make any difference, because the outside of a polygon should be defined by the geometry normals and not by the UV map. If you know, what I mean.

I do agree with you. I'll make a fix for it, hoping it won't break others scenes :)

Jeanphi
jeanphi
Developer
 
Posts: 6624
Joined: Mon Jan 14, 2008 7:21 am

Re: Bump Map Issue

Postby abstrax » Wed Nov 04, 2009 3:06 pm

jeanphi wrote:
abstrax wrote:But it shouldn't make any difference, because the outside of a polygon should be defined by the geometry normals and not by the UV map. If you know, what I mean.

I do agree with you. I'll make a fix for it, hoping it won't break others scenes :)

Jeanphi


Thank you and Dade for looking into this.

Cheers,
Marcus
abstrax
 
Posts: 247
Joined: Sat Dec 08, 2007 3:52 am
Location: Auckland, New Zealand

Previous

Return to LuxRender User Support

Who is online

Users browsing this forum: Bing [Bot], Lord Crc and 2 guests