Viewmodel's Render layer?

Is there any way I could get within a viewmodel’s render layer and add/modify objects in there?

If you’re writing a SWEP, yes - use the ViewModelDrawn event.

There’s no documentation on it. How would I use it to say, draw a model inside of the view model?

I would go about it using a render target and the stencil buffer. I’m not quite sure what the code will be like, I’ll have to have a mess around with it later.

You use ClientsideModel. Create the model somewhere, set it to not draw and draw it manually inside the ViewModelDrawn event.

I never thought of that, Is there anyway of making it draw under the Viewmodel?

But that won’t actually act as the view model will it?

By not drawing it manually. It could screw up the model’s FOV, though. From the looks of it, viewmodels have a different FOV than the rest of the world.

Why not? You just have to position the model properly.

Well what I need to do is draw a model inside of the view model (part of it is transparent). Isn’t there a way to do that?