-
-
Notifications
You must be signed in to change notification settings - Fork 43
Architecture
C-ray uses shared, global arrays for polygons, vertices, texture coordinates and normals. You don't have to worry about this, as all the management is already complete and (somewhat) tested. This choice was made to simplify memory management.
Thus, the mesh
data structure only has to keep track of an offset, and amount of a given element belonging to it, like so:
int vertexCount;
int firstVectorIndex;
C-ray doesn't use local coordinates for vertex data. All objects are transformed within the global coordinate system.
This is something that I'm looking to change, since any models you export from, say, Blender, will be mirrored on one axis.
In C-ray, X is right, Y is up, and Z is forward by default.
C-ray does not support object instancing at this time. Meaning if you want multiple instances of the same mesh, you just have to load it in multiple times (thus consuming more memory) This is just to keep things simple, but I'm open to improvements on this regard.
The transform system, again, is very simple. You can rotate models, scale them and move them around using numeric coordinates and degrees. Transforms are computed and applied on the actual source coordinates, before rendering.
The material system is still very limited. You can't mix shaders, and there's only a few shaders that aren't very realistic. Something to work on!