Scaling parts of an object programmatically

Hi!

I have built a 3D configurator where users can adjust the lenght, size, height of a flightcase - basically a box. I have built the model ‘by hand’ meaning all object are computed individually. This works fine, however, it’s very custom and not easy to port to other uses than this specific one. It can be seen here: https://f10cases.com/flightcase-configurator/

Now, the question I have is:
Is there anyway to scale only parts of a 3D object?

Image you have a box - a square - where the walls are 10 mm thick and the box itself is 100 cm wide. If I want to scale this box (entity.scale(…)) and make it wider to e.g. 200 cm, then I also end up with a wall that is 20 mm thick.

I have not figured out a way to only scale parts of an object. If it was possible to mark some parts of the 3D object as ‘not scalable’, static or whatever, it would be extremely nice! I’m mostly a programmer, not a 3D modeller, so maybe this is already a parameter that can be set on a 3D object?

Any help to figure out if this is possible would be greatly appreciated.

Thanks!

BR,
Jimmy

Assuming you have an open box model with each side a separate mesh, you can scale each mesh independently of the entity. Each mesh instance in a model is a graph node in the hierarchy with the name given to them in the modelling editor. (You can access them via findByName / via the children in the entity that has the model component).

That said, there it doesn’t solve the problem of making the box longer by only scaling two of the sides as they are separate meshes.

What I suspect you might have to do is to add extra bones or nodes to represent where parts should be anchored to.

Another possibility is to map bones to the model and ‘scale’ different parts by moving the bones.

These is just ideas, a modeller would have a better idea here.

The alternative here is to look at generating the mesh at runtime. Or using smaller meshes to build a larger one (eg staircases, buildings).

Thanks for your ideas! That’s exactly what I was hoping for - to get some inspiration for areas to look into. Thank you!