Linking Text to MParticles


#1

I have MParticles surrounding a VR Camera. I have to put the names of 3 separate particles as text in front of one of each particle. Since the scene is 360 degrees VR I can’t simply add the text in post. I need to place it in front of the particle as a text object. The only way I can come up with is placing it manually and move it at some keyframes, but the text doesn’t follow the object perfectly as linked or tracked. Particles have numbers on them. I wonder if I can link a text object to lets say particle no 190.

Note: Particles are rotating but the text must follow without rotation.


#2

change the text’s position controller to postion script, then reset the script to
PF_Source.getParticlePositionByID id
PF_Source is your MParticles , use what your scene has , such as $'PF Source 001'
id is the id of the particle , check it by checkedshow particle ids in display operator
the default pos is mesh’s pivot , you can add a point3 value to set front of mesh


#3

Thank you for the response AEI.
I get this error when I write the text as in the picture and press evaluate. (I’m not very much familiar with scripts) What am I doing wrong here?


#4

you just didn’t know anything about script , you lost the string before particle’s name


#5

I’m really clueless here??:flushed: Some more explanation?


#6

I had explanated how you need to use


#7

You need to use $’’ around your PF source name, so :

$‘PF Source 001’.getParticlePositionByID 173

Not sure why are you adding underscores, unless you renamed your source like that, you don’t need them.


#8

Thank you both. :relaxed: Missed the $ while being unnecessarily concerned with whether I should create some variable in the interface.
And about the underscores, yes, I’ve actually added the underscores to the PFlow Object name. Apparently for no reason. :joy::joy:


#9

I have an weird issue in this scene, might be related with Corona Render’s 360 degree camera.

I’m rendering this scene for VR. It is stated that Corona Camera can’t preview 360 degrees in the viewports.

When I turn on Interactive Render and move the time slider just once, objects in the viewport jumps to their correct place in rendering. I determined my appropriate IDs when Interactive Rendering was on.
Texts appear in place during Interactive render window is on but , they jump back to an incorrect location as I click on anything after I stop the Interactive Render.

Any ideas?