Jump to content

Recommended Posts

Posted

Hi everybody

 

I am working on a 3D cockpit with Blender26 and came to the following problems. Would be great if somebody can help or advise other XP10 developer forums.

 

1. When I try to use datarefs which are intended for customized 3D cokpits (?), i.e. Sim/cockpit2/engine/actuators/throttle_ratio it doesn't work. However, using sim/flightmodel/engine/ENGN_thro[0] works. Also other ...cockpit2-datarefs like gear handle etc, do not work. Any idea what's wrong?

 

2. When I assign 'sim/flightmodel/engine/ENGN_thro[0]' to the throttle lever it is shown in XP10 bottom up. So far I solved the problem by turning the throttle lever in Blender by 180°, however, this is not a very elegant solution. 

 

Thank you very much for possible help.

 

Best regards

SH

Posted

Thank you for the reply. I am pretty sure that I have used sim/cockpit2/engine/actuators/throttle_ratio[0], however, I will countercheck and let you know. The problem is that also other 'simple' actuators like Sim/cockpit2/controls/gear_handle_down do not work. But, as I said I will countecheck to be sure.

Any idea regarding the second topic, i.e. that objects are mirrored when assigning a dataref?

 

Kind regards

SH


 

Posted

Based on the exact example you wrote above, the newer throttle dataref needs a array index after it, like [0] just like the old  one does.  If you forgot that, then it definitely wouldn't work.

 

The "old"  sim/cockpit and newer sim/cockpit2 datarefs will mirror each other when applicable.  The old ones are mostly deprecated for aircraft dev and OBJ use.  I don't believe I have used an "old dataref...(sim/cockpit) in quite some time and I've done quite a few planes top to bottom.  If you did use the [0] index with the newer throttle dataref and it still does not work, then there is something else at play because all the datarefs work fine.  A sure-fire way for us to help diagnose is to post the cockpit *.obj file here for examination (the exported text file, not the blender one).

 

 

TomK

Posted

Hi

First of all thank ou for the reply. Below the  code from the obj-file that works (although the throttle lever in Blender is botom up):

 

 

 

ANIM_begin

      ANIM_trans  -0.007201   0.037371    -1.662394   -0.007201   0.037371    -1.662394   0      0     none

      ANIM_rotate_begin 1.000000    0.000000    0.000000      sim/flightmodel/engine/ENGN_thro[0]

            ANIM_rotate_key   0.000000    38.182745

            ANIM_rotate_key   1.000000    -31.842144

      ANIM_rotate_end

      ANIM_rotate_begin 0.000000    1.000000    0.000000      sim/flightmodel/engine/ENGN_thro[0]

            ANIM_rotate_key   0.000000    180.000005

            ANIM_rotate_key   1.000000    180.000005

      ANIM_rotate_end

      ATTR_no_cockpit

      ATTR_cockpit

      TRIS  3021 912

ANIM_end

 

This code doesn't work (perhaps the Dataref is wrong?):

 

ANIM_begin

      ANIM_trans  -0.052009   0.037371    -1.662394   -0.052009   0.037371    -1.662394   0      0     none

      ANIM_rotate_begin 1.000000    0.000000    0.000000      Sim/cockpit2/engine/actuators/throttle_ratio[0]

            ANIM_rotate_key   0.000000    38.446086

            ANIM_rotate_key   1.000000    -31.842144

      ANIM_rotate_end

      ANIM_rotate_begin 0.000000    1.000000    0.000000      Sim/cockpit2/engine/actuators/throttle_ratio[0]

            ANIM_rotate_key   0.000000    180.000005

            ANIM_rotate_key   1.000000    180.000005

      ANIM_rotate_end

      ATTR_no_cockpit

      ATTR_cockpit

      TRIS  3933 912

ANIM_end

 

In the contrary to my last post I have meanwhile checked that sim/cockpit2/controls/gear_handle_down works well. Strangely I do not have a problem here with the orientation of the gear lever. Perhaps I do something wrong in Blender?

Thank you up-front for any help/comments.

SH
 

 

 

 

 

Posted

Thank you very much!!! Stupid simple - but this is the solution! I've changed the captial letter and it works.

 

Any idea regarding this strange thing with the orientation of the throttle lever. Again, the problem is that in Blender it has the right orientation and as soon as I assign a Dataref it appears turned by 180° in XPlane.

 

Thanks for possible help.
 

SH

Posted

Thank you very much for the reply. As I am still learning Blender I should be most grateful if you could give some more explanations what exactly do you mean.

What I did so far is to create the throttle lever in Blender (with right orientation), added two keyframes for the minimum/maximum rotation around the x-axis and applied the dataref + datare-keyframes accordingly. Everything works well except the mentioned fact that the levers appear bottom up in XPlane. Thus I had to rotate them in Blender by 180° (now in Blender the lever head looks down) to have them shown correctly in XPlane.

Thank you up-front for a possible more detailed explanation.

Best regards

SH

Posted

Hi Kieran

Thank you for the advice, however, it doesn't work. Perhaps, I am not familiar enough with Blender. Actually, I do not understand the meaning/effect of the 'Apply object tranformation' command. When executing 'Ctrl + A' + Rotation on the left Blender panel appears an additional menu showing 3 ckeck boxes whereby 'Rotation' is ticked. The orientation of the object does not change. However, when ticking off + on the check box the object is being rotated in a strange way arount the x and y axis. Whatsoever, when exporting the obj in XPlane nothing changes, i.e. the orientation of the throttle lever remains wrong. I guess that it is more to do with my lack of knowledge in Blender since some other objects behave normal. However, if you/somebody else should have another idea what might be wrong I will be very grateful.

Is it possible to post a screenshot in the forum to make the problem more visible?

 

Thanks and regards

 

SH

Posted (edited)

Any chance you could upload the .blend of the throttle? I'm not exactly sure what the problem is, but if you can upload the .blend I'll take a look and see if I can find what wrong.

Edited by Kieran
Posted

Sorry for my stupid question - but how to upload anything in the forum. I tried to upload a pic (screenshot) from Blender (with an URL to my local machine???), however, it displayed only a kind of icon.

So if you could give a hint how to upload, no problem with the blend.file. I am not working on anything commercial, so no problem to distribute files.

 

Best regards

SH

Posted

Click the 'More Reply Options' at the bottom left corner of the box. It should bring up a page looking like this:

post-756-0-54394600-1396516281_thumb.png

From there click "Choose Files..." select the .blend and upload it.

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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...