ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Submitted by JokerMartini on Tue, 2012-05-22 09:59
I'm trying to find a way to orient a facing card in a particle system to be always facing camera but be orientated to be parallel to the camera as well. So the bottom and top edge of the facing card matches that of the camera.
I essentially want the particles to act as if they had an Orientation constraint on them so that they are always facing camera but also have the rotation to be parallel on all sides to match that of the camera.
I tried this but its way to intense to do on large particle counts and actually doesn't orient the particles correctly.
pfSys = ($PF_Source_001)
count = pfSys.NumParticles()for p = 1 to count do(
local dum = dummy()
local theTarget = $Camera001-- the target
pfSys.particleIndex = p
pPos = pfSys.particlePosition --get particle pos
tm = theTarget.transform --get the camera matrix3
new_TM = matrix3 tm.row1 tm.row2 tm.row3 pPos
pfSys.particleTM = new_TM
)
Comments
Hope this help
bga
SOLUTION
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Maybe
I think is better to use
matrixfromnormal source.dirthen
source.transformbga
I essentially want the
I essentially want the particles to act as if they had an Orientation constraint on them so that they are always facing camera but also have the rotation to be parallel on all sides to match that of the camera.
I tried this but its way to intense to do on large particle counts and actually doesn't orient the particles correctly.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Please, screenshoots if you
Please, screenshoots if you don't mind.
bga