General Question Mesh/cockpit camera question

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
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);
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,638
Reaction score
2,353
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
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.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
Points
203
Location
Dallas, TX
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
 

vinka

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 24, 2008
Messages
2
Reaction score
0
Points
0
try rendering in the external pass like this :
SetMeshVisibilityMode(IDCENTERMESH,MESHVIS_ALWAYS|MESHVIS_EXTPASS);
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,736
Reaction score
2,707
Points
203
Location
Dallas, TX
Thanks. Nope. I even shorten the distance and still no end. I increased the setsize and now I see it
 

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,089
Reaction score
909
Points
128
Website
francisdrakex.deviantart.com
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.
 
Top