BeamNG / Blender-JBeam-Editor

Blender plugin to import, modify, and export JBeam.
MIT License
60 stars 4 forks source link

Suggestion for representing inter-part beams #10

Closed MrTheRich closed 7 months ago

MrTheRich commented 9 months ago

I'm not sure if you've already been working on a solution, but i have an idea for handily representing inter-part beams.

Whenever you import an jbeamfile with inter part beams it creates a single extra object called __interpart_beams__ or similar. This object holds edges of which it's vertices don't just id names, but the name of the part they are referencing. The script on export then, either checks for id name or matching location to see what node it was actually connected to. (using the duplicate node name code you already have)

You can easily create and move these new edges using blenders magnet/snap tool and this can be noted in the documentation. You could also have the script run a check to update the inter-part beams after you drop out of edit mode for the part, so that you can correct the beams after the nodes might have moved.

I might actually try to implement this in a fork of the script, to see if it could work. Feel free to implement any code I add if you think it's useful.

I think this script can become a very powerful ui modding tool for modders, helping them create jbeams faster and improving their results leading to more impressive mods with amazing physics.

angelo234 commented 9 months ago

Actually I'm working on importing the full vehicle. It's currently working actually, and how it's implemented is each part has all nodes of the vehicle, but each part has their own beams and triangles, including any inter-part ones :) Updating the position of a node in one part updates them in all parts. So this is how inter-part stuff can be possible. It might sound laggy, but I can actually move all nodes of vehicles I've tested with not too much lag.