Page 1 of 1

ParticleINFO Node

Posted: Wed Dec 11, 2019 9:34 pm
by u3dreal
Hi

I was wondering if it would be too hard to add Particle Info to Lux Nodes.

To get a better understanding of what is going on i would like to add object location to the objectid Node.

Can someone plz give me starting point ?

Thanks u3dreal

Re: ParticleINFO Node

Posted: Fri Dec 13, 2019 12:48 am
by u3dreal
I sure would start somewhere here .... but where does this node get it's information from ?? Sorry as an artist it is really hard to read good code :|

https://github.com/u3dreal/BlendLuxCore ... bjectid.py

Re: ParticleINFO Node

Posted: Fri Dec 13, 2019 2:13 am
by B.Y.O.B.
The file you linked just defines the visibile facade of the objectid texture.
What you want is the LuxCore code: https://github.com/LuxCoreRender/LuxCor ... ect_id.cpp

Re: ParticleINFO Node

Posted: Sun Dec 15, 2019 2:29 am
by u3dreal
Hmm i feared so .... so concerning particles all would have to be done in LUX then.

Re: ParticleINFO Node

Posted: Sun Dec 15, 2019 10:18 am
by B.Y.O.B.
Yes, and in LuxCore there is no concept of particles, they are all just normal objects (sharing the same mesh, aka instanced).
So any information about a particle that you want to store needs to be added to the object data in LuxCore, and it needs to be accessed through the hitpoint struct during render time.

Re: ParticleINFO Node

Posted: Sun Dec 15, 2019 6:15 pm
by u3dreal
Hm ... and particles in lux are just matrices of an instance object. So only the position is saved per particle.

Re: ParticleINFO Node

Posted: Sun Dec 15, 2019 7:52 pm
by B.Y.O.B.
Well, you also get all the other object attributes, like object ID. But yes, particles in Lux are just regular instance objects.