pawhan11 Posted November 22, 2017 Report Share Posted November 22, 2017 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... 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 Quote Link to comment
shoneill Posted November 23, 2017 Report Share Posted November 23, 2017 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. Quote Link to comment
pawhan11 Posted November 23, 2017 Author Report Share Posted November 23, 2017 @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 Quote Link to comment
shoneill Posted November 23, 2017 Report Share Posted November 23, 2017 https://www.opengl.org/archives/resources/faq/technical/polygonoffset.htm Available as "PolygonOffset" for a Scene Object in LabVIEW. 1 Quote Link to comment
pawhan11 Posted November 23, 2017 Author Report Share Posted November 23, 2017 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 Quote Link to comment
shoneill Posted November 23, 2017 Report Share Posted November 23, 2017 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" Quote Link to comment
pawhan11 Posted November 23, 2017 Author Report Share Posted November 23, 2017 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... 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. Quote Link to comment
shoneill Posted November 24, 2017 Report Share Posted November 24, 2017 (edited) How do you instantiate the text int he first place? Texture? Edited November 24, 2017 by shoneill Quote Link to comment
pawhan11 Posted November 24, 2017 Author Report Share Posted November 24, 2017 I am using Scene.Drawable.NewText from NI wrapper My gues is stis is some sort of texture over an object. Quote Link to comment
shoneill Posted November 24, 2017 Report Share Posted November 24, 2017 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 1 Quote Link to comment
pawhan11 Posted November 24, 2017 Author Report Share Posted November 24, 2017 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.