Skip to main content
gamedev.net
🔒 Locked

question

Started by smacker Oct 29, 2005 at 10:25 AM 4 replies 500+ views
Original Post
smacker
smacker
Im some what new to directX and was wondering if there were any tools out there that you could place meshes into world space to get the cords?
neneboricua19
neneboricua19
What do you mean? Do you mean get the world-space coordinates of your mesh? If so, then the way to do this is to access the vertices of your mesh and transform them all by your world matrix. There is no way to let the graphics card transform them and get that data back from it.

Hope that's what you mean. If not, maybe try to rephrase the question?

neneboricua
smacker
smacker
no im more taking about creating your world, here is my idea
I want to create a map for my game it will be a bunch of circle meshes, I would like to setup this map to make sure it looks right in a program(if there is one avalible) and get the world cords from there so when I load the meshes I can place them in the proper place.
and thanks for the speedy reply
neneboricua19
neneboricua19
By the way, it would probably help if you had a more descriptive subject line for your post :)

Seems like you're looking for a simple level editor or a modeling program. There are a few free/low-cost ones out there. Milkshape (free for 30 days, $25 after that) is a good low-poly modeling program that can import/export tons of file formats. Blender (free) is another good modeling package.

Perhaps others could chime in with a few level editors.

neneboricua
smacker
smacker
I when with canvas and started to gather info on the cords of the mesh ojbects that I placed with in the enviorment, when I take a snapshot of what the camera is looking at in canvas it shows all my meshes so I place the meshes using matrix.translation and then set the camera to the setings that the camera is set to in canvas but its not transforming them right here is the code
dev.Transform.World = Matrix.Translation(0,0,4);dev.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, Framework.DefaultSizeWidth / Framework.DefaultSizeHeight, 1.0F, 1000.0F);dev.Transform.View = Matrix.LookAtLH(new Vector3( 0.0f, 0.0f, 0.0f ), 				new Vector3( 0.0f, 0.0f, 0.0f ), 				new Vector3( 0.0f, 1.0f, 0.0f ) );									dev.RenderState.Lighting = true;


[Edited by - Coder on October 31, 2005 9:26:48 AM]
neneboricua19
neneboricua19
Can you see anything on the screen? Notice that your view matrix might not work. Your position and target are the same. Might be better to do something like this:
device.Transform.View = Microsoft.DirectX.Matrix.LookAtLH(                            new Vector3(0.0f, 3.0f, -5.0f),                            new Vector3(0.0f, 0.0f, 0.0f),                            new Vector3(0.0f, 1.0f, 0.0f));

The translation you're doing will move the model 4 units away from your camera. Is that what you're expecting?

neneboricua

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.