Archived

This topic is now archived and is closed to further replies.

Dark Star

help with making a 3d object editor !!!

Recommended Posts

Hi all I want to create a 3d object editor that creates 3d flat shaded polygons. Can anyone tell me how I''d go about creating an editor of this type. I want to be able to edit polygons with the mouse and the shape to be edited and update immediatlt in 3d space. Dark Star

Share this post


Link to post
Share on other sites
You can ask this question as many times as you want but it is like asking someone how to build a house. Give it a go and when you run into specific problems ask questions about them. If you are going to be able to load other 3d formats you should start with a file viewer and then convert it into a editor. Sound like a good place to start?

I wanrned you! Didn't I warn you?! That colored chalk was forged by Lucifer himself!

Share this post


Link to post
Share on other sites
If you're using Visual C++ and DirectX, create an MFC project and incorporate the Direct3D stuff (see SDK tutorials) into the DocumentView class.

Then figure out a way of editing in 3D. You'll need to handle mouse clicks and movement and work out a logical human interface.

I tried this a few months ago, check out my website. I'll put the source up there if anyone wants it.

Dave

Edited by - Heraldin on October 7, 2000 7:37:39 PM

Share this post


Link to post
Share on other sites
GKW is right - this is a house scale task, but a few pointers-

-Design the whole thing out on paper - that way you will decide precisly what you want to acheive and get there far quicker, and probably with less bugs. Also figgure out *all* problems - there is nothing worse than sitting down to code somthing that you don't know exactly how to do.
-Learn of others - find source code to other peoples programs and learn from that, also use tutorials.
-Make sure you are experianced with whatever 3d api you are going to use - you don't want to deal with the problems of learning an api *and* how to make an object editor.

Also, I'm assuming this is an in-house style editor for another project - if so remember that perfection is not required, and I would also advice use of OpenGL over DirectX in this situation, (No flamming please) as whilst DirectX has all the speed benifits, OpenGL as far quicker to develop for, and will do a better job for a small scale editor - if you allready know DirectX you will get OpenGL in about a day. It is also better at handeling bugs and chances are you will want to focus on your own problems, not hadeling the api's problems.
-Lethe

Edited by - Lethe on October 9, 2000 6:00:50 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Heraldin:

How do you incorporate DirectX into MFC program? I''m creating a 3D editor in MFC and I have trouble doing it so I''m force to rewrite the editor in win32 (still in the beginning stage).

I really appreciate your answer.

Share this post


Link to post
Share on other sites
Anonymous Poster:
This isn''t to hard. In CWinApp::InitInstance() you create the main DirectX object, and on each CWnd:reCreateWindow() create the DirectDraw surfaces and attach then to each window with a clipper object. On CWinApp::ExitInstance(), clean everything up. I haven''t integrated DirectX and MFC yet, so this is all off the top of my head.

Share this post


Link to post
Share on other sites
Hi there!

I''m working on a Leveleditor... I just know Opengl, but it seems to do a pretty good job... sometimes diffrent stuff doesn''t get rendered, but that''s most of the time my fault !

So! good luck!
cya,
Phil

Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states ;)

Share this post


Link to post
Share on other sites
Anonymous Poster:

I initialize Direct3D in the OnInitialUpdate() function in the class derived from CView. Use the m_hWnd member for the HWND arguments to DirectX. Then, in OnDraw(), I use the Direct3D device to draw to the screen. All the DirectX variables are kept in my CView-derived class. That way, since I''m using a multiple document interface, DirectX is initialized for each child window of my app. You need to deal with moving and resizing of these windows.

My editor was written with DX5, but the principal should be the same with DX7 or higher.

Good luck!

Dave

Share this post


Link to post
Share on other sites
I would suggest starting with loading an exisiting object. Rotating and translating the object is a fairly essential task in an editor. Then work on letting the user select a polygon or vertex. Then work on letting the user modify the polygon or vertex. Once you can do that you should know the vast majority of what you need to start with nothing and build an object.

Share this post


Link to post
Share on other sites