Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

LEGO Physics #34

Closed
MetallianFR68 opened this issue Nov 27, 2013 · 4 comments
Closed

LEGO Physics #34

MetallianFR68 opened this issue Nov 27, 2013 · 4 comments
Labels

Comments

@MetallianFR68
Copy link

Hello folks

I'm playing around with BLENDER and LEGO since a few months
I'm only a PHP programmer and I don't understand much to python

LDRAW to BLENDER import is really difficult and I really appreciate your work to make it easier.

I'm also playing with the PHYSICS engine in BLENDER.
If you import a model, for example a car, and you setup all bricks on 'RIGID BODY : ACTIVE", the car just explodes.

I found a way to avoid this behaviour by creating some RIGID BODY constraints between the bricks. I can get very realistic result by tweaking the mass of the bricks and the breakabke threshold of the constraint. For example, I achieved to create a scene where the car crashes on a wall. Some bricks are detached, some not, like in the real world.

However, creating the constraints is a very time consuming process, even for a little model.

Do you think there could be a way to create the constraints using some scripts ?
For example, the script could detect if 2 bricks are attached and create a constraints
It could then tweak the strength of the constraints by counting the number of studs involved in the connection.

Do you think that the mass of the bricks could also be set up by scripts automatically ? Is it possible to calculate the volume of an object in Blender ? You could then multiply by the density of LEGO ABS plastic, which is equal to 1.06g/cm3

These are just ideas.
I don't know if this is possible.
I would like to know your programmer opinion about that

Regards

@Banbury
Copy link
Collaborator

Banbury commented Nov 27, 2013

This discussion belongs elsewhere. Preferably a Blender forum.

@Banbury Banbury closed this as completed Nov 27, 2013
@rioforce
Copy link
Collaborator

Everything is possible in scripting, especially in Blender since it has a good API and you can repeat everything you do in Blender. It would be cool to have a LEGO physics script, but not in an importer script like this one.

@JoshTheDerf
Copy link
Collaborator

I don't think this should be closed, a good importer would load the bricks as physically correct as possible.

@le717
Copy link
Owner

le717 commented Dec 4, 2013

I do agree that this is a good idea and that it technically might be possible, but I also agree with Banbury that this would not be suitable for an importer script, but rather a utility script (there is a big difference between them). There are a lot of bricks in the LDraw Parts Library, and defining ridged body physics for them would not only take a long time but also boat the script, whose job is to import the model so you can manipulate it however you want. This is better suited for a utility script that you run after the import. In addition,

counting the number of studs involved in the connection

is not possible. If it were, then #32 could be solved in a snap.

To restate, this is a good idea, but I do not think it is a suitable goal for an importer script, but rather a utility script.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants