lyinch wrote: ↑Fri Aug 23, 2019 3:44 pm
I found something strange when exporting from Blender.
The exporter sets (for a scaled object) the following line:
Code: Select all
scene.objects.Mesh_Sphere_140699409946120000.appliedtransformation = 2 0 0 0 0 2 0 0 0 0 2 0 0 0 0 1
".appliedtransformation " defines the the local to world transformation (i.e. it is used to inform LuxCore of the applied vertex transformations):
https://github.com/LuxCoreRender/LuxCor ... s.cpp#L108
This transformation is used for some specific task like applying a procedural textures to several instances in local space (so it looks the same in all of them).
As you have noticed the the vertices are not expressed in local reference frame but already transformed in world reference frame for performance reasons (i.e to save a vector matrix multiplication). Because of this, BlendLuxCore needs to inform LuxCore of the transformations it has applied to the vertices.
lyinch wrote: ↑Fri Aug 23, 2019 3:44 pm
I'm also a bit confused about the relation between objects and meshes.
The idea is that an object is only a binding of a mesh name/material name/etc. with a object name.
A shape/mesh is a set a triangle mesh or a transformation of something (like hairs/fur file, .ply file, etc.) into triangle mesh. The end result is always just a set of triangles (any transformation is done at the reprocessing time).
A shape/mesh doesn't exist in the rendered image until when it is used in an object.