Closed gilbertohasnofb closed 6 years ago
Problems here... We either relocate the GPS or maybe we need the cross bracing base moved forward. Its hard to see in this image. Wee need a better reference photo. http://islandaero.com/images/70-172dbp.jpg I also notice in this image that the compass appears to be behind the bars, not in front.
Also, we don't have the shadow effect on the compass, even its case, probably because we don't have it absolutely positioned. Because we have these instruments locally contained in our directory structure, there is no reason not to position them absolutely in their blend's and ac's so we can apply effects to them. I already found some that will be harder that others to reposition. However, if they are easy I intend to do move them, especially if they are isolated from the main panel like this compass is. This concept of sometimes we do and sometimes we don't, yet it is all a non-shared resource just doesn't make any sense to me. All we are doing is hamstringing out effects system.
Here is another reference photo. It looks like it is forward like ours is. http://www.pilotweb.aero/polopoly_fs/1.4802343!/image/image.jpg_gen/derivatives/landscape_630/image.jpg
It almost looks like our bracing bottom should be moved closer to the pilot or towards the aft of the aircraft. I can still move the GPS to the right a bit more to clear the cross bracing?
I don't necessarily want to make a new issue out of this regarding the compass so I will post it here for now.
I set the position to absolute by adjusting the .ac, created a blend also, so we can apply the shadow to the frame. Unfortunately this is one of those object such as the trim wheel that rotates from shadow to light so we can't add the shadow to the compass face. The code for emission I think maybe was wrong. Is the compass supposed to be included in the electrical system for lighting? I commented out the emission in this block and made a new material setting for it.
<animation>
<!-- <type>material</type> set this if you do NOT want a tooltip -->
<type>pick</type>
<object-name>Ring</object-name>
<!--emission>
<red>1.0</red>
<green>0.2</green>
<blue>0.0</blue>
<factor-prop>/sim/model//material/instruments/factor</factor-prop>
</emission-->
<hovered>
<binding>
<command>set-tooltip</command>
<tooltip-id>magnetcompass</tooltip-id>
<label>Magnetic heading: %3d</label>
<property>instrumentation/magnetic-compass/indicated-heading-deg</property>
<mapping>heading</mapping>
</binding>
</hovered>
</animation>
I'm not sure the emission setting was working in the above pick animation (even before I commented it out).
It for sure using this code block.
<animation>
<type>material</type>
<object-name>Ring</object-name>
<emission>
<red>0.45</red>
<green>0.09</green>
<blue>0.00001</blue>
<factor-prop>/sim/model//material/instruments/factor</factor-prop>
</emission>
</animation>
@wlbragg I will open a new issue for the shadow of the compass, or have you fixed it already?
As for the GPS, our current solution is really non realistic as the GPS is just laying there on the cockpit. What about modelling this?:
http://www.bruceair.com/product_reviews/images/ram-mount.htm
That would look so much better!
Also note that the real GPS is black and I have long pushed a texture for it at Models/Interior/Panel/garmin196
but for some reason that is not showing up on the model, it is still grey.
What about modelling this?:
Good idea, will do!
the real GPS is black and I have long pushed a texture for it
Let me take a closer look, it looks like there is coding for liveries with the GPS. Maybe it's just a matter of selecting it. I'm currently looking at getting the flashlight and shadow working with it. Unfortunately, it requires making it local or adding the effect to fgdata. I'll need to consult on this.
will open a new issue for the shadow of the compass, or have you fixed it already?
I actually already did it and pushed it to the PR.
@gilbertohasnofb I positioned the GPS like you suggested. It obviously doesn't have the angle shown in the picture thus you can't see where the mount would be. You think this is good? Or do you want more of an extreme angle. If we leave it like this then it works for copilot also. If we make it more extreme then we should add a rotation animation to rotate it to face the copilot when in that view.
I haven't had a chance to look at darkening the case yet.
I think this is good, but I would still model a super simple mount as there might be some angle from which that might be seen. And we don't want a bunch of reports entitled 'bug heelpz!!! GPS FLOATING OMG!!!" :wink:
No rush about the texture. And we could also change the default position of the GPS antenna, as I think the normal operations position is upwards and not how it is right now.
I think I figured out a way to add the shadow effect to all the objects in the cockpit without having to use relative coordinates. I'm experimenting with the garmin196 and the yokes to prove if I am on the right track.
Anyway... :smile:
The antenna, it actually has a means to position it to a default angle, yet I am struggling to do that for some reason. I'll keep trying hopefully until I figure it out.
I agree about the shadow, it would be nice but it doesn't make sense if there is so much complication. At least with the black GPS this should be less noticeable anyway.And by the way, this screenshot above is looking great! I love the new mount, looks really fantastic -- where is the texture coming from? Did you use something from panel parts? Looks amazing.
As for the antenna, I am indeed talking about the default angle. I also tried once to change its angle but for some reason I could not figure it out how.
where is the texture coming from?
There were two textures available, the one you pushed to Models/Interior/Panel/garmin196
which I used first, and there was also one in /home/wayne/FGFS/install/flightgear/fgdata/Aircraft/Instruments-3d/GPSmap196/gpsmap196.png
which I think is what I am using now.
Do you have a preference? Yours could stand more contrast, the fgdata one could stand some smoothing.
Your push
One in fgdata
Do you have a preference? Yours could stand more contrast, the fgdata one could stand some smoothing.
@wlbragg You are very polite in the way you put it, which I appreciate, but let's be frank: the texture from FGData is a thousand times better than what I had come up with, so let's please use the better one! Would you care to delete mine from the branch you are doing these modifications then?
But my question was rather about the texture of the GPS mount, are you using some texture from panel_parts.png
?
are you using some texture from
panel_parts.png
Yes, I'm using this (only the bottom part), not the circle.
Yes, I'm using this (only the bottom part), not the circle.
Very smart, it looks great!
let's be frank: the texture from FGData is a thousand times better than what I had come up with
You might think, but there really isn't much of a difference when seen in the sim in most lighting conditions, especially at a distance. Up close the one you like better is kind of ugly. If you ever felt really ambitious you could use the best from both textures.
@wlbragg I will take a look at this.
@wlbragg could you please try this texture here?:
I used the FGData as basis for a new one, adding more detail and grain to it which should help when zoomed in. I also tried to improve the marks as they were too "patterned" if you know what i mean. I pushed this texture to the c172p-Textures repository but you would need to manually add it to your working branch as I don't know where you are working on the GPS
@gilbertohasnofb the new texture looks really good, thanks for doing that. By the way, so far the only way I could get the texture to be used was to name it coque.png and let the .ac use it. You are supposed to be able to use a texture for it like a livery, but I was not able to do so. I figure it doesn't matter as we have no reason or need to change it at will.
Here is where it is at, I think it is looking really good! To get the shadow correct with a relatively positioned object without having to reposition the object to absolute positioning, I assigned the object its own effect file (shadow cube) and subtracted the objects offset from the original shadow cube's center, plus added the objects x offset to the shadow cube's x scaling factor. It looks like it worked and the shadow appears to be really close to where it should be. Changes that have to be made to do this depends on the object and how it is introduced into the sim. For example, I had to bring the garmin196 local to the c172p file structure so I could add the effect into the garmin196.xml and not affect other aircraft that are using the shared files. The yokes had to have their own separate yoke-l.xml and yoke-r.xml so I could give them each their own effect file containing their shadow cube with applied offsets. So far I think the results is worth it. Whether this is going to be effective for the instruments, I don't see why not. It saves an enormous amount of work. The one thing I am not clear about is the overhead from having a dozen or more extra cubes animating. FYI: I am asking Thorsten's opinion on all of this.
@wlbragg Happy you like it! I also think it looks very good now :smile:
By the way, so far the only way I could get the texture to be used was to name it coque.png and let the .ac use it. You are supposed to be able to use a texture for it like a livery, but I was not able to do so. I figure it doesn't matter as we have no reason or need to change it at will.
Oh, I remember running into something like this. But as you said, it doesn't really matter as we just need one single texture for the GPS.
I had to bring the garmin196 local to the c172p file structure so I could add the effect into the garmin196.xml and not affect other aircraft that are using the shared files.
I don't see any problem with this, and this way we have more control over the GPS. It's all nice and fun to have shared resources at FGData so that everyone can use it, but for anything complex or that need tweaking that becomes a nightmare.
So far I think the results is worth it. Whether this is going to be effective for the instruments, I don't see why not. It saves an enormous amount of work. The one thing I am not clear about is the overhead from having a dozen or more extra cubes animating.
The shadow looks amazing, and I am all for using absolute position for all objects. But about the dozen extra cubes, that sounds more problematic... are you saying that each object will need its own 6 cube textures according to its position?
The shadow looks amazing, and I am all for using absolute position for all objects.
This is "without" absolute positioning. The only reason we needed to move the objects to absolute positions was to use the existing cube and still have its current position work correctly. Instead of positioning the object to match the position of the cube as laid out for the rest of the absolute positioned objects in the cockpit, we can assign a new effect file that moves the cube's position and scale to offset the offset of the relative positioned object. In other words, instead of moving the object we can just move the cube. Now, I'll admit I am having a bit of a difficult time doing so precisely, but I think it is because I am not the brightest bulb in the shed. This image has everything in it to be able to calculate the new cube position for all 4 of the test objects respectively. OAT GPS Left Yoke Right Yoke Anyone else want to take a crack at it and let me know if I am on the right track?
This is "without" absolute positioning.
I see.
The only reason we needed to move the objects to absolute positions was to use the existing cube and still have its current position work correctly. Instead of positioning the object to match the position of the cube as laid out for the rest of the absolute positioned objects in the cockpit, we can assign a new effect file that moves the cube's position and scale to offset the offset of the relative positioned object. In other words, instead of moving the object we can just move the cube.
What would be the advantage of moving the cube relative to each object instead of moving the object itself?
Now, I'll admit I am having a bit of a difficult time doing so precisely, but I think it is because I am not the brightest bulb in the shed.
Super naive comment which is certainly wrong, but isn't it a matter of simply adding the coordinates of the cube and the object? Example, if an object is at [0, -1, 0] then adding that to the cube will subtract one of its y-axis, effectively lowering it by 1 unit and therefore being in the same relative position to the object as it was to the interior before. Or is this completely nonsensical?
What would be the advantage of moving the cube relative to each object instead of moving the object itself?
Because many of the instruments have some fairly complex animations that are all based on the origins of 0,0,0 and you have to account for all of that on every object you move. I had to do it for the compass, which when I figured it out wasn't that difficult, still it took some effort.
isn't it a matter of simply adding the coordinates of the cube and the object?
Yeah, that is what I though. But I am getting far closer results if I subtract the offset. Unless it is because I didn't also change the scale when I first tried the addition. The scale should need to be changed.
Actually, it doesn't seem like the scale should change if your moving the cube to the correct position.
But I am getting far closer results if I subtract the offset.
That's weird, subtracting should take the cube away from the object.
Actually, I just did some tests and it looks like I am not changing anything no matter the coordinates I am using. I'm getting the default cube shadow placement. Almost like I am using the wrong effect definition file which I don't think is possible. I'm going to continue to have to investigate this, until I can get the shadow displacing, something is wrong.
I think I may have found my problem. I had a second effect definition floating around. Still the coordinate positioning in not behaving as I expect it to..
OK here is what worked for the GPS, anyone care to explain, I'm all ears!
Original Cube Center (offset from 0 / 0 / 0) (this is what the main cube for the absolute positioned objects in the cockpit is positioned to) 0.45732 / 0.0 /0.1825
GPS offset from 0 / 0 / 0 -0.305 / 0.26584 / 0.0566
Adding GPS offset to Original Cube offset 0.15232 / 0.26584 / 0.2391
Subtracting GPS offset from Original Cube offset 0.76232 / -0.26584 / 0.1259
This is what lined the shadow up correctly (position of the new effect file's cube) 0.76232 / 0.0 / 0.1259
I really don't understand, but I guess I don't have to so long as this works throughout all the objects that we are dealing with.
Gosh, that's weird... to it's x1 - x2, y1 + 0, and z1 - z2, what a mess! A question: is isn't the cube centred at [0, 0, 0]?
It gets weirder To get the Left Yoke shadow correct
Original Cube Center (offset from 0 / 0 / 0) (this is what the main cube for the absolute positioned objects in the cockpit is positioned to) 0.45732 / 0.0 / 0.1825
Left Yoke offset from 0 / 0 / 0 -0.36 / -0.219 / -0.130
Adding Left Yoke offset to Original Cube offset 0.09732 / -0.219 / 0.0525
Subtracting Left Yoke offset from Original Cube offset 0.81732 / 0.219 / 0.3125
This is what lined the shadow up correctly (position of the new effect file's cube) 0.81732 / 0.219 / 0.3125
Edited for math error.
I have proof https://www.dropbox.com/s/sy1c7u04cb1hfuw/2018-03-04%2014-19-20.mkv?dl=1
The left yoke and the GPS have correctly positioned shadows per the numbers above. Unless I can figure out what is going on here it is making it really complicated to figure out any individual object.
@wlbragg We could perhaps ask Thorsten for some advice, he has a very keen eye for these sort of things!
I'm PM'ing him now...
I have proof
But with all said, this video you posted looks stunning, the shadow effect is so immersive!
I know, can you imagine with all the gauges shadowed. I am hesitant to continue too much farther though because if we redo (move) the cockpit dash, even using relative positioning, then all the cube effect files have to be recalculated too. So I may have to switch to the dash repositioning first to save on duplicating math problems.
So I may have to switch to the dash repositioning first to save on duplicating math problems.
That sounds wise. I don't think we should touch the positions of any internal object until that is done as that will very likely mess up all positions in the cockpit!
@wlbragg Now the GPS is local to our repo, would it be possible to have a different default position for its antenna, namely 45 degrees upwards like in your shot here?:
GPS should not be behind the amphibian cockpit bars: