New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem exporting airplane_generic_sp lights #421
Comments
I deleted this long response about how airplane_generic_sp and airplane_landing_sp were different because I was actually wrong. The difference came from a bug that got fixed
Github saves the old content, but, I won't stand by it and disown it and figure it might not be better to have it up to save confusion. In the time between now and that qouted reply I had also forgotten that named lights and param lights don't use the light's RGB color. Only Custom, and the old Default and some of the deprecated lights use that. Sorry future readers! |
I see. I had missed this piece of information. ANIM_begin ANIM_begin As expected, according to what is explained above, direction of the rotation vector changes. But the color values are changed too (not reset to [1,1,1]), while W parameter is not affected, which I understand is not expected. It might be my lack of experience with this. |
You'll have to forgive me, you might be the first person to ask about this since it was developed. In the .blend file you gave me, you have "generic_light_sp.003" using the light |
You are right. The naming is not relevant to this problem and was overlooked when recycling the previous file as an example. They are intended to be of the same type (airplane_generic_sp) to make the comparison effective. About the color, if you mean the color of the Blender lamp, then it is the same. In the explanation you posted above I interpreted "RGB" values as the values of R G B in the parameter's field (XPlaneLampSettings.params) Following the indications at And interpreting the signature of that field as: The behavior that I am observing is that changing thos R G B values, the color of the light changes, but also the direction baked by the script. Is this the expected result in this case? |
Good news! Upon some very careful debugging, I've come to realize that there is a problem with the implementation of this feature! airplane_generic_sp shouldn't be getting autocorrected at all! Thank you for bring this up, it is very useful. Some details of how to work around it may follow. |
Using this build, I think the bug is fixed. |
I run the export of the latest test case, using the provided link version, with identical results. I have found other light names that present what could be the same problem. I have not made a test-case for each and every one of them, but found unexpected results of similar type. These types are exported with unexpected baked rotations:
This type had issues with the size of the cone:
|
I'm surprised you're saying generic_sp is still having issues. I really thought that that build I linked fixed it. If that is having trouble, is landing_sp also having trouble? I'm also surprised by all these lights you've listed. To be clear, none of them have _sw callbacks (including airplane_generic_sp as of several days ago in the build above) I guess I should also ask what you mean by unexpected (basic question I know). The point of the feature is that where you point the light in Blender is where the light will be pointing in X-Plane no matter. Period. Can you post a side by screenshot of Blender and the result in X-Plane? |
Can you share the last line of the OBJ being used in those screenshots? |
Sure. Here: Build with Blender 2.79 (sub 0) (build b'5bd8ac9abfa'). Exported with XPlane2Blender 3.5.0-dev.0+47.20190221191339Attached is the obj itself, for the last case: It only has two lights:
By the way, thanks for taking the time to look into this. I know that lights+rotation problems is always a nasty combination... |
I've tried so summarize this bug so far here: Problem 1Set up: 2 airplane_generic_sp lights, rotation = (90, 0, 90), colors = (Blue, Red) Set up: 2 airplane_generic_sp lights, rotation = (78, 0, 0), colors = (Green, Purple) Problem 2Set up: 2 airplane_landing_sp lights, rotation = (90, 0, 90), colors = (Blue, Red) Set up: 2 airplane_landing_sp lights, rotation = (78, 0, 0), colors = (Blue, Red) Problem 3When comparing the lights from Problem 2 and 3, do they have the same baked rotation? Problem 4So, as it turns out, you have helped discover some bugs in XPlane2Blender and problems in X-Plane! Thank you! It turns out several software callbacks were being applied when they shouldn't. After yet another pass of what is applicable, and what isn't, here are some answers about the specific lights you asked about.
When Laminar Research Artists use this they set RGB to 0 0 0 and aim the light with X Y Z. RGB can be used for aiming under specific and stupid circumstances that aren't worth mentioning.
|
I'll try that link.
Do you mean the color of the blender lamp, or the RGB components in the "Parameters" box? Thanks. |
Good catch. I mean (I made a blue colored lamp and a red colored lamp using the Parameters box). As has been said, the parameters lights only get their coloration from RGB parameters or the contents of the lights.txt file. |
Thanks for looking into this. I'll leave my observations here in case they are helpful: In this case, the ANIM_rotate command is baked with the same results, as expected, but some of the parameters, which I understand are interpreted as the direction vector XYZ by X-Plane, are exported with differences: LIGHT_PARAM airplane_nav_left_size -11.52632523 0.04237811 -47.38787079 5 0.99 The result of this is that lights modeled in Blender with the same direction, are oriented differently in X-Plane. However, I am still not sure if this is a problem of the exported data or a problem of how X-Plane is interpreting it. Any thoughts? |
So glad it was solved.
See "Navigation Positional Lights" at Airplane Parameterized Light Guide for more details |
Hi.
I am finding an unexpected situation while exporting lights with:
Build with Blender 2.79 (sub 0) (build b'5bd8ac9abfa'). Exported with XPlane2Blender 3.5.0-rc.1+40.20181016150257
The same lamp object with same parameters is exported with different rotation if the type of light is changed from airplane_landing_sp to airplane_generic_sp. In the first case the result is what would be expected, but in the second case the light is rotated in an unexpected way.
Attached are the Blender file and the result OBJ file.
Am I missing something?
Or maybe is one of those work in progress issues related to lights?
test-lights.zip
The text was updated successfully, but these errors were encountered: