PyLuxCore DefineMesh transform

Use this forum for general user support and related questions.
Post Reply
mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

PyLuxCore DefineMesh transform

Post by mick » Sun May 27, 2018 12:48 am

The transform parameter does not have an effect in my tests. Would you please confirm that it is working and provide a work code snippet.

User avatar
B.Y.O.B.
Developer
Posts: 3555
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: PyLuxCore DefineMesh transform

Post by B.Y.O.B. » Sun May 27, 2018 7:50 am

It works, in BlendLuxCore and in the demo script:

Code: Select all

    # You could pass a transformation matrix here
    transform = [0.7322617173194885, -0.01488767471164465, 0.6808605790138245, 0.0, 
                 -0.1858304738998413, 0.9574531316757202, 0.22079527378082275, 0.0, 
                 -0.6551792025566101, -0.2882045805454254, 0.6983397006988525, 0.0, 
                 -0.18057727813720703, -0.6443891525268555, -1.2408249378204346, 1.0]
    # You could pass UV coordinates, vertex colors and other stuff here, additionally
    scene.DefineMesh(mesh_name, vertices, faces, None, None, None, None, transform)
The matrix must be in column-major format: viewtopic.php?f=3&t=352&p=4012&hilit=column+major#p4012

Can you post your code?
Attachments
pipeline_tonemapped.png

mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: PyLuxCore DefineMesh transform

Post by mick » Sun May 27, 2018 9:03 am

Thanks, it works now.

Column-major is really worth noting in the SDLM.

Post Reply