Skip to content

Windowbox transform weirdness + workaround (Houdini/RS) #15

@howiemnet

Description

@howiemnet

A headsup more than anything else, in case anyone else stumbles across this issue:

The window box shader seems to rely on the containing object's transform in its calculations, rather than the current primitive's, meaning it will only render an object correctly if all the primitives within it face the same direction.

To reproduce:

  • Create an XY plane, UV-map it, and apply a material using the windowbox OSL code, the shader will render correctly.

  • If you rotate the plane object (out in the obj context), it will continue to render sensibly; the apparent perspective will shift properly.

  • If you rotate the plane geometry inside the object (in the SOP context) by adding (say) a Transform SOP after the UV mapping, the perspective will not shift properly and when rendered the window "contents" will appear distorted.

This seems to be affected by rotations of the primitives, not translations or scale.

Workaround:

This means that if (eg) you're trying to create a skyscraper with windows on four sides, in any single object you can only create windows that face in one direction; you'll then need to create separate objects (which can be copies or instances of the first "wall" if you like) for the windows facing in other directions. Alternatively, create an object containing one single window, and you can then instance that wherever you like, with whatever orientations you like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions