-
Notifications
You must be signed in to change notification settings - Fork 102
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
Replaces Raceway scene with one that opens in the SDK. Deleted redund… #308
Conversation
…ant textures. Tested on master
Nice nice.. I'll try to check this tomorrow |
Once tested by @tonihele, it's good to be merged. |
Yeah, it opens which is a major step forward. But when I press Test vehicle the SDK just crashes :O |
Probably |
It would be good to merge this anyway, seems to be all legit. Vehicle editor itself seems to work. Could be that the physics are not all correct in the model but at least it opens, that should enable many more possibilities fixing it. |
I just added a rigidbodycontrol to each mesh because it was expected by the
code. Perhaps it needs to be set up differently. I'll see if I can deduce
anything else.
…On Sun, 20 Mar 2022, 14:11 Toni Helenius, ***@***.***> wrote:
It would be good to merge this anyway, seems to be all legit. Vehicle
editor itself seems to work. Could be that the physics are not all correct
in the model but at least it opens, that should enable many more
possibilities fixing it.
—
Reply to this email directly, view it on GitHub
<#308 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB46MQXF34PG2ZYNUOLVS5LVA4PXLANCNFSM5RC4M6PA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Also, mine doesn't crash, but I get an exception:
|
I think your exception is a version mismatch. jME version mismatch. Maybe you are using jME 3.4+ but the bullet is compiled still using the old? Something like that. |
Perhaps related to the other issues, but when I choose 'Edit Vehicle' and the scene opens, the tarmac geometry seems to be rotated 180 degrees. |
VehicleEditorController had a couple of lines that changed the physics transform of the spatial:
I removed them and that fixes the visual discrepancy. I don't know if it was something that was required for the old racetrack to work properly, or something that's needed for bullet. At least it looks OK now. |
In theory, if you change the physics representation, the visual representation should also be updated by the RBC, so I can only imagine this being something to setup the scene the correct way or something because it used to be wrong in the source asset? Anyway, is this ready to merge? Because @tonihele talks about a SDK native crash? I think without that, we also get a crash though? I don't remember if it was less severe and only caused a popup to appear? |
Okay, stacktrace says
so I'd also lean onto merging this and seeing if it's gone with Minie that we have to use on master anyway, and if it crashes there, it's a job for @stephengold anyway |
If I were given a choice, I'd MUCH rather investigate a Minie bug than a jme3-bullet bug. A caveat to be aware of: jme3-bullet serialization of physics controls isn't 100% compatible with Minie. I peeked at "Raceway.j3o" and saw it includes at least one |
Oh, that may be a blocker for that PR then, unfortunately. |
If you want help converting old J3Os to work with Minie, I'm willing! |
I added the rigidbodycontrol because it was excepted by the plugin. I can
push a j3o without them. I'm away for this week, though.
…On Mon, 2 May 2022, 05:05 Stephen Gold, ***@***.***> wrote:
If you want help converting old J3Os to work with Minie, I'm willing!
—
Reply to this email directly, view it on GitHub
<#308 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB46MQWRI7V45I2M3I3XOLDVH4Z6FANCNFSM5RC4M6PA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
We have the source .blend file, so it's mostly about converting the j3o with a minie-powered SDK or tool. In theory binary format incompatibilities shouldn't be the norm I guess. |
Not until now. This is the first time in 4 years that the issue has arisen. I suspect that, in 90% of the cases, the correct solution would be to re-do the conversion from Blender (or glTF) as you've proposed here. |
Do I need to do anything? Should the new RigidBodyControls be added through code with Minie in the classpath? |
That should work. However please be aware: there's no efficient solution for porting serialized mesh collision shapes between different platforms. This relates to how Minie solves jMonkeyEngine/jmonkeyengine#254 . Here's what's going on:
So everything should work. But for best efficiency, you should generate the J3O on the platform where you expect to use it. |
Come to think of it, perhaps we don't need to add the RBC's before-hand, now that those lines mentioned above are removed. I'll double-check. And in that case, the plugin can add them, and the platform issue won't come into play either. |
In theory, you don't need something special with Minie on the classpath, since it should be shipped with that SDK version anyway. Edit:
For the SDK, this is also luckily not a problem, but I wonder how more artist oriented teams would do that, say when they design their scene with the Scene Composer and drop in rigid body controls there, instead of like having some gltf -> j3o toolchain that also sets up stuff that is not represented by gltf. |
JME is charitably described as a code-centric, developer-friendly engine. I'm guessing artist-oriented teams favor artist-friendly engines over JME. That may explain why we don't hear from such teams. In my opinion, making JME more artist-friendly would be a very good thing. So I'm glad people are working on Scene Composer. |
I was going to make the plugin do it, but then didn't feel comfortable with it saving the result. |
…n preview..." This reverts commit d08c87f.
Yeah, I guess we can easily generate the RBCs beforehand, especially if that happenes implicitly all the time if you don't have the right plattform |
Conflicts: jme3-materialeditor/src/com/jme3/gde/materialdefinition/EditableMatDefFile.java
Don't know if this has the correct RigidBodyControl's, but at least it's different! |
track.getChild("Road").getControl(RigidBodyControl.class).setPhysicsRotation(new Quaternion().fromAngleAxis(FastMath.HALF_PI * 0.68f, Vector3f.UNIT_Y).toRotationMatrix()); | ||
if(track.getChild("Grass").getControl(RigidBodyControl.class) == null){ | ||
track.getChild("Grass").addControl(new RigidBodyControl()); | ||
track.getChild("Road").addControl(new RigidBodyControl()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we'd want individual if's here? Though that would look ugly and be broken use-cases, I guess.
If we know that the Raceway.j3o doesn't have any RBCs at all anymore (which is very likely, considering we don't have them in blender and probably it would need a gltf extension anyway), we can probably also remove the if clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I've added them manually to the j3o. So in that case the whole clause could be removed. Or should I remove them from the j3o and generate every time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. I mean if they'd be dynamically generated, then we'd probably get rid of the problem that caused #278.
Otherwise, we may have another breakage when/if physics is changing again.
I guess both ways are fine for now though, especially since you already had the work to add it as well.
Do you see any downsides with code adding them though? any tweeks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're to keep the lines generating the RBC's (and keep the j3o with the RBC's) I think it would also be better to do a check first. Or how would it handle generating a new control if there already is one?
Cleanup; removed warnings, made a lot of lambdas, formatting
…ant textures. Tested on master
Fixes #278