C-Ray - Camera Raycast Tool

3 votes
Date Updated: 
Author Name: 
Merlin Prokasky

Tool for creating eye-rays for a camera

Easy and fast way to make raytracing visible. You can see what will be reflected on the selected face BEFORE you've ever pressed the render button.
This is very usefull at the lighting process to place lights and reflectors.
Sometimes you will be surprised were the rays trace to.


The tool creates rays (splines), which are traced from the camera over the selected faces of an object.
PolyMesh-objects automatically receive an Edit_Mesh-modifier, which will be removed removed automatically.
The lenght of the rays can be chosen by the user.
The ray shows the raytracing paths of the camera. This helps i.e. by placeing objects which should be reflected at a certain face of an object.
The count of the created rays can be limited for not getting too much of it by selecting all faces of an object.
The Animation of objects and cameras can be baked into the Eye-Rays.
All created Splines are stored on a special layer and can bee deleted by the tool.


- select camera and object
- select the wanted faces of the chosen object for raytracing
- set the lengh of the rays
- create rays
- when camera or object is animated, set range and bake animation
- delete rays after finishing work


- download both scipts
- copy "camraytool_v3.01.mse" to the local Max-Scipts-Folder
- run "scriptloader_c-ray.ms", browse for "camraytool_v3.01.mse" and evaluate it
- choose C-Ray under "Customize", "Customize User Interface", "Toolbars", Category: "merlinScritps"
- drag&drop C-Ray to your toolbar

Version Requirement: 
should work from 3ds Max 2010
camraytool_v6.01.mse14.71 KB
scriptloader_c-ray.ms988 bytes


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dennisqdw's picture

Way cool

Wish I'd had this for years. And it works with vray cameras too!

merlinpy's picture

ScriptLoader Bugfix

Hi MH,
thanks for your message! I've fixed the issue and updated the scriptloader.
Please download it again and retry.

MH's picture

Unable to convert: undefined to type:FileName

Hey Merlin,

this script is exactly what I need! :-)
Unfortunately I can't run it on my max 2014. When I click on the "C-Ray-Button" this maxscript Error message appears:
"--Unable to convert: undefined to type:FileName"

In the MAXScript-Window, code line 7 ist selected:
"if (doesFileExist sFile) then (fileIn sFile)"

Is there anything that I did wrong?

merlinpy's picture


Hi folks,
thanx for the feedback! You have some interesting ideas.

I've had the time to add the option of baking the animation of cameras and objects into the Eye-Rays. Please download the new version and check the new "bake animation" button.
The "trace-mode" the wobi recommended should be possible but will take some more time.
The bug of the scriptloader should be fixed in the new version.

I will keep you informed about new features!

MLB's picture


would it be possible to make this auto-update at each frame of an animation?

visualizer's picture

Good shot

Hey... awesome..! I am into engineering field and I know potential of this tool... fantastic boy! :)

wobi's picture


Hey, nice tool. I have been waiting for something like this quite a while. What would make it much more useful for me is if there was the possibility to trace the rays be picking points out of the camera perspective.
So having push button to activate "trace mode" or something like this. So it would not rely on selected faces but to directly pick positions in screen space, so that rays are traced at this position. Just like using "place highlight"... hope you get what I mean...

Greets Ben

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.