PPG V1.0 - Procedural Polygon Generation in Bifrost

Roland.Reyer
Autodesk

PPG V1.0 - Procedural Polygon Generation in Bifrost

Roland.Reyer
Autodesk
Autodesk

Here is version 1 of my compound pack "Procedural Polygon Generation" for Bifrost.

 

The goal of these compounds is to create a Construction History in Bifrost that uses different simple initial objects - simple blocks of a few polygons - to create complex buildings that automatically adjust to the scale.

 

The concept for this kind of modeling was presented by my colleague Maxime Jeanmougin at GDC 2022 as a Platinum Games employee, and he referred to earlier work by Akira Saito.

 

Compatibility:
Tested with Maya 2023, 2024 and Bifrost 2.6 , 2.7.0.1

 

IMPORTANT NOTE:

If you are working with Maya 2024 then the colors of the node "PPG_diagnostic" are too bright.
Change the "Brightness" in the section "Color Tags" to 0.32 and the "Default Tag Color" to 0.16, 0.16, 0.16
Then re-publish the node to the folder "PPG_V1.0\compounds" with the namespace "PPG" to keep these settings.

 

Tutorial video:

https://youtu.be/PVBomEk2qw4

 

 

Snag_4d8c6a23.png

buildingRender.jpg

balcony.jpg

Reply
4,803 Views
18 Replies
Replies (18)

darioOrtisi
Collaborator
Collaborator

It's huge work. Thanks @Roland.Reyer 

0 Likes

trevor
Contributor
Contributor

I have some questions regarding PPG_instance
How best to use the instance ID's
These work quite differently to the usual Create Instance node where the oder of the instances can be controlled by an Array.
I would like to control the specific mesh being assigned to rows– however the IDs change when geo is assigned breaking the numerical order.
Create thisCreate thisBut only manage this so far – needs to be arranged in strict rowsBut only manage this so far – needs to be arranged in strict rows

0 Likes

Roland.Reyer
Autodesk
Autodesk

Instance IDs doesn't work as intended?
The "Selection Mode" needs to be set to "Sequential". (I will fix this in the next version).
Please let me know if it is still broken.


The trouble with Instance IDs is that the number of instance points is (intended to be) quite variable.

 

The more pressing question here is: how do I assign different (sequences of) instances to different floors?

Lets say

  • we want the instances A, B, C in the ground floor (randomly)
  • instances 1, 2, 3, 4, 5 in the second floor (in this order, repeating)
  • instances x, y, z in the third floor (randomly)

This is NOT possible in the PPG_instance node itself.

You will have to create an ID array with exactly the IDs for all instances.

 

You could get the centers of the selected faces, analyze their Y coordinate and from there create an array of IDs for the instancing.

 

trevor
Contributor
Contributor

Thank you for the response.

I did create an array with the exact IDs.
However the IDs change in a very odd way.
Or at least they did with one particular attempt.
In any case this is the set up and outcome – maybe I am approaching it incorrectly?

 

I would have though that specifying the ID would limit the mesh assignments to only those ID stipulated.


image.pngimage.png

Roland.Reyer
Autodesk
Autodesk

Oh, I see.

 

The input „face_IDs“ is for selection of the faces, together with the face tag expression.

 

The input „instance_IDs“ is an array that specifies which instance geometry to use for each instance (in your image there is only one instance geometry).

 

The IDs should be plugged into „instance_IDs“.

0 Likes

Christoph_Schaedl
Mentor
Mentor

Nice work trevor. Make sure you show us the final result!

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes

trevor
Contributor
Contributor
Thank you Oglu
I will attempt to do so

trevor
Contributor
Contributor

Thank you again Roland for your continued support.
Unfortunately I am still confused being new to Bifrost. 
Apologies for the long response. Please bare with.

Generally speaking it could well be I am asking the PPG system to do something it isn't intended to perform as excellent as it is. Equally it could be that I am just not understanding how the ID system works or both.

 

Being able to throw some Neo-Classical geo at a Bifrost cube and get a stretchy building back is a rather attractive proposition.

In my head if a face has an ID of say '11' then I should be able to place a 'window' mesh version 'Square' directly onto ID 11. Either by directly calling 11 or by an array that associates Square with 11 in some sort of order or specific non-random pattern. Neo-Classical architecture is very strict in its ordering, layering, proportion, ornamentation and weight. Not that I am a student of it – I just follow what my eyes see. It is a pattern that arrays and face divisions would ideally suit.

I could achieve a building using points instead of faces. It is just a great deal more complicated to do it that way. Sub-dividing faces seems to be a better fit. Scaling a cube in the editor pane is a better option than puzzling over numerical sliders as a method of adjustment.

In the following image the reading tables their variations and chairs their jitter and random rotations are all controlled by points maintaining translational and instance control. Put another way still fully adjustable.

image.png

The above haas been written to disk as USD through Bifrost and taken over to UE5 successfully. It isn't finished but getting there.

Enough background back to the point in question.
I just can't seem to get the ID's to work the way I would like – must be missing something quite basic.

In the following image the two geo variants just alternate over the rows.
The objective is to have the variant with the skirting to be just the bottom row.
The variant without the skirting is to take the three rows above.
This would likely require two PPG_instance nodes
One specifying the lowest row and the second controlling the remaining rows.
I have tried all manner of approaches in specifying the face and instance IDs but can't find the logic.

Please – where am I going astray?

 

image.pngimage.pngimage.png

trevor
Contributor
Contributor

Hold the phone I believe I am on to something.

 

image.png

0 Likes

trevor
Contributor
Contributor

This is now starting to get somewhere.
I am seeing a pattern.

image.png

trevor
Contributor
Contributor

I am beginning to understand your comment Roland:
"The input „instance_IDs“ is an array that specifies which instance geometry to use for each instance "
Its a grid – maybe.

trevor
Contributor
Contributor

Although I have managed to get as far as the image below and can take it further to reproduce a facade.
When scaling the numbering will naturally change likely in a pattern that could be understood but would become quite complex when having to match the geo to the new numbering matrix.

When scaling vertically the whole multi-cut collapses. Suggesting that I am pushing the whole idea too far.
It may well fair better if the window 'Outers' were reintroduced. They don't quite zero out in any case so probably shouldn't try.

Might I still be missing something?


image.png

Looks good for reproducing a facade that will only uniformly scale

image.png

Vertical scale not so good

 

image.png

Horizontal might work if the ID arrays could be managed

 

 

Roland.Reyer
Autodesk
Autodesk

I have already built an option to scale the instances uniformly.

 

You could set the PPG_multi_cut so that the spaces between the windows are flexible.

That way you can set fixed sizes and ratios for the windows.

Christoph_Schaedl
Mentor
Mentor

A sample scene with this use case could be interesting. 

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes

trevor
Contributor
Contributor

Would you like me to send the current scene to you?

0 Likes

Christoph_Schaedl
Mentor
Mentor

I would recommend to send it to Roland. Cause he would do his magic on top. 😄

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes

trevor
Contributor
Contributor

Happy to if there is a private method of delivery

0 Likes

fizakhan15697
Community Visitor
Community Visitor

It seems like you have made progress in reproducing a facade, but you are encountering challenges with scaling and matching the numbering matrix. Scaling vertically appears to collapse the multi-cut, and reintroducing the window 'Outers' might be a better approach, considering they don't exactly zero out. Take care not to push the idea too far to maintain the desired outcome. Good luck!