Love what you have done with the internal walls and interior lighting.
Initially I was wondering about chopping up the ceiling into panels for unbiased rendering - user sets certain panels to emitters to represent flourescent lights (post #338). Bad idea as dividing a ceiling would create numerous unwanted faces (just for a few panels).
I understand with the number of rooms/windows, and building scale and dimensions, placing rectangles just beneath ceiling height on each floor could be problematic. However, you seem to have a way of turning the incredible into reality and you do have a custom objects feature in the pipeline for a future release, so…
wondering if for unbiased renderers like Maxwell/Fry/Lux that can only render light sources as emitters - a feature to enable rectangular panels just below ceilings please? (I have found a few scripts for a workaround but am still needing one last script function to do this without Building Generator).
Once again - very grateful for your time and willingness to share your work.
I actually use this script in my Mental ray class ( I am the instructor) as a quick building gen.
So, right now we have building with floor and windows in solid model, i think solid model is good for VFX (explosion or fracture or something). But for a cityscape, solid model waste too much polycount on floors (which is invisible to camera) and Windows. What if we can have some lowpoly building with no inside floor and texture mapping with windows (not solid model), that will make this script even more practical.
You can make simple windows by ticking the appropriate box, and you don’t have to have internal walls if you don’t want them. In fact they are off by default.
You can even specify which sides of the building you don’t want windows on, so there are a lot of ways to reduce poly count. Take off the al the bevels etc…
Hi, you can turn off all windows and then just set texture maps for the walls, with windows on them (Be sure to turn off UV randomization/normalization for the walls in the UV settings, in the material tab). So, you don’t need to use simple windows if you need even less polys.
As for the “floors” you’re seeing (even with “interiors” turned off), those are there for a purpose, and not just meant to be interior-filler. If you set a bevel on your building, and then have multiple levels (using the floor manager) with different corner settings…you’ll see holes between each layer where your walls don’t overlap. The “floors” you’re seeing are placed in the buidling to fill in those gaps.
Here is an example image showing what I mean. Both buildings shown here have mis-matched corner types (the bottom floors have bevel disabled, the upper floors have an inverted bevel). On the left is a building without the inner floors. Now there is a hole where those floors meet up. On the right you see a building with those inner floors. Now there isn’t a hole.
Maybe in the next version though, I’ll have it so that those “floors” only generate when there are mismatched corner types. Right now they generate on every floor regardless of whether or not there are mismatched corner types.
If you need buildings of even lower poly, I’d suggest using something other than building generator. Building generator is designed for buildings that will be visible in mid-close range. Not for tiny buildings barely visible. Try using pflow to scatter some textured boxes if you need smaller buildings, or maybe a combination, where you use pflow for the distant buildings, and Building Generator for the close ones.
Just curious what the bump value in the material does? Is it a mapping channel?
A few options that’d be great in the materials if possible:
Bump mapping for glass to add wobbliness with some global scale controls and it’d generate some random phases for the different material ids.
Affect shadows tickbox for vray materials / disable cast / receive shadows / invisible to gi for glass objects to speed up rendering - hacks I know but quicker to render!
A custom map slot for the reflections so you can stick in a falloff map instead of using a fresnel value - I’m doing some gradient sky type shots at the moment and it’s nice to be able to tweak the reflections fading in an out on the sides of buildings!
And most importantly once again fair play - it’s quicker again than the last version with more stability and features. Congrats, it’s a great script!
i just discovered your script today… how did i missed this before ? (next time post it in cg news…because it is! )
amazing work and generosity. :bowdown:
You can already add bump to glass, and randomize it. Here’s how:
Make sure, in the material tab under the “UVs” rollout, you unchecked “exclude windows” from the “randomize UV gizmo pos” list. This will randomize the UV gizmo for your windows, meaning that every window will have a different bump texture.
Import the bump textures you want into the texture file list, under the “Materials” rollout in the material tab (You can bring them in automatically from a folder, using the “auto-add textures from folders” button, or bring them in individually by clicking the “add” button beside the “texture files” listbox.
Change the “current mat ID” dropdown list to “Window glass”
Select your window bump textures in the texture listbox above and click “Assign selected to ID”
In the Standard Mat or Vray Mat settings, uncheck all of the texture checkboxes except for “Bump Texture”, and increase the bump texture spinner to your desired bump amount.
Now, when you generate your building, or generate the texture, all of the window mat IDs (there’s 8 of them that will be created in the mulit-sub material) will have the desired bump amount that you chose, as well as a random texture from the list of bump textures that you assigned to the window glass IDs, and the building’s windows will have a randomized UV gizmo.
Of course, you could always just use the Custom Material type instead of the Standard/Vray materials, and do that process manually (ie, choose custom material, select the desired material type and add your bump map to its bump slot).
**NOTE: there’s currently a bug in v.6 of building generator that requires both “randomize exclude” AND “normalize exclude” to be off for the selected object type, in order to get the effect of the “randomize exclude” option…this will be fixed in the next version which is coming out very soon. So, in the above explanation, in order to randomize the position of your window’s uv gizmos, make sure you also deselect “exclude windows” from the “normalize” list in the UV settings.
Affect shadows tickbox for vray materials / disable cast / receive shadows / invisible to gi for glass objects to speed up rendering - hacks I know but quicker to render!
It would probably be easier to just use a custom material for this. Just select “custom material” when choosing the material type, setup your desired vray material in the material editor, then click the “grab” button in the custom material settings.
A custom map slot for the reflections so you can stick in a falloff map instead of using a fresnel value - I’m doing some gradient sky type shots at the moment and it’s nice to be able to tweak the reflections fading in an out on the sides of buildings!
Again, easier to setup with a custom material than for me to code into the vray material settings Really, setting up a custom material takes very little time, and you have more control over the settings that way anyways. Also, maxscript doesn’t support dragging-and-dropping of maps between maxscript rollouts, so anytime I need to give users the ability to use maps for anything, it becomes a pain to code.
I’ll have a look into that so. Last one would be to assign object ids so you can get automatic matte passes for elements? Again this could be done by assigning a material id to the different mats that go in or using object id on creation - just throwing ideas out as much as anything, I’m still digging through the options
Assigning object IDs could work. I could correspond the Object IDs to the material IDs too, to keep things organized.
edit: scratch that…matIDs can be changed and are randomized, so that would make things messy. I’ll correspond object IDs to object type #. The object ID for each object type will be displayed in the “mat IDs” settings rollout, for easy reference.
Here’s a render of some stuff I’m doing with it btw - not the most exciting buildings possible with your script but they’re working well for me - thanks again!
Wow John…those look fantastic! The reflections are working really well.
Bloodavenger: A few questions for you:
How much memory does your computer have?
What is the exact error that is popping up? Is max crashing? Is windows saying it has to increase your VRam? Detailed buildings can be many hundreds of thousands of polygons…If you right click on the top left corner of any viewport, and click on “show statistics”, you can find out how many polys are being created.
To decrease the amount of RAM being used overall in a scene with lots of buildings, make sure you have “combined meshes” checked when generating, and if you have Vray or Max 2009, turn on Mr/Vray proxies.
Also, you can check the “display as boxes” option under the “generate” button to put less strain on your viewport.
Unfortunately there’s not a whole lot of ways to get around this…building generated are meant to be mid-high poly…so if you have a lot of them you’re going to have a lot of polys, and possibly RAM issues if your’e running an older machine.
I’ve done tests on my machine though, with 500million+ polys worth of buildings (tens of thousands of buildings), rendered and generated as proxies, with not many issues…so proxies are your best bet.
wow thx for the super fast reply!
lol my computer isn’t really fit to do cgi… its a laptop with 1.5ghz dual core, 2 gb ram…
i was trying to generate a couple of buildings with windows along a line. I click on the generate button and the cpu usage shoots to 100 and the ram increases very fast until it runs out of memory “3ds ran out of memory and has to shut down…”
im currently not using mr or vray (because i really don’t know how T_T). What is exactly a proxy? is there any for the default scanline?
Blood - it’s mainly down to using a really high amount of reflection on the glass and putting a bit box around the scene with this image mapped into it so the building all reflect a city!
And just on a note about proxies - renderers like the scanline in max load everything into ram before they start and if you’ve got a big scene it can often cause max to fall over (normally at around the 1.6 gigs of ram mark in 32 bit windows). Vray renders things slightly differently in that it breaks up the image into tiles and renders the image bit by bit. One nice feature that it has is a proxy object where you can save a detailed object out to a file (almost like an xref in max) and get left with a much lower res representation of that object in your max viewports. At render time vray replaces the low res with the high res object, and the important thing is that it doesn’t load up the full detail object until it gets to the part of the image where it needs it - once it’s done it dumps the object from memory so you don’t need as much ram. Alternatively you can just render bigger scenes than previously which would help you right now. Ideally you can solve a lot of problems by moving to 64 bit windows and 64 bit max - proxies are a lot slower to render than normal geometry in your scene though so I’d personally throw money at the problem and by more ram and resort to proxies when you’ve got seriously large amounts of stuff like a big sweeping city shot.