Weight paint vertices visible from the active camera


(varkenvarken) #1

Hi,

I created a tiny utility that sets the weights of vertices that are in the field of view of the camera. May come in handy if you want to restrict the distribution of particles for example. Details and download instructions in this article.

cheers,

– Michel.


(bls) #2

Really nice and useful, thanks!!


(varkenvarken) #3

The script now can also take into account any objects in the scene that might block the view from the camera.

cheers,

– Michel.


(varkenvarken) #4

Added new functionality: Weight diminishes further away from the camera, an optional margin around the camera frame and a vertex weight edit modifier.

cheers,

– Michel.


(Spirou4D) #5

Hi varkenvarken,

Thanks alot for this new kind of add-on: very nive idea!
Congrats.


(Ray Tracer) #6

Hi.

I’m experiencing two issues clearly visible on the screenshot: there is a bald spot just near the camera and there is a specular weighting also rear the camera!



(varkenvarken) #7

@Ray Tracer: the reflected weights are clearly a bug: i probably forgot to check if the point of intersection with the view frame was negative. I am pretty sure all my testcases were with the camera outside the plane being weighted, so thank you for reporting it!
The bald spot i don’t understand, i don’t think it has to do with the clipping distance (because i do not take that into account) but it might be a precision issue. Can you post the .blend somewhere? (or just tell me what the dimension of the plane and the positions of the plane and the camera are ?


(varkenvarken) #8

I fixedthe reflected weights.The bald spot is not a bug: from the camera view some vertices ‘near your feet’ are in fact not visible, so if you look from the top there is an area around the camera position that is indeed not weighted :slight_smile: (To verify this behaviour: if you increase the field of view of the camera, i.e. decrease its focal lenght, this bald spot will be smaller).

cheers,

– Michel.


(Ray Tracer) #9

Yep, I figured it out :slight_smile:

Thanks for the quick fix!


(Ray Tracer) #10

Hi,

I noticed that having a displace modifier unapplied can lead to strange result, as you can see in the test below.
Applying the displace modifier seems to fix the problem.
Can you look into this?