• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 Blender VC Gauge Texture Placement

Messages
180
Country
unitedkingdom
Hi,

I'm making my first VC in P3Dv4 with Blender. I have made my initial VC which shows in P3Dv4. I am trying to add textures to my gauges and they show in the blender render, but the textures do not show in sim. I am just trying to add a texture at the minute and then I will try adding a needle for the ASI.

Any guidance or pointers would be welcome.

z571fK.jpg
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
Have you added any other textures to your model and got them to show up in the sim or is this the first one? If the first one, what format is the BMP file you added to the sim's texture folder? You cannot use the standard 24 bit BMP file that most paint programs create. That will display in Blender, but not in the sim.

Another question - are you intending on having separate bitmaps for every gauge? This would be most inefficient, better to combine them all on one large bitmap.
 
Messages
180
Country
unitedkingdom
Hi,

I have added some textures for the external model which are visible from the VC. I also added a dummy panel to add 2D gauges using the $ identifier (pink and blue panel texture coloured for position checking). I am trying to make one 3D gauge at the moment as a test. I thought if I made each gauge individually with its own bitmap I could then keep them as stock drop them into future projects?

I have tried opening the bitmap in Image Tools and exporting it as 24 bit and also flipping it in DXTbmp. Also tried DTX1 format.

Do I need to bake it like the external textures?

I have done so many things now, I think I have confused myself on the process to make a texture.

DM7rR2.jpg
 
Messages
180
Country
unitedkingdom
I deleted the ASI gauge and inserted a duplicate of one of the other blank gauges and UV mapped it to a new image without alpha and it now shows as black in the sim.

I added my ASI texture to the image and saved it as a 1024 x 1924, 24 bit RGB bitmap. It still shows in blender, but not in the sim.

Wxkb5D.jpg
 
Messages
180
Country
unitedkingdom
I have tried all day today, but I can't find what I'm doing wrong. I have used DDS files just like I did with the external textures, but despite everything I try. nothing shows up in P3Dv4.

I followed kpgamemods video "Blender to FSX(How to Use Texture Maps Part 1) and the only thing I can see is that at 13:49 into the video Krispy's ASI gauge becomes visible on the gauge face in Blender Edit Mode, whereas mine does not. It is only visible when I press shift+z to see the render.


VV3oIU.jpg



MOtsSb.jpg
 
Messages
180
Country
unitedkingdom
At last, I seem to have solved my problem and my texture now displays on the ASI. When I reviewed the material menu's the Custom Properties window had additional properties, which I think populated when experimenting with the Aircraft Material Params window and selecting "Is virtual cockpit panel texture". Removing the old material and starting from fresh without selecting "Is virtual cockpit panel texture", resulted In the texture appearing in the sim.

4D57Eq.jpg
Su7OGc.jpg


57q6o1.jpg


Animation of the ASI needles next.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
That "Is virtual cockpit panel texture" parameter is only used whenever you wish to display a gauge from either a .gau/.dll file or an XML file.
 
Messages
180
Country
unitedkingdom
Please can someone help me with my ASI needles that do not seem to appear in sim as I can't see what I am doing wrong. Also my other animations for the VC do not display in sim when I add the ASI needles. If I remove the needles from my blender model, the other animations return.

I have added two needles to my ASI. The longer needle is on a scale of 0 to 100 and the shorter needle on a scale of 0 to 1,000. I have tried keyframe lengths of 100 and 500, but reverted to 200 as this seemed to be the default. Keyframe 0 at 0 degrees and zero knots. Keyframe 100 at 180 degrees and either 50 knots or 500 knots depending on needle and then keyframe 200 at 360 degrees for 100 knots and 1,000 knots.

I have added the code below to my modeldef file and it initializes in blender ok.


XML:
<Animation name="needle_asi_p111a"                      guid="7e4ca4d3-2d74-4433-819a-33f77daeba10" type="Sim" typeParam="AutoPlay"  length="200" typeParam2="needle_asi_p111a" />
    <PartInfo>
    <Name>needle_asi_p111a</Name>
    <AnimLength>200</AnimLength>
    <Animation>
      <Parameter>
        <code> (A: AIRSPEED INDICATED,KNOTS) 0.2 *</code>
      </Parameter>
    </Animation>
    <MouseRect>
      <TooltipID>TOOLTIPTEXT_AIRSPEED_KNOTS</TooltipID>
    </MouseRect>
  </PartInfo>
   
    <Animation name="needle_asi_long"                      guid="c5af7e87-be3c-448b-6795-dbc99d711913" type="Sim" typeParam="AutoPlay"  length="200" typeParam2="needle_asi_long" />
    <PartInfo>
    <Name>needle_asi_long</Name>
    <AnimLength>200</AnimLength>
    <Animation>
      <Parameter>
        <code> (A: AIRSPEED INDICATED,KNOTS) 2 *</code>
      </Parameter>
    </Animation>
    <MouseRect>
      <TooltipID>TOOLTIPTEXT_AIRSPEED_KNOTS</TooltipID>
    </MouseRect>
  </PartInfo>


74BWkh.jpg
 
Last edited:

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Could be the empty space in your variable call. Change:
Code:
(A: AIRSPEED INDICATED,KNOTS) 0.2 *
to:
Code:
(A:AIRSPEED INDICATED,KNOTS) 0.2 *

see if that helps.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
That is most likely the problem. Even the tiniest extra 'space' will kill all animations following the error. Here is one I caught yesterday morning. Note the extra 'space' before the comma:
Code:
  <PartInfo>
    <Name>ATR_CAPT_Wiper_Anim</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:CAPT_WIPER_POS ,number)
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>
 
Messages
180
Country
unitedkingdom
Thank you both, that fixed the problem. Both needles and all other animations now displaying in sim.

The 100's needle works fine, but the 10's needle only completes the first 360 degree rotation for the first 100 knots and then stops at 360 degrees and then rotates anti-clockwise again as the airspeed drops below 100 knots.

Is there any way to keep the 10's needle rotating for every 100 knots?

t3Kkkf.jpg
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Code:
(A:AIRSPEED INDICATED,KNOTS) 100 % 2 *

By taking the modulo (100 %), you make sure that the variable stays within its range. Also, make sure not to use <lag> for any animations that are supposed to turn around 360 degrees.

Btw. why did you settle on an animation length of 200? I always scale my animation in a way that the math is easier. So in this case it'd make sense to have an AnimLength of 100 and you can save one operation:
Code:
(A:AIRSPEED INDICATED,KNOTS) 100 %
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
I guess he thought it would make the needle movement a little smoother?
 
Last edited:
Messages
180
Country
unitedkingdom
Thank you. I will try adding the 100%.

I chose 200 animation length to reduce the amount of changes that might be causing it to not display. After the help I was given, I think it was the extra space and lack of capital C that was stopping it.

I will try going back to 450 animation length for the short needle and 100 for the long needle.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Is that actually still a thing? I always thought that the sim interpolates the keyframes in between anyway.
Just for giggle and grins, I once animated what would normally require 100 frames to use only 4* frames. It still worked perfectly! So yes, the sim will interpolate the keyframes. :teacher:

Actually, I suspect one could get away with only 2 frames, but I didn't try it out.

*NB: 4 frames because of the need to have intermediate keys:
0 = 0
1 = 25
2 = 50
3 = 75
4 = 100
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Any time I have a rotation > 150°, I always add intermediate frames.
 
Top