Showing posts with label floor board. Show all posts
Showing posts with label floor board. 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.

Floorboard add-on gets Versaille pattern

From time to time I keep on developing my floorboards add-on an I am happy to present a new option: the Versaille pattern.

(click to enlarge)

It was quite fiddly to get it right but now it looks fine. (Thank you Spirou4D for pointing out the issues with the center configuration).

This pattern offers the same options as the other pattern: you can add randomness to the planks, gaps between them, shift the origin, etc. etc. The generated uv-map (in Shuffle and Packed modes) aligns the uv coordinates in such a way that all are aligned along the longest axis of a plank. This means that if you have a single wood texture with the grain running in a certain direction, planks that are rotated still have a uv parallel to the grain, as it would probably be in reality. An example with a simple stripe material is shown below (note that each plank also has a different color in a vertex color layer that you can use to slightly randomize the material of each individual plank)

The pattern has border planks that are arranged in a symmetrical manner: 2 short horizontal ones,2 slightly longer vertical ones. Selecting the Switch option will change this to 4 identical planks arrange in a clockwise fashion.

An overview of the different articles that highlight all the options of the add-on can be found here.

Availability

The latest version is as always available on GitHub.

WIP: versaille pattern for floorboard add-on

I am currently working on an addition to my floor boards add-on for blender, the pattern often referred to as Versaille parquet.

I have implemented the simplest variant and am looking for a way to align the uv so the grain runs along with the length of the planks. With some manual tweaking it is already possible to get a decent result:

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.

Floor boards: additional pattern

The latest version (20150404) of the floor board addon adds a border option to the square pattern. Besides parquetry this might come in handy for wooden patio tiles and the like

Overview

The floor boards addon has quite some history on this blog and elsewhere so for convienience I've gathered the most important links here.

Download

The addon is available on GitHub. (Click to download it to any location on your PC, then in Blender go to File->User Preferences->Addons and choose Install from file. If you have a previous version of this addon you should not forget to remove the addon first by locating it in the list of addons and clicking Remove. The addon can be found under the Add Mesh category.)

Discussion

If you like you can give feedback on this addon in this blog or in this BlenderArtists thread.

History

Floor boards revisted

or why a bit of competition is a good thing

A while ago Cedric Brandin (clarkx at BlenderArtists) was working on an addon that could produce parquetry patterns and because he knew my floor boards addon he asked me some small code specific questions. I was happy enough to help him out of course and he went on to create a very useful addon.
But the idea of patterning a wooden floor sounded to me like a great addition to my addon, and I kept thinking about it. I even looked at his code and in the end decided to incorporate the idea of parquetry patterns. I didn't actually use any of the code because it proved to be difficult to merge the different styles of coding but I owe him a big thank you for the idea.


I did not yet implement all the different patterns but each pattern gets the same benefits as the regular flooring, including randomization options, modifiers and the option to use a floor plan.
At the same time I cleaned up the code, made the interface a bit more use friendly, made it possible to assign materials and keep them through changes and provided more efficiently packed uv maps.
In the near future I might add some additional parquetry patterns. The code itself is quite modular so this should be easy enough to do.

Code availability

The new version (20150320) is available from GitHub.

New features

patterns
currently just regular flooring, herringbone parquetry and square, alternating tiles
materials
assigned to the flooring are now retained even if you change the flooring later (thank you Lell for the suggestion)
size
The length and width of the flooring are now exact (any excess is trimmed of with the bisect_plane modifier)
uv-maps
randomized uv-maps are now packed more efficiently (in 'Shuffle' mode)

Known bugs and misfeatures

  • matching a floor to a floorplan is buggy: Blender's booleans don't seem good enough to deliver quality results, showing odd behaviour when the gaps between planks are small. Also if the floorplan is not 2D, the addon crashes.
  • The randomized uv-maps are still not packed in an optimal way
  • The default values for the bevel modifier are awful
Any comments are welcome of course and this BlenderArtists thread might be the best place for discussion.

Floor board generator, using a floor plan




I have started on the support for a floor plan, i.e. restricting the generated planks to some outline. This feature is very much a work in progress but it is already useable:
It works by adding and applying a boolean modifier to the generated floorboards.

The current [updated] workflow is like this:
  • select your floor plan, make sure it is flat, has a number of faces selected and the face normals pointing up:

  • position the 3D cursor just outside the bottom left corner of the floor plan
  • choose Add -> Mesh -> Add floor board mesh
  • adjust the number of planks and their length (in the modifier tab!)

    • select 'use floorplan' and select your floor plan mesh

      What is left to automate is probably to make sure the floor board is position at the lower left corner of the floor plan because that is easy to forget. You can change the position of the generated floor board but then you have to tweak some attribute (like the number of planks for example) to make it calculate a new floor board, which is ugly.

      For those who find a video easier to understand, here's a short screencast of the workflow:


      Code availability


      You can download version 0.0.15 form GitHub to try out this new functionality. If you already installed a previous version don't forget to remove the old version before installing the new one. (You can remove an old version by deleting the file planks.py from your Blender addons directory (on Windows typically in C:\Users\<your user name>\AppData\Roaming\Blender Foundation\Blender\2.71\scripts\addons )

      Known issues

      The sides of the planks are currently not properly uv mapped, something that may show when large gaps are used.

      Previous articles on the floor board addon

      The development and use of this addon is documented in several earlier articles:

      Part I initial version
      Part II random uv-coordinates
      Part III random vertex colors
      Part IV additional options
      Part V randomization
      Part VI small enhancements

      It is also extensively discussed in this BlenderArtists thread.

      Floor board generator, bug fix

      As mentioned by Greg Zaal in the comments to this post the randomness of the floor boards increased the further you got from the origin. This was due to a faulty calculation og the center of a board.

      The current version (0.0.13) fixes this and is commited to GitHub.

      You can download it here (right click the link and save it to the addons directory of your Blender installation).


      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 IV

      In a previous post I added some extra functionality to the floor board generator and based on user feedback and code contributions there are now some more options:

      • the offset can now be random for each individual row of planks (thanks Alain for your contribution)
      • adding modifiers is now optional (but on by default)
      • adding random offsets to the uv-map for each plank is now optional (but on by default)

      Code availability

      This new version (0.0.6) is available for download from GitHuband is tracked in the Blender extensions tracker as well.

      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 easy, part II

      In a previous article I presented a simple script to generate floor boards with real geometry. Since then I enhanced this with an option to generate uv coordinates as well, with a random offset for each individual plank. This option not only relieves the user of the need to create a uv map but the random offset will break the unwanted illusion that all planks are perfectly sawn from a single endless pices of wood.

      The image in the example on the left (click to enlarge) was generated with the wood shader presented earlier but similar effects can be obtained by applying a tiled image (which of course should not depict planks already), for example PlywoodNew0050 from CGTextures would work nicely I think.

      The updated script (version 0.0.3) is available from GitHub and is tracked in the Blender Bug Tracker as well. Version 0.0.3 also has its hard limits on plank length etc. removed. The are replaced by soft limits so if you want you can make planks shorter than 50cm or narrower than 10cm by explicitly typing in a value.

      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).