BlendLuxCore Development

Discussion related to the Engine functionality, implementations and API.
neo2068
Developer
Posts: 146
Joined: Tue Dec 05, 2017 6:06 pm
Location: Germany

Re: BlendLuxCore Development

Post by neo2068 » Mon Dec 16, 2019 11:56 am

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
i7 5820K, 32 GB RAM, NVIDIA Geforce GTX 1080 + GTX 780, Windows 10 64bit, Blender 2.81a
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 3169
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: BlendLuxCore Development

Post by B.Y.O.B. » Mon Dec 16, 2019 12:26 pm

Ah I see, that's good for usability.

User avatar
epilectrolytics
Donor
Posts: 652
Joined: Thu Oct 04, 2018 6:06 am

Re: BlendLuxCore Development

Post by epilectrolytics » Mon Dec 16, 2019 4:15 pm

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?

User avatar
B.Y.O.B.
Developer
Posts: 3169
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: BlendLuxCore Development

Post by B.Y.O.B. » Wed Jan 08, 2020 11:50 pm

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)
Attachments
instances_new_0.7sec_export.jpg

juangea
Donor
Posts: 70
Joined: Thu Jan 02, 2020 6:23 pm

Re: BlendLuxCore Development

Post by juangea » Thu Jan 09, 2020 1:18 am

1 million instances around 26 seconds :)

Great work!

User avatar
B.Y.O.B.
Developer
Posts: 3169
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: BlendLuxCore Development

Post by B.Y.O.B. » Thu Jan 09, 2020 3:33 am

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.

juangea
Donor
Posts: 70
Joined: Thu Jan 02, 2020 6:23 pm

Re: BlendLuxCore Development

Post by juangea » Thu Jan 09, 2020 10:16 am

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!

User avatar
lacilaci
Donor
Posts: 1814
Joined: Fri May 04, 2018 5:16 am

Re: BlendLuxCore Development

Post by lacilaci » Thu Jan 09, 2020 10:31 am

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?

User avatar
B.Y.O.B.
Developer
Posts: 3169
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: BlendLuxCore Development

Post by B.Y.O.B. » Thu Jan 09, 2020 10:46 am

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.

User avatar
lacilaci
Donor
Posts: 1814
Joined: Fri May 04, 2018 5:16 am

Re: BlendLuxCore Development

Post by lacilaci » Thu Jan 09, 2020 11:04 am

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.

Post Reply