Page 68 of 92

Re: BlendLuxCore Development

Posted: Mon Dec 16, 2019 11:56 am
by neo2068
B.Y.O.B. wrote: Mon Dec 16, 2019 11:41 am
neo2068 wrote: Mon Dec 16, 2019 11:25 am I am working on multiple UV map and vertex color support for the Blender addon.
Nice!

However, I would not add the UV dropdown as a property of the image texture.
It is a property of the 2d/3d mapping, see viewtopic.php?f=5&t=1558#p17979
So it should be added to the 2d/3d mapping nodes (3d mapping should only show it in the UI if the mode is set to "UV").
It is both. You could use the textures without adding a 2d mapping. Then a default mapping is exported with the selected uv map. If you add a 2d mapping, the uv map of the first mapping node is used and the uv map selection of the texture is deactivated.
2d mapping node.jpg

Re: BlendLuxCore Development

Posted: Mon Dec 16, 2019 12:26 pm
by B.Y.O.B.
Ah I see, that's good for usability.

Re: BlendLuxCore Development

Posted: Mon Dec 16, 2019 4:15 pm
by epilectrolytics
B.Y.O.B. wrote: Sun Dec 15, 2019 7:50 pm Working on the mesh pipeline, aka shape modifiers in LuxCore:
This is looking very promising, v2.3 is going to be a killer release with these features!

B.Y.O.B., in cycles the mapping nodes have got accessible sockets (transform, scale, rotate) which makes it possible to distort fractals with other fractals.
Any chance this can get implemented in Lux mapping nodes too?

Re: BlendLuxCore Development

Posted: Wed Jan 08, 2020 11:50 pm
by B.Y.O.B.
In the course of the 2.8 port of the addon, the dupli export got swept under the rug a bit (it got a lot slower).

Now I have pushed a first commit of the work on faster instance export.
Some stuff is currently broken, for example moving an instanced object in the viewport will cause it to be re-exported and appear duplicated during the rest of the viewport render session. Also, hair on duplis is not yet exported. If you find anything else, please report.

Here's a scene with 20,000 instances distributed via particles.
Old export time: 7.6 sec
New export time: 0.7 sec
(export time without instances is 0.1 sec)

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 1:18 am
by juangea
1 million instances around 26 seconds :)

Great work!

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 3:33 am
by B.Y.O.B.
Btw, this new implementation doesn't stop at particles, it applies to almost all kinds of duplis/instances: dupliverts/faces, particles, collection instances etc., only objects with shared meshes (alt+D copies) are not accelerated by it.
So it doesn't matter if you put 10,000 chairs in a room via particles or via collection instances, they should both export in the same time.

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 10:16 am
by juangea
Awesome.

What do you think about what I told you, the possibility to export in parallel several objects with particle systems to accelerate the particle export.

I mean, when I export 1 object with 2 million particles and a simple sphere instanced it takes around 26 seconds, if I split that in for objects with 500.000 particles each the export time is the same.
I assume there is a time limitation imposed by having to deal with Blender particles, and I saw that it works in a single thread, do you think there is a possibility to accelerate this kind of export by using several threads or workers?

Thanks for this again!

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 10:31 am
by lacilaci
Great improvements...
Anyway, I think particle overhaul from blender devs need to come first then luxcore can benefit from that. I imagine they will break how a lot of stuff in particles work now. By the way, do you also plan to improve the hair export and ALT+D instances?

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 10:46 am
by B.Y.O.B.
juangea wrote: Thu Jan 09, 2020 10:16 am What do you think about what I told you, the possibility to export in parallel several objects with particle systems to accelerate the particle export.
The problem is, Python is inherently single-threaded, so it's not possible there. And the DuplicateObjects() function in LuxCore is single-threaded as well, and I don't know if it can be multithreaded with reasonable amount of work (Dade?).
lacilaci wrote: Thu Jan 09, 2020 10:31 am Anyway, I think particle overhaul from blender devs need to come first then luxcore can benefit from that. I imagine they will break how a lot of stuff in particles work now.
The nice thing is, this implementation is now completely agnostic to Blender particles, thanks to Blenders new depsgraph. I get handed an iterator with instances, and I don't even know if they are created by dupliverts, particles, collection instances or something else. So if they change their particle system, most likely we won't even have to change anything in the addon code.
lacilaci wrote: Thu Jan 09, 2020 10:31 am By the way, do you also plan to improve the hair export and ALT+D instances?
Hair export is already done mostly in C++, it's pretty much maxed out (the last Python parts can't be moved to C++).
About Alt+D instances, they are not a priority for me right now. It might be possible to accelerate them a bit (at least when no deforming modifiers are used on them), but usually you don't have tens of thousands of them in a scene. The other methods for instancing produce more stuff I think.

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 11:04 am
by lacilaci
B.Y.O.B. wrote: Thu Jan 09, 2020 10:46 am About Alt+D instances... ...usually you don't have tens of thousands of them in a scene. The other methods for instancing produce more stuff I think.
The problem here is that I might have an object with ~600K poly's that I might only need 4-8X in the scene. Say an chair and table in a restaurant for example. I won't use particles cause I still need exact placement etc about the mesh but still it's near 10x the poly it needs to be. This might be a case for many commercial spaces that need repetitions and yet some control too...

I wonder though. What If I link collection and then duplicate that (regular copy of linked collection) is that instanced or adds to polycount? Cause that might solve my issue too.