Current stable version: 0.1.1

Instances, proxies or other repeatable mesh data management system

Project:YafaRay
Version:0.1.x
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I think that Yafaray needs badly some system, like proxies in vray or instances in luxrender. Its very useful for mesh objects, which appears many times in a scene like grass blades, trees, other kind of vegetation.

 Now each vertex is exported separately, so the exporting takes hours and the memory usage is huge (yafaray is a 32bits software, and I sometimes hardly fit into 2GB limit of 32bit app on 64bit system with LAA Flag). I've checked the XML output, to be sure.

This option is needed for rendering architectural exteriors or semi exteriors. I will mention Anton Cherenko, who won a Honorable Mention in GH House competition, and writes here http://www.ronenbekerman.com/making-of-3d-render-gh-house-anton-cherenko/ how he modeled his scene.  The guy who won the competition,  Bertrand Benoit, normally uses lots of vegetation in his scenes.

I am not a coder and I don't know how to implement it in the code of yafaray, but it is already done in luxrender and the source is available, so the algorithm already exists and we need to applicate it.

The XML code output would need to be changed a bit. My proposal is to modify the mesh section, adding a mesh object name from blender (is it accessible from python?, it must be done somehow in the luxrender), after all the meshes are exported, add a new object definition marker, and define objects with mesh data already loaded into memory.

 

Example:

<mesh vertices="8" faces="6" has_orco="false" has_uv="false" type="0" mesh_name="Cube">
   here goes the vertex data
</mesh>

<object mesh_name="Cube">

here goes data defining the position and rotation, relative to mesh position and rotation 

</object> 

Later in the development, we can consider adding a new switch to GUI, which will toggle auto mesh exporting function, so all the mesh data would be stored in other file eg. yafarayRender_mesh.xml and linked in main file. This would let the user to change the material, lighting and rendering settings and re-render the scene without waiting for all the geometry do be exported.

The next step could include the mechanism to reuse previously exported meshes in scenes, so the ability to load a mesh.xml file into GUI, the position in scene can be defined by the Empty object, with yafaray GUI setting Object -> Enable Proxy Positioning switch, input field:proxy_name (the name of mesh exported in the mesh file). But this stage will also require to link separate xml containing material data for the proxies.

 

Best regards

dangerous.cube

 

Comments

#1

Since people on blender start to run wild with Blender 2.5 instancing I figure that feature is really needed.

 

341 mill faces example on blenderartists

[url=http://www.Kunden-besser-informieren.de/]Kunden-besser-informieren.de[/url]

Images posted by me are solely posted for the purpose of the yafaray project. Any other commercial or non-commercial use, modification etc. of my images and its content requ