Showing posts with label planks. Show all posts
Showing posts with label planks. Show all posts

Floor board add-on (a.k.a. planks) updated for Blender 4.1



It is always good to hear that people are using an add-on, and this time I got a request to update my floor board generator for Blender 4.1.

Blender changes all the time and this time 4.1 even broke the old version of the add-on. Fortunately it was pretty easy to fix, so I am happy to announce that a new version is available on GitHub. [click download in the upper left corner]

If you want to know more about what the add-on can do, check this older article on my blog.

This version also incorporates a few small tweaks:

  • the bevel modifier now uses percentage as the default. This gives more consistent behavior across different patterns,
  • the bevel modifier now also has the harden normals option checked, which gets rid of quite a few shading artifacts,
and a new pattern: Chevron



floorboard add-on: Blender 2.80 compatible version available

A new version of the floorboards add-on that is compatible woth Blender 2.80 is available on GitHub. (this is a single python file: select File->Save As... from your browser and save it somewhere as planks.py. Then in Blender, select File->User preferences->Add-ons->install from file... (don't forget to remove an earlier version if you have one).

It is a pretty minimal port, i.e. I only made the necessary changes to make it run on 2.80 but to be honest, the add-on shows its age. The coding isn't very elegant and there are still a number of known issues. Nevertheless, it's a start, so enjoy!

PS. there are quite a few articles on this blog that talk about this add-on, check here for a list.

Floor boards add-on: random thickness

Acting on a question from Ákos I added a random thickness option to the add-on.

The new version is of course available on GitHub. (this is a single python file: select File->Save As... from your browser and save it somewhere as planks.py. Then in Blender, select File->User preferences->Add-ons->install from file... (don't forget to remove an earlier version if you have one).

If you select a non-zero thinkness each plank gets a random extra thickness up to the chosen maximum.

The option is located together with the other randomization options (which can be applied in parallel.)

Floor boards add-on: another small feature

Again prompted by a question I added a feature to guarantee minimum plank lengths at the sides when using random plank lengths, to mimic real life behavior where you would not allow too short ends when laying a wooden floor.

In practice you would probably also try to avoid seams to line up in adjacent rows but if this happens you can easily switch to another random seed already.

The images below show the vertex color map (for clarity) with (left) and without a minimum offset of 12 cm, resulting in less short 'stubs'.

Availability

As usual the latest version is available on GitHub.

Other floor board articles

This blog already sports quite a number of articles on this add-on. The easiest way to see them all is to select the floor board tag (on the right, or click the link).

Floor boards add-on: minor feature added

Prompted by a question from Trevor I added a Restricted random mode to the uv randomization. It still randomizes the position of planks on the uv-map but keeps them inside the original bounds. It does this simply by not moving a uv map of a plank at all when the move would result in any portion of the plank ending up outside the bounds. The result is a compacter randomized uv-map which should make it somewhat easier to use with non-tiling textures, i.e. reduce the area of the textures that is not used.

The new version is of course available on GitHub.

The difference is illustrated in the image below where I have contrasted the random uv-map in orange with the restricted uv-map in green

Sample artwork with ProWood shaders

I started playing around with Karl Andreas Gross' ProWood Shader pack and after some twiddling around I must say I like it:

In this example scene (a scene from Chocofur) I used the beech preset material for the chair (the chair is also from Chocofur. Note that I dropped the bundled textured material and replaced it by the ProWood procedural material). I picked the colors to match and upped the brightness and the reflectivity a bit to get the varnished look of the steam-pressed plywood of the chair. The books were generated by the book wizard cover generator.

For the floor (generated with my floorboard add-on) I used the material preset that is included in the shader pack specifically for the add-on, in this case oak. I just changed the colors. I had to changed the profile in bevel settings of the floor to 0.69 to prevent strange shadows. That has nothing to do with the shaders but everything with the geometry of the planks my add-on is generating, so it might be a good idea to make this the default in future versions.

New option for the floor board add-on

The floor boards add-on now has options to shift the origin of the pattern. This might come in handy when aligning pattern with different features of your architecture.

An example is shown below (the offset options are outlined in red, the pattern on the right has its x-origin moved a bit)

Note that like many options of the floor board generator there is a sensible soft limit on the value. Any soft limit can be overridden id becessary by entering a value by hand.

Code availability

The new version is available on GitHub.

Small additions to the floor board generator add-on for Blender

The floor boards add-on most recently described in this article got a minor update: by request I added options to rotate and scale the generated uv-map. Although this might done in the uv image editor as well, any actions there would be overwritten when changing the floor boards mesh again with the add-on. Of course a uv map can be tweaked in the material just as well with a vector mapping node for example, so which method you prefer is a matter of taste. The defaults are such that it shouldn't break existing objects/materials.

Another option that is now visible is 'Keep materials'. This was on by default but not exposed in the options. You can now uncheck it if you like in which case any associated materials will be removed from the object. This is of questionable utility, but I'd rather not keep an option hidden.

The UV randomization drop down now offers a Packed option: instead of randomizing uvs it lets all the uv coordinates of planks start at (0,0) without altering the scale. This might come in handy when texturing planks with small and non tileable images. (It will look repetitive but that way it won't show seams)

I also fixed a rather embarrassing normal problem. Thank you maraCZ for pointing it out so clearly.

Known bugs

Under certain circumstances the generated mesh will contain doubled vertices. I think this is caused by Blenders boolean modifier. (To simplify the code we generate a pattern that is guaranteed to be big enough and then cut it to size with a boolean modifier). For now, if you see strange lighting artifacts, go to edit mode, select all and choose remove doubles. I will look into this later.

Availability

The code is a single file, available on GitHub.

Generate floor boards quick and easy, part VI

This version (0.0.8) of the floor board generator adds options to add twists and hollow curvature to the individual planks. This is useful when creating floors in older houses and its more subtle simply rotation planks. All the options are now visually grouped as well to aid the user in locating related options.


An example (with a flat material to emphasize the subtle curvature) is shown below (click to enlarge):

The option values used to create the image are shown in the next image. Note that for illustrative purposes we made the gaps between the planks quite large:

Parameterization

The biggest change in this version was already visible in the image above: parameters no longer appear in the toolbar but in the FloorBoards section of the modifier options. This is not only a visual change but it actually means that even after savinf the .blend file all relevant parameters are retained along with the abject and can be tweaked at any time. (Thanks floric for the code adaptation and DragonLEE for the original idea)

Generate floor boards quick and easy, part V

This version (0.0.7) of the floor board generator adds options to add small random rotations to the individual planks. This is useful when creating floors in older houses. All the options are now visually grouped as well to aid the user in locating related options.

An example (with exaggerated values for the rotations) is shown below (click to enlarge):

The option values used to create the image are shown in the next image. Note that for illustrative purposes we made the gaps between the planks and the random rotation values quite large:

Generate floor boards quick and easy, part III, vertex colors

A member at BlenderArtists really wanted to apply a random material to each individual plank. Now Cycles can generate a unique random number for each object but not for each face within an object so another trick was needed. I therefo , added a vertex color layer with a unique color for each plank. Vertex color layers may be accessed from Cycles with an attribute node as shown in the node setup below:

In the example we use the color directly but of course it can be treated as a random value to control some specific material property ad well, that is left as an exercise for the reader.

Code availability

The code is available on GitHub but as I hope to promote it to the Contrib repository one time, it's also in the Blender upload tracker.

Generate floor boards quick and simple

I am updating this addon, check for an update this article.

I am currently enrolled in Andrew Price's Architecture Academy and in one of his tutorials he mentioned how easy it would be to have a simple script that could create floor boards suitable for architectural renders like those available in some other modelling packages. He even thought about asking someone to develop it but for some reason or other it never came te be.

Add Floor Boards

Because I think it would make a useful addition to the ArchViz' modeller 's tool set I put together a simple script Add Floor Boards. Once installed it can be found in the Add->Mesh menu at the to of the 3D view. Slap on a decent wood shader and you have a floor with real geometry in a few seconds.

The object that is generated by the script is a simple collection of rectangular faces adorned with a solidify and a bevel modifier so you can tweak some stuff even after the tool properties are no longer accessible.

Installation

  • Download the script from GitHub
  • Click File->User Preferences->Addons and click the install script from file
  • Don't forget to enable the add-on, it can be found in the Add Mesh section

Usage

After clicking Add->Mesh->Add Floor Board a default floor board is generated. The tool options should be self explanatory and are shown below:

Note that the measures are in blender units and the defaults reflect typical oak boards available at my local floor board dealer and are denoted in meters. (If you do archviz work it makes sense tp select some units in the scene options). Note that the variations in length and width are added to the base measurements so set them to zero if you want comlletely regular planks (a fixed width is quite common, a fixed length not so much as it leads to waste).