General Question Mesh/cockpit camera question

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
10,538
Reaction score
4,369
Points
203
Location
Dallas, TX
I am having an issue. I hope I can get solutions. I have a mesh that I want seen in cockpit view. But it appears to be clipping.

The mesh is a cone. Then I flipped it so the inside can be seen.

The z length is 13.46. As you can see in external view you can see the red center end. But in Cockpit view it is not there.

My thought is that the end is being clipped out?
TESTING
Code:
IDCENTERMESH = AddMesh(oapiLoadMeshGlobal("TAELONIDCENTER2"));
    SetMeshVisibilityMode(IDCENTERMESH, MESHVIS_ALWAYS);

REAL CODE
Code:
IDCENTERMESH = AddMesh(oapiLoadMeshGlobal("TAELONIDCENTER2"));
    SetMeshVisibilityMode(IDCENTERMESH, MESHVIS_COCKPIT);
 
AFAIR, orbiter uses a very low maximum distance for rendering VC meshes, for preventing Z-Buffer artifacts and allow a lower minimum distance.

Don't know the exact distance, I believe it depends on the spacecraft size. In SSU, we had a maximum distance of about 12 meters.
 
Thanks. Is it something one can set? I know there is a SetClipRadius(). But I thought that was for minimum distance.

Here are 2 images of what I see.
taeloncone_zpsilosbvgm.jpg


taelonconeissue_zpscnrfsav9.jpg
 
try rendering in the external pass like this :
SetMeshVisibilityMode(IDCENTERMESH,MESHVIS_ALWAYS|MESHVIS_EXTPASS);
 
Thanks. Nope. I even shorten the distance and still no end. I increased the setsize and now I see it
 
picture.php


Try to render it for the virtual cockpit with the flag MESHVIS_VC and then view it from there by switching to with F8. This allows pretty short rendering distances from inside the virtual cockpit.

I think the standard cockpit view derives its clipping distance from the vessel size parameter. You could try to use a small size radius (like 4 m), but may get unwanted side effects if the size is too small.
 
Back
Top