[WIP] Object Construction Kit - Create highly detailed and efficient scenes in minutes

Object Construction Kit

Create highly detailed objects/meshes in a matter of minutes and combine them all into one mesh per material.

Features:

  • Easily create highly detailed meshes
  • Focused on fast and easy workflow for artists and level designers
  • Randomize parameters for more variety
  • Use a wide variety of pre-made meshes
  • Atlas support with separation of type per pre-defined atlas zone
  • Combine everything into a single mesh with same material
  • Automatic prefab creation
  • Automatic LOD generation with support for pre-made LOD meshes
  • One-Button randomization
  • Supports any type of meshes and materials

Preview #2:
https://www.youtube.com/watch?v=K120e6kIOKY
Preview #1:
https://www.youtube.com/watch?v=TCmF6bnHvy4

Work-In-Progress:

  • (Done) LOD Generation with various options per level

  • (Done) Support for randomizing position of UVs in a pre-determined uv zone

  • (Done) Option to stretch or not the uvs to fit the texture

  • (Done) Option to limit the maximum the size of the uv

  • (Done) Project object and groups of objects onto surfaces

  • (Done) Main button that randomizes every single object that belongs to it

  • (Done) Use pre-made LODs from meshes

  • Atlasing System

  • Better interface

  • Documentation

  • Tutorial

After first release:

  • One-Button generation of groups of objects per type and randomly place them
  • Option to split the generated objects into grid zones

If you have any questions or feature requests for this asset, don’t hesitate to ask/tell me!

1 Like

I know this is not the point of your asset/post but I like the style of that banner picture very very much :slight_smile:

1 Like

Here’s a small and quick demonstration of the asset in action.

Here i’m using a few pre-made meshes and 2 materials. Each material has an atlas texture with many textures.
One of these atlas textures contains three types of textures, like posters, stripes and post-its.
The system can separate these types of textures inside the same atlas and still randomize per type, so you don’t need to have 3 materials.

The system randomizes the mesh and texture by the type the user chooses.
It also randomizes parameters like rotation, scale and position the user can define.

At the end of the video, you can see how i merge everything together and end with just 2 meshes for the two materials.
The system also automatically generates the .asset asset for the meshes and the prefab of the generated object on the project folder.

You can still edit the original object that was merged, make changes to it, and update the generated object.

Note that this asset works with any mesh, so you can have stuff like bricks, wood, trashbags, newspapers, etc.

There are still more features to come!
If you have requests or questions, please let me know! :slight_smile:

Gif is not showing up here :confused:

Weird, it showed when making the post.
Here is the link to the gif: Imgur: The magic of the Internet

Edit:
Hmm, it also cut the gif at the end…
I’ll upload to youtube and post it here soon.

1 Like

Updated the post with the video from Youtube.

More videos and images will come when more features are added.
Let me know if you have any questions or requests :slight_smile:

1 Like

Preview #2 of the Object Construction Kit.

This is a more elaborate video, showing a few more things about the asset.

New update on a new feature of the Object Construction Kit.

Automatic LOD generation with user defined attributes.
(Note the user interface is temporary)

I added a new section where the user can set the number of LODs wanted. There, the user can define the percentage of meshes to include in that LOD, and the minimum object size that can be included in that LOD.

3025553--226151--lod1.png

By clicking on the “Update LOD Stats”, it will calculate how many vertices and faces will be included in every LOD, so you can have a better idea of how detailed the LOD will be.

The percentage parameter works by including the percentage of objects of larger size. This way, it will include the most noticeable objects at a distance, and remove the smaller ones.

So, by clicking on the “Merge and Generate Mesh”, it will automatically combine and merge everything per material, create the LODs, components and the main object in the Hierarchy, and generate the .assets and prefab on the project folder.

Here is the result (Expand the image to see all the differences):

1 Like

It’s new features time! :smile:

Added 3 features:

  • Option to limit the maximum size of the generated UVs.
    This option will maximize the size of the generated UV by a specific amount, for example, the maximum size could be 200 pixels in diameter in a 1024 pixel image.

  • Option to keep the aspect ratio of the original UVs.
    If the option is disabled, the UVs will be stretched to fill the UVarea/sprite it gets assigned to.

  • Support for randomizing position of UVs inside an UV area.
    By using the first feature, you can limit the size of the generated UV. By using both these options, you can use one texture and randomize the position of the UVs inside it.
    It’s very usefull to add variation to lots of small objects/debris/rocks/etc.

Also, here’s an image just to show you can do more than just placing papers on the walls :slight_smile:

Here i added rocks, but you can add mostly anything you want like debris, bricks, wood sticks, even grass if you really want to.
Position, scale, rotation, uv positions of the rocks were all created randomly without me having to place anything!

1 Like

Ready for more features? :stuck_out_tongue:

Awhile ago i posted something on twitter about a possible asset that i could develop that would project each individual piece of a mesh onto the surface.

While it was promising and many people liked the idea, in the end i decided not to do it, since it would simply require to generate a new mesh for each mesh that got modified, and that didn’t sound optimal.

Now with this asset, i’m bringing back the positioning functionality to very efficiently place all these objects on uneven surfaces with no work required by the user. You can now do the same thing i did in the video with this asset, but it’s waaay more efficient in the end now.
Placing objects on a scene got even easier now :smile:

Here’s an image just showing it projecting the objects onto an inclined plane.

Since this is built into the system, all the other options described earlier can be used with this projection method.

1 Like

With the power of the >Random Button< you can now randomize every object inside the main hierarchy with the touch of just one button!

It takes into account all of the settings you set for each object, so they will only change the way you set them up.

You can also exclude certain objects you don’t want to be affected, and define what type of things will be randomized (like mesh type, texture type, position, rotation, scale).

These settings are also used to control globally what can be randomized at any given time. So, for example, if you want to randomize everything about 50 objects except for their position, then you don’t need to change the position boolean property of each object, and you can just disable the global boolean that controls the position change for all objects.

While there are still a couple of things i want to add, i would say the asset, feature wise, is almost ready.
if you’re interested in this asset, tell me what you would like to see added to it, and i’ll see if i can add it :slight_smile:

Atlasing :sunglasses:

1 Like

I’ll see what i can do :slight_smile:
That was actually something i thought about implementing, but it has to be kind of separate from this system, like an extra tool included.

1 Like

Took a lot longer than i was expecting to, but another new feature is now done! :smile:

It’s now possible to use pre-made LOD meshes for each object. This significantly increases the final object’s efficiency and makes it less needed to decrease the percentage of objects in higher LOD levels.

Here’s a quick preview:

LOD0 and LOD1 have the same amount of objects, but it’s using pre-made LODs for their LOD1 level. So, basically, at a distance, LOD0 and LOD1 look the same.

Before this feature, the only way to decrease the number of triangles was to decrease the percentage of number of objects for each LOD. Now, that’s no longer the only option!

In the image above, there are only 3 separate objects with their own material, so you get only 3 draw calls.

Besides this new feature, i also spent quite some time refactoring the whole project and documenting all the code.

Next up, i’m going to look at making a simple Atlasing tool, so you can go even further with this asset.

I believe this asset will redefine how developers can make complex, detailed and efficient scenes right inside Unity :slight_smile:

New update on the Atlas Tool that will also be included in this asset! It’s still work-in-progress, but i thought i would share the development.

At first, i was making a standard editor window, where you can add textures and then generate an atlas, but i thought that was pretty limited in what it could do.

So, i decided that instead of using an Editor Window, the Atlas Tool will be a Scriptable Object. For each atlas you want to create, there will be an asset file with all the info related to that atlas. That way, you can update the atlas with updated textures or new textures any time you want.
It’s much better than making a one-time atlas generation.

Here’s a preview of the interface (WIP):

Each Texture Group represents all textures that belong to the same type of texture (Albedo, spec, metallic, normal, height, etc).
This way, you can generate many atlas for all textures, and be perfectly aligned with each other.
An atlas is generated for each index of all texture groups. (all albedo packed, all normal packed, etc)
I tried to make it very easy to add/remove/alter these textures on the interface.

The last options are related to the atlas generation. I’m using Unity’s PackTextures, which packs all textures into an atlas, where it’s possible to set a maximum size for the generated atlas.

All Atlas textures are stored in the same folder as the Scriptable Object and previewed on the interface.

This feature was requested by @Stormy102 . If any more of you have any more ideas or features for this asset, let me know :slight_smile:

1 Like

Looking good Tiago! Idk about others but maybe you should sell this as a standalone asset which is free if you own the Object Construction Kit.

Thanks.
Well, it is starting to be complex enough to be a standalone asset, but i believe Unity doesn’t allow for new assets to have any type of upgrade discount. They need to be in the market for 1 year if i remember correctly.

For first release i’m just going to release the Atlas Tool with the Object Construction Kit. I’ll consider making a standalone asset for the Atlas tool after that if many people want.

  • Update -

Regarding the Atlas Tool, it is nearly complete!
I added a few new functionalities, like automatically creating the atlas with all the sprites, or creating an empty texture that is used as the atlas (Can be used in the OCK)

Since for all of this to work the textures need to be set as readable, the Atlas Generation algorithm checks if all textures have that flag set to true, and if it’s not, then it will change that flag for each texture and revert it back at the end of the algorithm.
This way, you don’t need to have those textures set as readable (less memory used), but the algorithm takes a bit longer to finish.

As always, more options the better :wink:

I also added a lot of checks, warnings, and more to assure everything works correctly, and the user can easily work with the tool.

2 Likes

New update on the Atlas Tool.

I did some pretty big changes, since i didn’t think it was intuitive enough.

First of all, you can now define the atlases you want on the first section of the tool. There you can define the name for each atlas.

Texture groups now have a texture field for each one of those atlas, and you don’t need to actually fill all texture slots. The mandatory slot that needs to be filled is the first one. All the others will have the same UV position as the first one of each texture group.

The texture field is now also an actual texture field instead of an image preview. Much more intuitive and easier to find those textures, and the generated atlases now also display the textures as you would normally see textures in the Editor. It has the reference to the actual atlas on the project folder.

So, all in all, the tool became more intuitive, simpler to work with and overall better.

The tool is almost complete. Just need to fix some issues with the generation and it’s done :slight_smile:
Do any of you have any feedback or ideas to add to this tool?

1 Like

Hey everyone!

Just making a quick update.

I finished all the functionality for the Object Construction Kit and the Atlas Tool.

I also spent quite a lot of time making complete custom inspectors for every interface. I hope this will make things a lot easier to work with.
It still needs some final touches, but it’s mostly complete.

I’m hoping to be able to submit the asset to the Unity Asset Store this or the next week.

Here are the final things that need to be done:

  • Final tests with everything that’s possible to do with these tools,
  • Final touches on the user interface,
  • Create Manual,
  • Create a sample scene.
1 Like

Sorry for the lack of updates for the past two weeks.
Long story short, i finished all testing, editor needed stuff (undos), final touches on the interface, and started writing the manual.

When i got to the Sprite Collection interface, where you can define the atlases and what sprites tho use for a specific defined type, it was too difficult to explain how to use it in a simple way.
The way it was made, you needed to setup regions of the atlas that you would want to use for each specific type. This would mean you would need to have another atlas that was split into those regions, and then use those split regions to select the wanted sprites from the actual atlas.
It was complicated, not easy to use and was basically impossible to see what it was actually selecting, among other things.

So i changed it completely, and now you can just assign the sprites by using the main atlas, and choosing which ones you want. Not only it simplifies setting up everything, you can also preview and make sure everything is ok.

Here’s the new interface for an atlas group of the sprite collection object:

I’ll now get back to the manual, and hopefully release it soon :slight_smile: