Page 69 of 92

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 11:15 am
by B.Y.O.B.
Ah, I misunderstood you. Alt+D instances are already instanced in BlendLuxCore, they are just not going through the DuplicateObjects() function. But their mesh is only exported once (when no deforming modifiers are used).

Anyway, I haven't created many scenes lately, but I do put single chairs or tables into collections and then instance them with collection instances.
It's nice because you can later add objects to the collection, e.g. some elements to a chair, and they automatically appear on all instances as well. And I can use modifiers on them, like subsurf or so, and still be sure they are instanced in the renderer (be that Cycles or LuxCore).

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 11:36 am
by marcatore
B.Y.O.B. wrote: Thu Jan 09, 2020 10:46 am 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.
My daily scene is the kingdom of the Alt+D. I have not so much base objects duplicated many and many times.
I can't imagine another way to take a relative small filesize and to organize my job.
I can make "bigger" furniture modules attaching more elements but it's not so flexible and, in anycase, I have to repeat them many times.

Every kind of speeding up on export is more than welcome.

EDIT: Sorry, I've see you reply after I've posted. So it's already at it best as export speed. right?
Interesting the collection instancing. I'll give it a test.

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 11:56 am
by juangea
@marcatore I recommend you to create a collection with each chair you need to duplicate and then duplicate it with an instanced collection, this will give you the best performance in both viewport and render :)

(I think it's what @B.Y.O.B. said)

Re: BlendLuxCore Development

Posted: Thu Jan 09, 2020 12:09 pm
by lacilaci
B.Y.O.B. wrote: Thu Jan 09, 2020 11:15 am ... but I do put single chairs or tables into collections and then instance them with collection instances.
It's nice because you can later add objects to the collection, e.g. some elements to a chair, and they automatically appear on all instances as well. And I can use modifiers on them, like subsurf or so, and still be sure they are instanced in the renderer (be that Cycles or LuxCore).
Ok, thank you. This is important. If duplicated collections in master scene are instanced for luxcore then I'm safe. :lol:

Re: BlendLuxCore Development

Posted: Tue Jan 21, 2020 12:16 pm
by Sharlybg
Please any possibility to display full number in node socket for value like :

100000000 or 0.00000001

Re: BlendLuxCore Development

Posted: Tue Jan 21, 2020 1:31 pm
by u3dreal
Sharlybg wrote: Tue Jan 21, 2020 12:16 pm Please any possibility to display full number in node socket for value like :

100000000 or 0.00000001
Yes it has to be stated when the gui draws the property.

Code: Select all

bpy.props.FloatProperty(name="", description="", default=0.0, min=-3.402823e+38, max=3.402823e+38, soft_min=-3.402823e+38, soft_max=3.402823e+38, step=3, precision=2, options={'ANIMATABLE'}, tags={}, subtype='NONE', unit='NONE', update=None, get=None, set=None)
precision is the one here up to 6 decimals is possible. default is 2

Code: Select all

precision (int) – Maximum number of decimal digits to display, in [0, 6].
In our case this would have to be added to sockets.py in line 32 if i understand right.
so

Code: Select all

layout.prop(self, "default_value", text=text, slider=self.slider)
becomes

Code: Select all

layout.prop(self, "default_value", text=text, slider=self.slider, precision=6 )
Would it make sense to come up with a global PRECISION variable that could be set in the prefs panel ?

But it is a tradeoff since 1.0 would be displayed as 1.000000

Re: BlendLuxCore Development

Posted: Tue Jan 21, 2020 1:33 pm
by B.Y.O.B.
Sharlybg wrote: Tue Jan 21, 2020 12:16 pm Please any possibility to display full number in node socket for value like :

100000000 or 0.00000001
For big values, you can try to make the node wider, it should help in most cases.
For very small values, we need a feature in Blender to automatically show more decimal places as needed, because the way it works now, we would have to show 8 decimal places everywhere all the time. That's how it was in the old LuxBlend, and I did not like that, it makes everything hard to read:

Re: BlendLuxCore Development

Posted: Tue Jan 21, 2020 1:37 pm
by B.Y.O.B.
u3dreal wrote: Tue Jan 21, 2020 1:31 pm In our case this would have to be added to sockets.py in line 32 if i understand right.
No, you can't change the precision during UI drawing unfortunately, it has to be specified when the FloatProperty is declared. So, for example in line 180 in sockets.py: https://github.com/LuxCoreRender/BlendL ... ts.py#L180

Re: BlendLuxCore Development

Posted: Tue Jan 21, 2020 1:38 pm
by Sharlybg
But after 0.001 the last number is always invisible no matter how wide the node is.

Re: BlendLuxCore Development

Posted: Tue Jan 21, 2020 1:45 pm
by B.Y.O.B.
Sharlybg wrote: Tue Jan 21, 2020 1:38 pm But after 0.001 the last number is always invisible no matter how wide the node is.
Yes, making the node wider only works for big numbers, not small ones.

I have now pushed a commit that changes the UI precision from 2 to 3 decimal places for node sockets (same as Cycles uses).