Jump to content

edit Curve SOP's @P within the "Geometry Spreadsheet" and the "Soft lock"


ikoon

Recommended Posts

if i understand correctly, you've got like 1000 blueprints and you want to say - hey, blueprint number 568, set your height to 12.

in that case, wrangle SOP is your friend:

if(@primnum==568) @height = 12;

if you want to edit a bunch of prims you can chain them:  

if(@primnum==568 || @primnum==654 || @primnum==33) @height = 12;

i'm using @primnum in these examples (which refers to the particular primitive number) but you can use any attribute:

if(@P.x>10) @height=12;

(modifies all prims with X axis position value > 10) 

obviously this becomes cumbersome if you want to edit more than few values. in that case you can first group them and do the operation on groups (the group is called "abc" in this example):

if(@group_abc) @height = 12;

these are just some trivial examples of how to manipulate subsets of data but possibilities are endless. you can get very creative here with arrays and loops here, you can filter things by incomins attribute values (names), it's location or a distance from something, by it's size, by user defined tags, you name it. 

Edited by davpe
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Thanks for replay Dave, sorry for late reply - I had lots of other things going on.. 

Your suggestion is possible but I cannot imagine an artist writing a vex code like this for 20+ parameters (like roof_type,building_height,facade_texture.. like on screenshot) for thousands (more likely 50k+ building footprints) when he wants to override default values on certain individual buildings or groups of buildings when much better approach would be to just select a footprint (or group of footprints) and then use a menu like on screenshot to comfortably edit these values

Screenshot_1.jpg

 

Now, when I create such a menu, its changes apply to everything inside geometry node (in my case to all 50k building footprints there) and not to individual footprint that I select. For that to happen, I would need to have each building as separate geometry node which is possible but would create 50k geometry nodes and managing that is a nightmare - not mentioning that I would then lose ability to detect surroundings of each building (like when 2 buildings are touching each other at one side - so I wont put window there etc..)

I see this as basic capability - being able to select something, set parameters of it where randomly suggested parameters are not correct and then let houdini's vex procedural magic do the rest... Is there really no user-friendly way how to achieve it? Even some nasty hack?

For example I have working python menu, I can get primnum from selected footrpint but I cannot edit geometry from python (because this is not possible accordind to other posts) But I can modify value from geometry spreadsheet.. is there a way how make same kind of geometry spreadsheet modification programatically using python? 

Or generating entries like this

if(@primnum==568) @height = 12;

according to entries from some custom python menu and than saving them as new entries as vex in some wrangle?

 

user anim also suggested using TOPs in this post but either I don't understand it or I don't thing it has the ability that I need + it is very slow in my testing

 

Any help would be greatly appreciated. I really love what houdini is capable of  - unlike other software that I used so far..  but I have been stuck on this for past month and getting hopless mainly because it looks so simple to do but somehow I cannot find a good solution..

Thanks

Edited by mara_91
rephrase
Link to comment
Share on other sites

well most importantly I think if you deal with 50k asset variations, which is like... I can't imagine what would you need that many for, but anyways - with that kind of stuff you don't wanna do any kind of manual editing as that would obviously be super tedious labor. instead you want to generate this by some controlable randomness. you need a system that takes some variables, add some logic related to them, shake it, and then let it generate many many houses, according to the rules you've put in. then, if you want to cherry pick and adjust some specific iterations, you can do it at the end of this process.

obviously this is not a trivial task, and we're talking about multiple different challenges that each can be approached different ways. depends what exactly you need, how much time and skill you have, and how realistic result you want. 

Edited by davpe
  • Like 1
Link to comment
Share on other sites

I know its a lot but it is doable and we did stuff like this in past on even a larger scale.. :D  

Because all of it is generated randomly/procedurally it doesn't mean that artist has to edit all of it - he edits only few places where he sees something is wrong - like some places where procedural code generaded an undesirable result.. But because of this, I need all the buildings/footprints to be editable just in case some of them need to be modified.

since TOPs are hard to use, there is little information about them and they are slow they are out of way, modifying geometry with python gui would be very nice way to go but this is prohibited.. I'm trying to inject vex code from python to edit geometry but not luck so far.. Manually modifying values in geometry spreadsheet is possible so I'm trying to do that programatically from python but I cannot find correct function for this. So I'm left with a last resort of having each building as a separate geometry node if there is really not any elegant solution to this problem

Link to comment
Share on other sites

7 hours ago, mara_91 said:

But because of this, I need all the buildings/footprints to be editable just in case some of them need to be modified.

Why not edit after the generation of geometry? You can make a random result, pack it based on attribute, then when you notice the wrong ones, hand pick them, split them and unpack and edit as much as you wish. 

If you have some art direction situation it would anyway be dependent on what's seen in the shot, right? 

Link to comment
Share on other sites

 

16 hours ago, skomdra said:

, then when you notice the wrong ones, hand pick them, split them and unpack and edit as much as you wish. 

You mean doing 1st pass by generating random result and then 2nd pass to manually edit model of wrong ones?

If so than that is possible.. but imagine I make a random result and then need to add 1 more floor to certain building..  Manually modelling that either in houdini or other 3d app would be much more time-consuming not to mention that the procedural code also generates interiors of buildings and makes them 2-manifold for use in destructions that we also need.. doing all of this manually would be too much work and prone to human error (in case of 2manifolds) compared to if I just selected in some gui as shown above that I want 1 more floor and procedural code will take care of all of it..  after all of that hard work has been done meaning using all parameters to procedurally generate building as close to reality have been set, then the artist can further manually-edit geometry for better photorealistic or other artistic result thought this is rarely needid in our use-cases

Or maybe you are refering to doing 1st pass by generating random result and then 2nd pass where I discard wrong ones and then re-generate only the wrong ones with correct attributes? If so then for example I have 50k of buildings and 1k of them need fixing - so I separate 1k of buildings and need to fix them. But now I am in the situation I was in begining where I need to modify each building from this group of 1k builidngs with specific parameters of procedrual code..

Link to comment
Share on other sites

If you need manually adding floors, you would use some procedural way to do that rather than hand modeling it and that system can work independently from your scattering and city generating system. It can use many layered procedural systems, for example, you can have a hda for the building iteration, then scatter those buildings and for any wrong result you can just replace it and iterate over results for that specific building. It is still a lot of less time needed than hand placing it and solving the rest. You can also manually paint attributes to use it as additional art direction of the generation. I would combine this based on your preferences, and still leave room for hand picking assets and replacing them when ever needed. Your need seems a bit complex, but it is doable, with some planning. In any case, there is no magic button which will solve all the problems, some things have to be project specific, but in building those interfaces you can use a lot of clever way how to avoid artists to dig under the hood and just play with tools, but it will take time to properly develop it, and a lot of testing.  

Link to comment
Share on other sites

Thanks so much for a quick and in-depth reply

1 hour ago, skomdra said:

If you need manually adding floors, you would use some procedural way to do that rather than hand modeling it and that system can work independently from your scattering and city generating system. It can use many layered procedural systems, for example, you can have a hda for the building iteration, then scatter those buildings and for any wrong result you can just replace it and iterate over results for that specific building.

You are probably refering to using instances - to have a system to generate different types of buildings, then scatter them as instances and if anything is wrong, replace these buildings with different instances... That would work but unfortunatelly, all of our buildings are unique because they must fit to their unique footprints according to reality thus we cannot instantiate anything and I don't understand how this can be used in my situation

 

1 hour ago, skomdra said:

You can also manually paint attributes to use it as additional art direction of the generation.

That is possible but probably usable only on true/false variables. I think it would be very complicated using color-paint to define a number representing for example building height or a path to specific texture that artist wants to use...

 

 

Link to comment
Share on other sites

It looks like you have a nice little engineering problem on your shoulders here :) I wish I can help you, but this would really take a lot of experimenting and trying different pipelines. I understand what you need, it just takes time to figure out all those problems, not something which can be solved quickly, but rather by studding the tools, writing down some possible solutions, testing, and like that until you make it.  In one point, the question is, is it really worthy, for what purpose you are doing it, what is the final outcome, etc. And I don't know your parameters, budget, scope, calendar, size of your team, etc. 

  • Like 1
Link to comment
Share on other sites

Thanks for reply, 

Basically we need to re-create a part o real world (for example 30x30km, few big cities..) It doesn't need to be 100% realistic (because that is impossible) but we need to use as many information as possible for example from GIS data where it contains exact shapes of footprints, sometimes even a parameters for building types, building heights, roof types...) and the missing information will be extrapolated from other data or guessed using (for example) randomization

The end result will be a city, with roads and all of its details. All automatically (procedurally) generated. - Up to this point all of this is possible in houdini (which is awesome).

But this city will of course contain some errors on some places. Now to fix them, users will check what parameters are being used to generate that specific problematic building and change them and re-generate that one specific building (or group of selected buildings) using these modified parameters - and here is the problem. I cannot just select one specific building (or group of selected buildings) in houdini and edit parameters for that one specific building like this:

Screenshot_1.jpg

because this window sets these parameters for all the buildings (footprints represented by primitives) inside this node. So I am looking for a way how to solve this and the solution should be user-friendly because users will use it a lot (for example fixing 1000 buidlings out of 50000 ones..)

Of course in special cases, if we need some landmark or somethig specific, we can swap this procedurally generated building with manually modelled one but most of the time, we would just need to adjust these parameters for procedural generation to achieve desired result since it is much faster than manually modelling everything.

I believe most applications work in a way that you have some layers or groups and they contain individual items.. and if you want to change something, you just select that item and change it in properties window (let's call it layer-based approach). But in houidini, since it is unlike any other app that i used so far (meant of course in a good way ) it uses node-based approach and not layer-based approach as described earlier resulting that you tell the node how to process items its containing and cannot pick individual items from there - or at least I don't know how to do that...

But given the fact that houdini is a tool for making tools and it has really endless possibilities I would assume that something simple like this could be done but since I'm still newbie to houdini, I don't know how. And I believe such functionality must exist otherwise I cannot imagine how they did for example spiderman game as shown here (yeah they use instanced buildings not unique as in my case but still they need to have some iterface for swapping these buildings or modifying ways how to scatter assets on streets etc..)

or any other AAA games made with houdini ...

Edited by mara_91
Link to comment
Share on other sites

I would in that case build different tools for different kinds of scenarios and make these tools work together, depending on the situation. For example, separate tool for the whole city, separate for the neighborhood, separate for the city block and separate for one building, and separate for inside of the building. Then I would offer the pdg scenarios to bake buildings depending on small LOD or to have hero buildings, then the ones which have to be destructed with built in different fracturing modes, constraints. If you need to build more different cities like for a game, then it can be a very complex setup, especially for someone who is just a beginner, so I would suggest the usual scenario - split your big problem in smaller ones, then even each of it on even smaller one, then attack one after another. And step by step, you will figure this out. I didn't work in a game studio, but I would guess, this can easily take weeks or even months to build such set of tools from scratch. As I said, there is no one button rules them all solution in houdini, houdini is an operating system, workflow rather, but you still need to do your planning and engineering based on the scope of your project. 

  • Like 1
Link to comment
Share on other sites

Thanks for reply. I agree that decomposing problem into smaller ones (or step by step) is the best approach - which is what I do.  And one of these steps is to be able to take some input data and being able to modify them - But houdini can do this only per-node an I want this to per-primitive. - I don't understand how can I spit this elemental ability to anything smaller.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...