3d Appearing Distance

For questions about using Classic.

Post » Sat Jun 11, 2011 1:55 pm

Can you set the distance that objects appear at in 3D? If so how?
B
1
G
1
Posts: 3
Reputation: 431

Post » Sat Jun 11, 2011 4:28 pm

For a 3Dbox:
1, Goto the object properties.
2, Change the 'z' depth setting (the one underneath 'Depth')
3, Enter negative settings to move the object away from the camera.
B
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

Post » Sun Jun 12, 2011 5:00 pm

I actually meant that at a certain distance away from the camera the boxes disappear. Is there a way to change that distance?
B
1
G
1
Posts: 3
Reputation: 431

Post » Sun Jun 12, 2011 7:14 pm

The box will disappear if it is too far away from the camera? Thats Normal.

Try this cap



[url:11qul9ux]http://dl.dropbox.com/u/22173473/3dz1.cap[/url:11qul9ux]
B
19
S
6
G
7
Posts: 1,206
Reputation: 7,300

Post » Sun Jun 12, 2011 8:41 pm

I think he is asking about something that in 3D apps is called the "clipping distance"- the distance range away from the camera location in which objects are rendered or not, so they are clipped if too close or too far from the camera.

As far as I know construct doesn't have any option to specify that distance.
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413

Post » Sun Jun 12, 2011 9:09 pm

The near clipping distance is defined by the Window Property Eye Distance (3d) which is by default 500.
The far clipping distance is the near clipping distance minus 10000, or -9500 by default.
B
79
S
24
G
54
Posts: 4,750
Reputation: 40,763

Post » Sun Jun 12, 2011 9:11 pm

CC 1 is a 2D game creation system, after all. It never pretended to be a 3D system, so it's implementation is very limited. It may change in C2 hopefully. :wink:
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,849
Reputation: 48,299

Post » Mon Jun 13, 2011 12:41 am

The eye distance doesn't actually change the clipping distance it just changes how far away objects appear to be. Assume you have a model in which ten pixels represent a foot. You create a box that has a height of 50 a width of 50 and a depth of 50. If you half the eye distance and make it 250 then your box will appear to have a height of 50 a width of 50 and a depth of 100. When you changed the eye distance you changed your model along only the z axis to be five pixels per foot. This changes your box to be rectangular. You can get around this by halving your depth. By changing the eye distance you can make objects look like they are disappearing\appearing farther away but they disappear\appear the same number of pixels away. This works fine unless you are concerned about the resolution of your game which I am. There is a similar property in each 3D box you create called Rise Scale. "Effects how the Z units are scaled. eg: A depth of 20 will actually be sixty four if the scale is 3.2." If you look at the bottom of your properties bar with Rise Scale selected this is the message you will see. I had the idea to use both eye distance and rise scale combined to make them appear to be farther away when they disappeared without losing any resolution but was not able to get it to work. I then experimented with Rise Scale alone and found it did not distort the proportions of the box but only the placement. I saw that with several boxes with different rise scale settings they all disappeared the same distance away from the screen. ie. They were all the same width on the screen when they disappeared. If any one knows how to change the actual clipping distance or how to use eye distance to make the clipping distance look farther away without losing resolution then please tell me.
-----------------------------------------------------------------------------------------------------------------
Edit: I went and messed around with the eye distance some more and found that it does change the number of pixels from the screen that objects disappear but I couldn't get the distance to be more than eleven thousand pixels. If you are doing 20 pixels per foot that is only five hundred feet away. This means if you have something in your game around thirty feet tall or so it will disappear while still quite large on the screen. Changing the eye distance does affect objects like I said earlier so I still have a problem with resolution.
B
1
G
1
Posts: 3
Reputation: 431

Post » Mon Jun 13, 2011 4:05 am

Well, you can fake it by changing the scale of the objects based on the Z position, so all the objects disappear (have scale 0) at the maximum allowed clipping depth, this decreases Z positioning resolution though.

example (based on chrisbrobs .cap):
[url:2sj7p8ql]http://dl.dropbox.com/u/7871870/construct/3d-scale.cap[/url:2sj7p8ql]

Edit: Ok, I realized that the distance between objects were getting messed up when you only scale them, so I also applied the scale to the positions in order to fix it. Link above is updated with these changes.
Scirra Employee
B
129
S
45
G
15
Posts: 705
Reputation: 15,413


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests