Emulating Bump Maps
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/09/2003 at 01:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.200
Platform: Windows ;
Language(s) : C++ ;---------
Hi,for the Cg-based hardware renderer I'm developing I need to know how the bump map computation is done in Cinema 4D. At the moment I'm building the normal vectors using differences between neighboring pixels of the bump map, weighted by the texture size. But this does not look precisely like the original.
In Cinema 4D, there seems to be some smoothing involved, an interpolation across several pixels. In addition, the more I experiment with Cinema 4D's bump mapping, the more I suspect that in some situations there is just some kind of faked relief shading, no full computation of normals and lighting.
Thanks for any insider information.
Jörn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/10/2003 at 03:09, xxxxxxxx wrote:
I'll ask the programmers.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/11/2003 at 06:10, xxxxxxxx wrote:
Hi,
any results yet?
Maybe I'll put my question more detailled:
* How is the gradient of the bump map computed? Across two pixels? Or three? Any smoothing here? How is the map resolution (MIP?!) determined at which the differences are evaluated?
* Most important: How is the normal vector actually distorted? Which local coordinate frame is used? {ddu, ddv} or {n x ddv, ddu x n} or ... ? Is the vector rotated (exact solution) or just deformed by adding a small offset and normalizing again?
Thanks in advance!
Jörn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/11/2003 at 01:10, xxxxxxxx wrote:
The answer I got was that the code is several thousands lines of code and cannot be published. The sampling itself consists of a multitude of methods.
Generally the normal vector is calculated using n' = !(n + (right_sample-left_sample)*ddu + (bottom_sample-top_sample)*ddv);
Finally, in R8.5 some things have been changed so the bumping will behave slightly different in some situations. (Will be explained more in the 8.5 SDK Docs.)
I'm afraid this isn't much of a help... -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/11/2003 at 01:43, xxxxxxxx wrote:
Hi,
quite on the contrary! That's a lot of what I wanted to know. I could have imagined much more sophisticated solutions.
Is there any info about how ddu and ddv are computed? Up to now I use linear approximation over the uv coordinates of the immediate neighbors of a vertex.
Regards
Jörn
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/11/2003 at 07:45, xxxxxxxx wrote:
No direct information available about that, but I don't think there's much else you can do that interpolate between the available UVW on the vertices.