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
Shields, newer-better-meshier... #2491
Conversation
It looks like you are using shaders for the new shields? What happens if you have shaders disabled in game? Will it revert to the old (current) form, or does it still use the mesh with basic colours? |
@Zordey At the moment I just haven't cared about non-shader problems. Hadn't even thought about it as even the problems that the ATi X1950 has had with the game are still capable of using shaders. |
Obviously, do not try and merge ;) |
#2493 was just merged and probably breaks what you're doing a bit. Though it occurs to me that you might be able to use it. ModelBodies can now have multiple collision meshes, so the shield could just be a magic one that overrides the others when they're up. Not that I've given it more thought than what was required to write this paragraph :) |
Sadly I'm really struggling with the collision stuff :( |
In the interests of splitting this into separate commits for the rendering and the shield collisions I've removed the collision mesh work from this commit. The hit rendering effect is still present and it's visible in certain cases where the collision mesh is very close to the shield geometry, also it's clearly visible in the modelviewer. |
Bug fixed, memory trampling due to stupidity. |
I got this compiling and running on my Linux Mint 15 machine this morning before work. @robn that should save you rebooting into Windows ;) |
Brought up-to-date with master. |
Updated to master again, no troubles merging this time :) I have no plans to work on this any further until this part is merged in or I've got some feedback about it. |
Not forgotten, I promise. |
It's ok I'm not complaining, we do seem to be really reviewer bound at the moment :) especially with me backporting stuff from Paragon. |
Re-merged, fixed conflicts etc. |
GCC gave some The shields appear to be oriented incorrectly. I guess its supposed to be facing the camera? Some of the newer ships don't have shield meshes, and so display nothing. Is there an easy/obvious way to create a mesh for something that doesn't have one? Or should we just require it for all ships that can equip shields? I'm inclined to just say "require it". @nozmajner, do you have an opinion? Can you provide meshes for the other ships we have? The "hit it" button in the modelviewer trips an assert if the model doesn't have a shield.
Does the |
Weird the orientation is ok for me. Looking into it now. |
I checked, the meshes have their orientations properly, Y+ fwd, X- left Z+ up. The Nerodia and Sinonatrix were missing them, also the two versions of the Kanara and the Malabar/Vatakara pair can share them. |
Ah, found it :) that |
@nozmajner Some of the hardness I can probably counter in the shader, will have to see. |
Conflicts: src/Ship.h
Crap, it had output variables. Sorry, I should have looked more closely, |
Easy to miss, I shouldn't have left it there. |
Ok, fixed a bug with pressing the |
Great! I've got the code and the new meshes onto my laptop. I'll put it all together and merge it on my train ride. Cheers! |
Too late!!! |
Hah. Ok then, backing out the merge that I hadn't pushed yet because my network on the train crapped out ;) |
Meh, bollocks to it. I wrote the changelog already. Our model update commits are the same, so I've taken my merge to master, picked @93dbfc0 onto it and pushed. Job done! |
Excellent, next improvement will be to figure out how to get things to actually hit the shield mesh itself! |
Description:
Mesh shields, 2nd attempt based on the aborted #2139 and feature request #2013.
This is a much simpler version, no textures, a very basic shader and as little hacking as I could manage.
Problems:
This is subjective of course but there are parts I'm not sure I made the right choices:
Functionally it all seems to be correct and working, I need to add a better way of accessing the colour, and it does still "behave" in the same way as the old shields - charging up to full power and then vanishing, but no-ones said what they'd like to see done about that so I've left it as-is.
Andy