Archived

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

angrytofu

Shrinking a .x file using transform.world

Recommended Posts

real easy question.. my .x file seems to be way too huge.. besides shrinking it in the 3d program how can I shrink it? something like dev.Transform.World = this.TransformMatrix(); and then shrink it somehow //dev.Transform.World.Scale(0.0f,0.0f,-3.0f); www.punkouter.com for code www.badwedding.com for music

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It''s not a picture. Scale has no effect on size. Either cut down the vertices and animations or make sure you haven''t saved it in ASCII mode.

Share this post


Link to post
Share on other sites
but the vertex buffer contains the .x file information. so how would I go about changing it..

i just thought there was a easy way

anyways looking forward to your book

I was hoping to use C# but with c++ still being dominant I guess Ill go back to c++ for awhile

www.punkouter.com for code
www.badwedding.com for music

Share this post


Link to post
Share on other sites
hey angry, you still using TV or not? sounds like youre rolling your own this time. Best of Luck. as to your question, i take it you dont want to use the D3DScale function with the scalar matrix. why? Next, are you trying to access the VB that your .x file creates and perform a scale there? I dont get it.

Dreddnafious Maelstrom

"If I have seen further, it was by standing on the shoulders of Giants"

Sir Isaac Newton

Share this post


Link to post
Share on other sites
i dont care about the vertex buffer,, just wanted to shrink the mesh so it wasnt huge

Im still jumping around look at engines while making this little C#.Net/ODE bowling game to keep me busy

with all the different licenses I get confused which is the one I should pick.. All I am doing is making games as a hobby.. not profit

www.punkouter.com for code
www.badwedding.com for music

Share this post


Link to post
Share on other sites
You are limited to these options:

* Changing the size in your 3D modeler.
* Manually editing the .X file to change coordinate info.
* Using a scaling transformation matrix.
* Modifying the data in the vertex buffer.

If you don''t want to mess with the vertex buffer or scaling matrix, then you have only two other options left. I would suggest writing a function that takes your mesh and a transformation matrix as input, and as the output you get a mesh that contains the vertex data transformed using the matrix you provided. This way, you can do whatever you want to the mesh, position, rotate, scale...


Jim Adams

Share this post


Link to post
Share on other sites
yeh and it all comes back to not really understanding matrices.. and if i don''t understand that .. not much I can do



* Using a scaling transformation matrix.


I think that is what I was trying to do

maybe I should go buy your books now and learn


www.punkouter.com for code
www.badwedding.com for music

Share this post


Link to post
Share on other sites