<p>You can do this by writing a renderer plugin for 3ds Max. This gives you the same kind of access as the built-in renderers, including a settings dialog, a preview window, and an interface where you can write the final frame of a full render (and 3ds Max will write it to the output file). The renderer plugin gets full access to the scene graph when the user hits "Render" (or when the preview window is in use). Any complex geometry (such as subdivision surfaces) will already have been converted to a triangle mesh for you.</p>

<p>PaulHK already linked the official <a href="http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-SDK-Programmer-Guide/index.html?url=files/GUID-40ED5D02-BBCF-4EE3-9EE7-E59425B49CBB.htm,topicNumber=d30e2631" rel="noreferrer"><em>Programmers' Guide</em></a> online. You'll also find it in the help files that are installed with 3ds Max, along with sample source code for a trivial renderer plugin. Because your plugin needs to link against the 3ds Max SDK, you'll need to compile it with the same version of Microsoft Visual Studio that was used to compile the particular version of 3ds Max you're targeting. (This means that if you want to target multiple versions of 3ds Max, you might need multiple builds.) Again, how to do this is described in the Programmers' Guide.</p>

CC BY-SA 3.0
2017-02-17T07:38:37.913Z
What do you think would be faster and easier to implement? Using the MaxSDK or using Asslmp to import the scenes into my ray tracer? If I use the Asslmp method will it just import geometry will I have to define materials & textures myself?
Arjan Singh
CC BY-SA 3.0
2017-02-17T09:59:17.703Z
AssImp imports materials and uvs. IIRC AssImp uses a key/value system for materials, so it can handle every material parameter type you can imagine. For me personally, I would prefer to import via AssImp, I hear MaxSDK can be frustrating.
PaulHK
CC BY-SA 3.0
2017-02-17T11:05:58.453Z
Yeah, I've worked with the Max SDK before. It's badly designed and implemented, full of pitfalls and undocumented "features", and a lot of the sample code doesn't work. I'd recommend avoiding it if you can. That said, I don't know how good AssImp is, and I don't know if it will evaluate materials for you or if you'll have to reimplement all the materials yourself - and of course I wouldn't expect it to work with other Max shader or light plugins.
Dan Hulme
CC BY-SA 3.0
2017-02-16T16:47:12.630Z
2017-02-16T16:47:12.630Z
Dan Hulme
<p>If I want to use my own Ray Tracer in a program like 3DS Max to render geometry, how could I do this? Can someone explain to me what I need to do and where I can learn to use an SDK to make this happen? Is this worth it to render test scenes to compare and test my ray tracer?</p>

CC BY-SA 3.0
2017-02-16T08:05:48.203Z
Have you checked the MaxSDK ? I imagine here may be a good start > http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-SDK-Programmer-Guide/index.html?url=files/GUID-40ED5D02-BBCF-4EE3-9EE7-E59425B49CBB.htm,topicNumber=d30e2631
PaulHK
CC BY-SA 3.0
2017-02-16T08:07:52.733Z
Alternatively you could use the open source AssImp library to import scenes and render them inside your own program, rather than getting your program to interoperate with Max, which I guess would involve more effort.
PaulHK
CC BY-SA 3.0
2017-02-16T19:15:53.963Z
What would you like to compare your scenes with? With the output of the internal 3DS Max renderer? I was told by a Corona developer that the MaxSDK was painful to work with and also not well documented (at least in previous versions), so be prepared for that ;-)
ivokabel
<raytracing>
How to use my Ray Tracer in 3DS Max
Arjan Singh
# How to use my Ray Tracer in 3DS Max

(Asked by: username_0 on 2017-02-16)

If I want to use my own Ray Tracer in a program like 3DS Max to render geometry, how could I do this? Can someone explain to me what I need to do and where I can learn to use an SDK to make this happen? Is this worth it to render test scenes to compare and test my ray tracer?

**Tags:** raytracing

> **Comments:**
> **username_1**: Have you checked the MaxSDK ? I imagine here may be a good start > http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-SDK-Programmer-Guide/index.html?url=files/GUID-40ED5D02-BBCF-4EE3-9EE7-E59425B49CBB.htm,topicNumber=d30e2631  
> **username_1**: Alternatively you could use the open source AssImp library to import scenes and render them inside your own program, rather than getting your program to interoperate with Max, which I guess would involve more effort.  
> **username_2**: What would you like to compare your scenes with? With the output of the internal 3DS Max renderer? I was told by a Corona developer that the MaxSDK was painful to work with and also not well documented (at least in previous versions), so be prepared for that ;-)  

---

## 1 answers

### Answer by username_3 on 2017-02-16. Score: 4

You can do this by writing a renderer plugin for 3ds Max. This gives you the same kind of access as the built-in renderers, including a settings dialog, a preview window, and an interface where you can write the final frame of a full render (and 3ds Max will write it to the output file). The renderer plugin gets full access to the scene graph when the user hits "Render" (or when the preview window is in use). Any complex geometry (such as subdivision surfaces) will already have been converted to a triangle mesh for you.

username_1 already linked the official [*Programmers' Guide*](http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-SDK-Programmer-Guide/index.html?url=files/GUID-40ED5D02-BBCF-4EE3-9EE7-E59425B49CBB.htm,topicNumber=d30e2631) online. You'll also find it in the help files that are installed with 3ds Max, along with sample source code for a trivial renderer plugin. Because your plugin needs to link against the 3ds Max SDK, you'll need to compile it with the same version of Microsoft Visual Studio that was used to compile the particular version of 3ds Max you're targeting. (This means that if you want to target multiple versions of 3ds Max, you might need multiple builds.) Again, how to do this is described in the Programmers' Guide.

> **Comments:**
> **username_0**: What do you think would be faster and easier to implement? Using the MaxSDK or using Asslmp to import the scenes into my ray tracer? If I use the Asslmp method will it just import geometry will I have to define materials & textures myself?  
> **username_1**: AssImp imports materials and uvs. IIRC AssImp uses a key/value system for materials, so it can handle every material parameter type you can imagine. For me personally, I would prefer to import via AssImp, I hear MaxSDK can be frustrating.  
> **username_3**: Yeah, I've worked with the Max SDK before. It's badly designed and implemented, full of pitfalls and undocumented "features", and a lot of the sample code doesn't work. I'd recommend avoiding it if you can. That said, I don't know how good AssImp is, and I don't know if it will evaluate materials for you or if you'll have to reimplement all the materials yourself - and of course I wouldn't expect it to work with other Max shader or light plugins.  

---

