LuxCoreRender / BlendLuxCore

Blender Integration for LuxCore
GNU General Public License v3.0
729 stars 91 forks source link

Add support for PLY proxy objects #110

Open Theverat opened 6 years ago

Theverat commented 6 years ago

Planned workflow:

Implementation:

Details:

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/56518476-add-support-for-ply-proxy-objects?utm_campaign=plugin&utm_content=tracker%2F80143047&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F80143047&utm_medium=issues&utm_source=github).
neo2068 commented 6 years ago

ToDo List:

Note: Blender decimate modifier is very slow on high res meshes, perhaps it is better to write an own function

Theverat commented 6 years ago

In my opinion you can directly write the PLY export function in pyluxcoreforblender, don't waste time on a Python version. Python is fine for small meshes, but obviously the proxy system will be only used on very heavy meshes, otherwise it's not worth the drawbacks (can no longer edit the mesh, can only link/append when the path is absolute, etc.).

neo2068 commented 6 years ago

I implemented the PLY export with the existing functions of pyluxcore, i.e. Scene.DefineBlenderMesh() and Scene.SaveMesh().

Theverat commented 6 years ago

Ah, nice, I forgot SaveMesh existed. So you create a luxcore scene in an operator's "exec" method, define the mesh, save it, and throw away the scene?

neo2068 commented 6 years ago

Yes, exactly.

Theverat commented 6 years ago

I made some improvements, hope I did not break anything.

Theverat commented 6 years ago

The operator now supports FONT, CURVE, SURFACE and META. (It also skips/restores objects where to_mesh did not create any faces, like for "helper curves").

scrn_2018-06-13_11-48-21

neo2068 commented 6 years ago

Sorry for the delayed Response and thanks for your work. Currently, we are renovating our flat and I have very little time to work on the project. Additionally, I have to use my notebook with Ubuntu (because my windows desktop PC isn't available) which brings other problems during compilation.

Michael

Eneen commented 6 years ago

I'd like to add Indigo renderer workflow here as from my observations it's designed in best possible way.

  1. In contrary to vray and renderman proxies are connected to mesh not to object, so it's possible to assign proxy mesh to any possible mesh and easily replace meshes using blender linking. It's really, really useful to work this way because if you want to replace bunch of trees with different type but you would like to keep positions you just invoke linking and then just rename objects.
  2. You can create any possible simple mesh, even not related to final object, no GUI needed.
  3. You can keep proxies in separate blend file and then just link mesh to main file. It's very easy to change, swap and replace models this way as you don't need blender proxies or group instances just mesh (with proxy info).
  4. Indigo writes it's own .igmesh proxies that contains info about assigned materials (names). Materials that are assigned to objects are automatically passed to proxy (name of material matters), so it's possible to have materials inside scene or inside scene containing decimated mesh and it's easy to work with external materials this way

Here is link to my proxy workflow: https://www.indigorenderer.com/forum/viewtopic.php?t=14056

I can provide screenshots how it's done in UI, but generally speaking it's just path to proxy in mesh properties, that's all.

Theverat commented 6 years ago

That sounds very reasonable, thanks for the input!

Eneen commented 4 years ago

@neo2068 @Theverat here is my forum post regarding solution I've written about: https://forums.luxcorerender.org/viewtopic.php?f=5&t=9&start=660#p17782 I can help with testing/bugreporting.