Transform any Mesh to complex Lego Geometry (Examples inkl.)

   1145   13   2
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
Hey Community,

nice to finally be part of the Houdini community. It is going to be great.

I'm very new to Houdini and will be using the software primarily for special FX like many in my line of work. But my first urgent project is already overwhelming without help.

I need help creating an asset that will allow me to turn any mesh into a complex Lego object. To make it easier to understand how exactly this should look like, I have linked some examples from other Houdini users.

Unfortunately, I don't even have a plan as to which tutorials and courses would be most suitable for targeting and implementation.
So please! If someone could make my way a little easier, has tips on which tutorials I should start with or can name some nodes for a more detailed assessment, I would be more than grateful.

Best Regards
Boris



Examples:
https://youtu.be/Ty-EKd9W0w8 [youtu.be]
https://vimeo.com/432816453 [vimeo.com]
https://www.behance.net/gallery/99293485/LEGO-Generator [www.behance.net]
User Avatar
Member
632 posts
Joined: Sept. 2013
Offline
Hi Boris,

have you seen this already?

https://www.youtube.com/watch?v=kljy7fuPc5k [www.youtube.com]
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
Hey! Jo I watched all Houdini tutorials with Lego content. Unfortunately, I need the functions for generating procedural landscapes as mentioned in the examples.
User Avatar
Member
632 posts
Joined: Sept. 2013
Offline
You can fill meshes with the points from volume-node and take the volume's gradient as normal direction. Then copy the bricks onto the points. But the projects you've shown as examples are not exactly beginner level stuff.
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
Konstantin Magnus
You can fill meshes with the points from volume-node and take the volume's gradient as normal direction. Then copy the bricks onto the points. But the projects you've shown as examples are not exactly beginner level stuff.

Yeah i know its not the easy way to start with. I Think its very Vex based. It would be cool when i have a look at a Node structure, maybe with two typed of Bricks with the right Directions to understand the Basics. Is there any Nice Houdini Expert to build me a Basic Node structure to learn it from a Example to know where i must be my eyes on to made my own? I Think the complicated part is to find the best Brick in the List insinde the Nore-Structure to Fill up a Mesh. And - Or Attach different Brick Sizes to each other without offsets.

In This Example from BCM Industries [www.behance.net], they has shown his Node Strukture, but i think there are more VEX Programming in it. (See Attachment)

Thanks Everyone
Edited by Boris Bartkowski - June 19, 2022 14:59:19

Attachments:
c695da99293485.5eefc7e3af536.jpg (581.7 KB)

User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
EDIT:

Ok i´ve thought a while for a solution in Volumes and Points. So my theory:
Is it possible to Fill Points with an Geometry by the Numbers of Points in every axes?
For example a 1x1 Brick can only spawn in 8 contiguous Points. A 2x2 Brick in 18 Points, a 2x4 in 32 Points and so on...Until all points are used inset the covering Geometry. With a collision, that bricks are not overlapping each other, that could be work i think. But how can i realize this in an easy way? By Groups? By Geometry size as Bounding box? I dont know. In the meanwhile, i will google all informations about the volume gradient.

Thanks!
Edited by Boris Bartkowski - June 19, 2022 19:20:44
User Avatar
Member
632 posts
Joined: Sept. 2013
Offline
Hi Boris,

here is an example for one-unit Lego bricks oriented along perpendicular volume gradients:
https://procegen.konstantinmagnus.de/convert-meshes-to-lego-bricks [procegen.konstantinmagnus.de]

Attachments:
legofy.jpg (42.5 KB)

User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
Thank you for the quick and detailed help. Also for the files. I understand a lot more now! There is only one supplementary question, which I had not addressed before. My mistake. In my case, I would like to embed already created meshes from "Mecabricks" as objects in the calculation of the VDB. I have already managed to do this. The only question that arises here is how to explicitly assign different Lego bricks for the curves.

I had already mentioned whether it is possible to assign different Lego bricks to a certain number of points.
I made a little sketch for you. I'm pretty sure that this is also the approach of the examples in order to generate a certain randomness of different stones afterwards.

So far I've done collision queries and assignments of only single points myself. But the appropriate grouping of the individual points in connection with the individual stones is still a mystery.

Thanks!!

Ive also Attached some Bricks as .obj
Edited by Boris Bartkowski - June 20, 2022 09:34:57

Attachments:
skizze-lego-points.jpg (938.2 KB)
1x1.obj (14.4 KB)
1x1-Slope.obj (6.4 KB)
2x4.obj (149.3 KB)
2x4-slope.obj (78.6 KB)

User Avatar
Member
632 posts
Joined: Sept. 2013
Offline
The second example file on the procegen-page uses a "variant" attribute to assign suitable bricks. Maybe this is helpful?
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
Unfortunately, I don't have enough VEX knowledge of my own to implement the whole thing the way I need it. I'm really starting to get frustrated. This feeling that the solution has already been implemented several times with Houdini, but no one has a plan exactly how 😅. I think without the absolute VEX professional that will unfortunately be nothing. I've now gone through all possible node combinations but you can forget that. Does anyone happen to know a platform where I could ask Houdini users with the right VEX knowledge? Unfortunately, since only Magnus has reported on this thread alone, despite the numerous views, I assume that the knowledge limit of many Houdini has already been reached here.
User Avatar
Member
6593 posts
Joined: July 2007
Online
- this is not about VEX, but the algorithm

- if you feel more comfortable with Python you can use Python SOP, that allows you to process/update your point cloud sequantially unlike VEX

- or for each horizontal level process one block at a time in Feedback For Loop SOP until you fill it all, that way every iteration you will have updated pointcloud ready for next piece to be fitted
(the horizontal levels can be processed in parallel unless you have pieces that are more than 1 vertically)

EDIT: looking at the image that's exactly what's happening, big parallel loop over levels and inside chain of feedback loops that try to fit as much of each shape as possible before moving to next
Edited by tamte - June 25, 2022 22:11:07
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
First of all, thank you for your feedback on my Houdini project. I also notice every day that this type and implementation as well as general use of Houdini receives extremely little attention on the Internet. Iam also not proficient in python… sorry… but I must finished this project to finally build my Envionments for my Game Project. But I must tell you this dump questions…

Since I keep coming across the same or similar tutorials on houdini. I've read for the hundredth time how I spawn random colors in a copy to point node or balls of different sizes etc... but unfortunately it's already hard to come across tutorials that help my goal to be achieved, so I'm unfortunately forced to tell you to annoy you again with some questions :/

1.) When I spawn Bricks in my Geo like “CopyToPoint”. In Every Point it will spawn a Brick. For a 1x1 Brick it’s easy. But How I say Houdini to use 4 Points in a square to place ONE 2x4 Brick as an example. This is the first step I must know before I go to loops. As en Example, you have X Points. Take Brick Y and Fill as many Points you can do. But there are also a new Problem. Houdini must Know that every Point is a Nub of a Brick. And then come the next Problem, what ist with the height… and so on. I Google for weeks now to find a similar Workflow in any Projects but nothing…

2.) What is the best Tutorial Series (also premium for sale) to bring me a step further in practice??

3.) is it even possible as a beginner without Vex, Python or other programming languages and a bachelor in math to develop it yourself? I've seen hundreds of tutorials and learned a lot, no question, but unfortunately everything is thematically past this implementation.

4.) How much it cost when anybody build me a Example with different Bricks in Size and Height. Maybe with 1x1, 2x2 and 2x4 Brick? I need a example to Analyse all the functions I think….
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
tamte
- this is not about VEX, but the algorithm


Yes, i don't see how you will be implement that algorithm without at little a minimal knowledge of VEX or Python. I agree with master Tomas, i don't think that part is the most difficult.


-Maybe try in 2d first?
-You will try to place larges and angular pieces first
-Try to look at the "marching cubes" algorithm it will give you a good idea how you could possibly approach the problem...
Image Not Found
Edited by vinyvince - June 30, 2022 15:09:56

Attachments:
Lego_Houdini_3DWaveFunction.gif (2.1 MB)
legolize_3dWFC_5.PNG (1.3 MB)

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
vinyvince
tamte
- this is not about VEX, but the algorithm

Hey! It’s a very exiting Example how to use Houdini. I will definitely pursue this method.

An User on Artstation has Wrote me back today with some Tipps.

Here’s a piece of his message and it’s represents absolute what I want and how do i made this.

“So, for example, if I had a 1x4 piece, I would copy the geometry to a random point in the grid and check to wee whether it's a valid position for it to be. The way I did this was to group by bounding geometry. And counting how many points were inside. For a 1x4 piece, this would have been 12 points (3 height x 4 width). 3 height points due to having the thin pieces. 3 of those fit into 1 regular block.”

This Method is in my Brain for many weeks.

Can someone could help me out, how is the Vex Code to grouping Points like this by bounding geometry, but in loop to check all the Points in the Volume or Point cloud to find all possible places? As an example for a Grid of 2x4x3 (x,y,z) Points each.

Thank you!
  • Quick Links