Generating and Displaying Geometry in C++

Generating and Displaying Geometry in C++

Anonymous
Not applicable
1,443 Views
5 Replies
Message 1 of 6

Generating and Displaying Geometry in C++

Anonymous
Not applicable
I am sure well advanced questions are the norm on this site but I am hoping that the patrons here will find some room for newbies like me. I am getting started with 3ds max SDK programming. I have a adequate experience in c++/c# and some familiarity with maxscript. I am testing the waters for the viability of a 3D geometry generating application that needs an object oriented programming platform. I am planning to use maxscript for the front end (with Function Publishing). I started off with the various Autodesk help sites and samples but was baffled by how little effort they made to make it easy for a newcomer. After a week of fruitless effort I have come here for help. What I am looking for is a simple starting code that generates a geometry object (say a cube) and displays it in viewport when the plugin is loaded. I believe I can take it from there. Would someone be so gracious? I have scoured the online help and the supplied samples and I assure you that I wouldn't have asked this if I was not desperate.
Thanks.
0 Likes
1,444 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Just to clarify. ... I have used the code snippets in the Lesson-5 (Geometric Objects) section of the 3ds max sdk help to create an internal mesh object but could not get it to appear in a viewport. The article goes on to more code snippets for mouse interaction function to position the object in a viewport. What I really want is to display the object when the plugin is invoked or through maxscript calls without needing the mouse. What exactly do you do to display a mesh object? What function do you call?
0 Likes
Message 3 of 6

istan
Advisor
Advisor

You should rather take a close look to the sample code! It gives you a lot more answers than the SDK doc. e.g. look at boxobj.cpp

And, I would not expect writing useful C++ plugins within a week - without good knowledge of Max! Only if you understood how Max internally works, you will be able to create smoothly running code. You have to deal with topics like C++ vs. MXS / FP, Animation, Undo,..

0 Likes
Message 4 of 6

Anonymous
Not applicable
Thanks for the reply. I have gone through several samples in the maxsdk folder but didn't come across the box object one. (I have the sample pack that comes with 3ds max 2014). I will look into it.
In maxscript you can just type box () and get a cube generated with default values without using the mouse. I don't expect the SDK to be that simple but nevertheless expected an equivalent skeleton project sample in the documentation. What I was hoping for was somebody who had (or can) put together some such code because I assumed it won't be more than a few lines long. Am I correct or is there something huge I am missing?
My end goal is to develop a c++ plugin with a maxscript frontend which generate 3d geometry from a set of user supplied parameters.
I appreciate it if someone can either point me to the right resource or (preferably :)) whip up some code to get me started. I don't really get why it should be so hard on a 3ds max novice who is reasonably equipped with c++/.NET. I have also tried on numerous forums including stackoverflow where I got kicked out for being 'out of topic'. I don't even know what that means.
0 Likes
Message 5 of 6

istan
Advisor
Advisor

What is the reason you are not considering just using MXS?There is not much you can't do with MXS. If it's about protection, you could interface to a protected DLL for hiding your top-secret function code.

0 Likes
Message 6 of 6

Anonymous
Not applicable
Thanks for your reply again. My reason for opting for the SDK is I intend to have my own hierarchical object classes representing my 3D objects and I have learnt that you can't do that in maxscript. That is why I needed a n Object Oriented development platform like c++. Besides that I expect the plugin to evolve into a much elaborate tool which processes a considerable volume of 3D data in the future and so I may need the speed advantage. But that is secondary to me right now.
Is there any way you know to display a 3D mesh object without using the mouse call back functionality of the SDK? All the samples including the one you pointed me to use that.
Thanks again.
0 Likes