Texturing Sky Object in Viewport
On 20/03/2016 at 18:17, xxxxxxxx wrote:
Cinema 4D Version: 17
Platform: Mac ; Mac OSX ;
Language(s) : C++ ;
Is there a way to texture a sky object in the viewport from a TagData plugin? We're using a sky object (Osky) to represent our RenderMan dome light and attaching our tag data to the sky. Our dome light can take a color map (HDRI) as a parameter. I want to be able to texture the sky object with the color map for better visualization, hopefully from of TagData plugin's Draw method. Is that possible?
On 21/03/2016 at 03:45, xxxxxxxx wrote:
what exactly do you mean with "Sky" object? One can add a "Sky" object to the scene and assign a material. Such modifications should only be done from the main thread and not from the drawing pipeline (and "Draw" functions).
So if there is no "Sky" object in the scene there is no sky to texture. But what you could do in the "Draw" function of a tag is to draw a textured virtual polygon sky sphere with BaseDraw::DrawTexture(). But what do you do when you have multiple tags with different skies? It might be better to draw something like a sky in the "Draw" function of a SceneHook. See also 2D viewport drawing using a SceneHook.
On 21/03/2016 at 11:06, xxxxxxxx wrote:
OK, thanks, Sebastian. I'll take a look at SceneHook.