Jump to content

3D pucture objects overlapping


pawhan11

Recommended Posts

Posted

Hello LV users,

 

I have been fighting with 3D picture for 2 days and I have stumbeld on the following problem:

I need to display rectangle + text. Text should be always displayed before background when camera moves or is rotated.

I have attached test vi that exports fragment of functionality and shows the problem.  Camera settings and billboarding must be set to values provided in test vi.

 

Text must be displayed before green box not after like on picture below.

Intresting is when I zoom text is displayed correctly...

 

image.png

 

 

Do You have any idea which one of undocumented options in 3D picture might help??

 

This is cross post from NI forums:

https://forums.ni.com/t5/LabVIEW/3D-picture-control-objects-overlaying/td-p/3720660

test2.vi

Posted

If you position objects at the same depth from the camera, you're leaving the choice as to which draws "front" up to rounding errors of the SGL datatype.

Put a minimal depth difference between them.  IIRC, there's a property you can set in order to force this.

Posted

@shoneil I have tried that without success. I assumed that item in closer to camera will be displayed(text). Maybe this is related to billboarding? I need text and this green area+ frame to always face camera

test2.vi

Posted

Thanks @shoneill this solved my problem.

Another one appeared, I need to zoom in to see displayed text correctly like on attached picture. I want small text to be displayed as well.

Do You have idea about that one? It is good to know that NI made some wrapper around opengl so there is chance to find some documentation :)

image.png

Posted

The only thing I can think of is to make the text more than a single pixel wide..... Otherwise antialiasing is going to do that to you.  Of course, YOu can try turning off the Antialisaing for the object in question..... "Specials: Antialiasing"

Posted

Thanks for reply but it seems Aliasing is not the problem.

People tell about camera perspective :

https://stackoverflow.com/questions/5300888/how-can-i-increase-distance-zfar-gluperspective-where-opengl-stops-drawing-obj

but objects more in the back are displayed correctly. What I noticed it that this is letter dependent. For some letters like A I must zoom a lot so see something, letter E for example I see always even when I zoom out... :)

 

Untitled.png

On NI forums they had discussion about text display problem and PC was blamed. I have tried on 2 machines and this is not HW related.

https://forums.ni.com/t5/LabVIEW/3D-Picture-Text-Display/td-p/2985433

 

I have tried other fonts but it is unrelevant.

 

Posted

What I found helped int eh past was to generate the text texture myself for application.  By creating a much larger texture than required, resulting in each letter being many pixels wide, the effects you are seeing were significantly reduced.

Shane

  • Like 1
Posted

Thanks @shoneill I have managed to make this work. For some reason I could not display texture on mesh but simple rectangle works fine in my case.  When I add texture from picture text is always displayed correctly.

Thanks again for help:beer_mug:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.