Emitting omni lights from a particle system

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2008   #1
Emitting omni lights from a particle system

anyone have any ideas on how to achieve this?
 
Old 03 March 2008   #2
Psychosilence has a cool script operator that assigns an already created lights to each particle.

IE if you have ten omni lights it will assign those ten omni lights to the first ten particles.

HERE

You'll have to either rename your lights or modify the script.
__________________
poof ~>Vimeo<~

Last edited by JohnnyRandom : 03 March 2008 at 05:16 PM. Reason: Clarification
 
Old 03 March 2008   #3
Awesome, that's exactly what I wanted to do.

However, now I have a follow-up question.

When I try to export the position of the light, it's showing up at the same starting position for every frame, ( which happens to be where the PF emitter is located). Now, I'm assuming this is the case because the position of the light is being handled through Particle Flow.

So my next question is how do I get the world XYZ position of the light to export properly?

Thanks guys.
 
Old 03 March 2008   #4
I am a little dense today, So I am having a little difficulty understanding what you are asking.

Not sure what you mean by "export the position". Do you want the position data for use in a scripted operator?

Or a different birth position for each light? As in you change you position icon to a box or sphere and change the location to volume. Or use a non-renderable position object and select verts, edges, or faces.
__________________
poof ~>Vimeo<~
 
Old 03 March 2008   #5
Well, I want to export the position data of the lights to use in After Effects. I've tried it using the plug-in Max2Ae. Using the export function, as well as the save to .txt file, where it just saves out the position data for every frame of an object.

In both scenarios, it has the birth position for every frame, and not the actual position of the lights. I guess it's just because it's looking at the position of the emitter, and doesnt keep track of each particles true position in world space.

Hope that kinda clears things up, and thanks for your help so far.
 
Old 03 March 2008   #6
Sorry I have never used Max2ae. You may want to ask the developer.

If it gathers all of the object position data per frame, then the lights positions per frame should be recorded to, I would think. The Omni light is still an Omni light as far as max sees it.

Playing around: THis will print each omni lights position, each frame to the listener window.
rollout LightPos "Print Light Position"
 (
 button doit "Process Scene" 
 
 progressbar doit_prog color:yellow
 
 on doit pressed do 
 (
 	t = animationRange.end + 1f
 	a = t.frame as integer
 	light_array = lights as array
 	sliderTime = animationRange.start
 	format "Current Frame:% \n" currentTime
 	Print light_array
 	select lights
 			for i = 1 to a do
 				(
 				doit_prog.value = 100.*i/a
 				sliderTime = currentTime + 1f
 				p = light_array 
 				format "Current Frame:% \n" currentTime 
 				print p
 				)
 )
 
 )
 
 createDialog LightPos 200 60 
__________________
poof ~>Vimeo<~

Last edited by JohnnyRandom : 03 March 2008 at 07:52 PM.
 
Old 03 March 2008   #7
I'm having a little trouble getting this script to work. I'll admit I'm not that fmailiar with scripting and programming, so forgive me.

I inserted a new Script Operater in the particle flow and pasted that script in there. Was that the correct way to do that?

I'm also getting an error

-- MaxScript Error
-- Syntax error: at rollout, expected tool clause:
-- In line: rollout L

I don't really know waht that means, or how to fix it.
 
Old 03 March 2008   #8
The script I posted is just a regular maxscript. Go the maxscript menu and create a new maxscript, then copy/paste the what I posted to the blank maxscript. Then just evaluate the script (maxscript window, tools menu>evaluate) or save/run it.

A little dialog should popup and have a button on it that says "process scene" when you hit the button it will evaulate each lights position, print the frame number and the result in the maxscript listener window (hit the F11 key to open the listener then you must enable the maxscript listener via macrorecorder menu>enable)
__________________
poof ~>Vimeo<~
 
Old 03 March 2008   #9
oh wow, yeah that worked great. it displayed all the correct position data for the lights. Now I just have to get it in a format that Ae can read.

Thanks for all the help!
 
Old 03 March 2008   #10
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:18 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.