Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Ant
19
Years of Service
User Offline
Joined: 27th Nov 2004
Location:
Posted: 23rd Apr 2006 23:25
Hi

I'm having difficulty understanding all the commands to manipulate 3d objects, I was wondering if someone could please give me an example in code, using a model from darkmatter.

When I try the model disappears when it gets closer on the Z axis.
I have saved the model by exporting it in .x format from Milkshape 3d and have attached it here.

So if you could help me out, I'd appreciate it, also if you know of a good website that would explain 3d, prefebly with diagrams, that would be great!

Thanks

Attachments

Login to view attachments
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 24th Apr 2006 03:41
Quote: "When I try the model disappears when it gets closer on the Z axis."


Take a look at the Set Camera Range command. It sets the start and end range of the camera's view and if you don't set any value, it defaults to 1 and 3000.

This means that anything closer than 1 3D unit will 'disappear' - as will anything further away than 3000 units.

To get around this, you might have to 'scale up' your world (bigger matrix for example) and 3D models a bit with the Scale Object command.

This takes 4 parameters:

Scale Object ObNum,XScale,YScale,ZScale

ObNum - The object number to scale

XScale - The amount of scaling along the object's X axis (width). This is a percentage value where 100(%) is no change, 200(%) is double the size and so on. Values less than 100 scale down, so 50(%) would be half the size. A value of 1(%) would be 100th of the original size.

YScale - As XScale, but for the Y axis (height) of the object.

ZScale - As XScale, but for the Z axis (depth) of the object.

TDK_Man

Login to post a reply

Server time is: 2024-09-24 21:27:51
Your offset time is: 2024-09-24 21:27:51