Hi, Im getting into emRPC right now, I'm in the prestages of production, and one of the things that I really must have is vector -shading that goes together with reelsmart motion blur and emRPC.
Problem is, I cant really find any way to color particle based on velocity - In camera space. I've started tinkering with a home brew solution myself. But time is running short and if there is a compound that does the trick already, it would be really awesome.
Camera Space vector-coloring compound?
-
Hirazi Blue
- Administrator
- Posts: 5113
- Joined: 04 Jun 2009, 10:15
Re: Camera Space vector-coloring compound?
Stay safe, sane & healthy!
-
rray
- Moderator
- Posts: 1810
- Joined: 26 Sep 2009, 13:51
- Location: Bonn, Germany
Re: Camera Space vector-coloring compound?
(just saw Hirazi's post which solves that, posting nevertheless...)
You could try this :
1. Extract the rotation from the camera "kine global" matrix (using matrix to srt)
2. Invert that
3. multiply the velocity vector with the matrix resulting from step 1&2
This should put the velocity vector into camera space, at its current location. After that it should be just a matter of rescaling the result's X and Y components to get the color.
Problem with that approach is that vectors will be a little off the further they're away from th FOV center (edit... above post takes care of that
)
another edit... I just noticed in the article Hirazi linked too I'm credited too much ;) ... most of the math stuff I did in that plugin is based on code by Glen Frazier.
You could try this :
1. Extract the rotation from the camera "kine global" matrix (using matrix to srt)
2. Invert that
3. multiply the velocity vector with the matrix resulting from step 1&2
This should put the velocity vector into camera space, at its current location. After that it should be just a matter of rescaling the result's X and Y components to get the color.
Problem with that approach is that vectors will be a little off the further they're away from th FOV center (edit... above post takes care of that
another edit... I just noticed in the article Hirazi linked too I'm credited too much ;) ... most of the math stuff I did in that plugin is based on code by Glen Frazier.
Last edited by rray on 08 Aug 2012, 09:36, edited 1 time in total.
Reason: this just in
Reason: this just in
softimage resources section updated Sep 26th 2026
-
forsgren
- Posts: 13
- Joined: 12 Jul 2012, 16:30
Re: Camera Space vector-coloring compound?
It worked like a charm. Thanks alot guys. 