Привет Алексей,
>Кстати, в генерируемом слимом шейдере calculatenormal в конце стоит.<
Хорошо, что проверил. Однажды, по моему Kidd, был вынужден шаманить со слимовским shader, двигая Ka или Ks.
Ну, ближе к телу. Не зря все-таки Andrew V.K. тебе советовал почитать описание rendering pipeline. Потому как, не обижайся только на критику, я чесслово по дружески, в книгу ты смотрел, но увидел ... не все.
Первое, что такое аттрибут "displacementbound"? Читаем PhotoRealistic RenderMan 3.9 User's Manual
4.2.2. Displacement Bounds
This is a control that increases the sizes of calculated bounding boxes on primitives in order to account for the effects of displacement mapping. The size is specified by identifying a single floating-point value which is the radius of a sphere which is guaranteed to contain the maximum possible displacement, and the name of the coordinate system in which this sphere resides. This value should be as tight as possible. It is extremely inefficient, both in terms of memory usage and calculation time, to specify a bounding sphere which is larger than the actual displacement. Therefore, this sphere should be as small as possible without permitting points on the object to displace farther than the sphere's radius.
Чуешь? Сфера, с радиусом равным "displacementbound" [#]. Догадайся, с трех раз, где центр сферы? Теперь, ты ставишь значение 500, делая диаметр сферы = 1000 units. А досочка твоя 50000x50000. Выводы?
Теперь "extrimdisplacement". Читаем там же.
4.1.7. Extreme Displacement
When the displacement of an object on the screen is very large, that is, the displaced point is far from the original point, PhotoRealistic RenderMan invokes a special displacement procedure in order to save large amounts of memory at some additional computational cost. When this occurs, the error message:
Extreme displacement encountered (WARNING)
is generated. The maximum permissible displacement before the special procedure is invoked is measured in vertical scanlines. If this value is increased, larger displacements are permitted to use memory rather than incur the additional computation. If this value is decreased, memory usage is minimized even for less severe displacements. The default for this value is 32 scanlines, and can be changed with the following option:
RtInt ed = 24;
RiOption("limits", "extremedisplacement", (RtPointer)&ed, RI_NULL);
>Если я правильно понял - из за сильного дисплейса на больших объектах могут возникать потери информации о сдвиге микрополигонов именно в далеке от камеры и , якобы, этот атрибут может помочь этой потери избежать.<
К сожалению, нет. Это величина by default 32 vertical scanlines, которая является пределом для displacement, споецированного на экран, при вычислении shading. Если она превышена, то Renderman вызывает special displacement procedure, чтобы съэкономить память, за счет дополнительных вычислений. То есть сначала оценивается real displacement, а потом shading считается заново, но с новыми, сохраненными в памяти значениями displacement bounds. Только, если часть объекта за пределами displacement bounds, эта техника уже не поможет закрасить черную дыру.
Еще настоятельно рекомедую перечитать и переосмыслить то, что пиксаровцы написали о важности различных координатных пространств и трансформаций м/у ними. Избавит от многих головных болей, даю голову на отсечение.
P.S. Насчет советов, как сделать. Мой профессор говаривал, что если взять пять инженеров, дать одно и то же задание, то, в итоге, получишь пять разных машин.