Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Implement material browser window #287

Draft
wants to merge 56 commits into
base: master
Choose a base branch
from

Conversation

nukeandbeans
Copy link
Member

@nukeandbeans nukeandbeans commented Sep 28, 2020

Implements #286 at a basic level and can possibly close #114 at a later time, but still needs a bunch of optimization.

Notes were left in the header of MaterialBrowserWindow

  • Adds material browser window
  • Moves preview materials to their own folder (allows simplified filtering in search)
  • Modified labels on default materials

Example without search (materials from Surfaces asset)

image

Example with search

image

Example with label filtering (and search)

image

Sidebar

The material browser has a sidebar with various properties and shortcuts, such as tag search from the selected material, selecting in the project, and applying to the currently selected face.

image

When the sidebar is collapsed, it makes the browser extremely compact, so it can be docked in a small area while using mini thumbnails.

image

TODO

  • Implement user search to allow search by name.
  • Implement a way to manually toggle tile labels (material names at the bottom of each thumbnail).
  • Implement tab for materials currently used by chisel in the scene.
  • Implement applying selected material to surface.
  • Implement surface presets. Not going to implement this for current release target.
  • Something else???

Known issues

  • Search filtering doesn't work as expected when filtering by used materials
  • Labels under the interactive preview don't update when filtering by used materials

+ Adds material browser window
* Moves preview materials to their own folder (allows simplified filtering in search)
* Modified labels on default materials
@nukeandbeans nukeandbeans added the enhancement New feature or request label Sep 28, 2020
@nukeandbeans nukeandbeans added this to the Sash Mortise milestone Sep 28, 2020
@nukeandbeans nukeandbeans self-assigned this Sep 28, 2020
also modified .gitignore to ignore a material package, this can be removed before this PR is merged.
finish implementing thumbnail caching.
should prevent cases where a thumbnail isnt cached because there is a duplicate file name in the project somewhere, but the material isnt actually a duplicate material.
this will be moved over to the actual window once i figure out how i want it laid out
need to figure out what to do with the tabs and fix a layout bug, then work out how to port over the IMGUI functionality
- optimized out any remaining per-frame allocations
- removed caching system, this is handled by unity internally
- added back window resizability, bringing with it ui that scales with the window
- removed all UI Toolkit code
- ported everything back to the main material browser window
- removed all testing code
- adjusted temporary texture brightness shown when a thumbnail is rendering
- the last selected thumbnail is now highlighted
…visible, and added custom tooltips using a system similar to probuilder
@nukeandbeans nukeandbeans marked this pull request as draft January 31, 2021 06:44
- Removed custom tooltips and related dependencies. These are something that can be implemented later in a cleaner way.
- UI tweaks, cleanup, and optimization.
- Bump project version to 2020.2.f1
@nukeandbeans nukeandbeans linked an issue Jan 31, 2021 that may be closed by this pull request
@LogicalError
Copy link
Member

When it comes to this
image
Maybe you could try implementing something like this for consistency?
image

@nukeandbeans
Copy link
Member Author

When it comes to this
image
Maybe you could try implementing something like this for consistency?
image

I'll definitely look into doing this. Doesn't appear like it should be too much trouble to implement.

Rewrite tile filters:
Made the code a lot easier to maintain, and much simpler to the same effect. Filters no longer require manual typing to add new folders/shaders/materials to ignore, which will allow implementing end-user defined filters.
Remove surface presets:
I removed surface presets for this current release target. I'll be looking into another way to do this, which may make things a bit easier to deal with.
Modularize tiles:
Made the tiles class more generic, which in the future will make adding additional asset types much easier.
@nukeandbeans
Copy link
Member Author

When it comes to this
image
Maybe you could try implementing something like this for consistency?
image

I'll definitely look into doing this. Doesn't appear like it should be too much trouble to implement.

You know what? I was just thinking about this and realized its intended purpose was to change what content is displayed. Perhaps this would be better implemented as tabs, instead.

.gitignore Outdated Show resolved Hide resolved
"packages/com.chisel.components/package resources/preview materials/", // 2, these are tool textures, so we are ignoring them
"font material", // 3, ignore font materials
"skybox/", // 4, ignore skybox shader
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also ignore everything in any "Editor Resources" directory

…her things that need attention, adjust some UI styling, update gitignore
* Adjust namespace
+ Add new test scene
+ Add new BrowserTab API (wip)
- Remove dysfunctional test scenes
@HeadClot
Copy link

HeadClot commented Jan 1, 2022

Hey @kerfuffles any news on this?

@nukeandbeans
Copy link
Member Author

Hey @kerfuffles any news on this?

This is still being worked on. I'm slowly working on this during my free time between work and other projects. I'm currently reworking the backend of it to be more flexible and extensible.

@HeadClot
Copy link

HeadClot commented Jan 2, 2022

Hey @kerfuffles any news on this?

This is still being worked on. I'm slowly working on this during my free time between work and other projects. I'm currently reworking the backend of it to be more flexible and extensible.

Ok, Cool. Glad to know it is not dead :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Material Browser Create a material palette window
5 participants