Code Monkey home page Code Monkey logo

blender-texel-density-checker's Introduction

Blender Addon: Texel Density Checker

Header

Russian README

With Texel Density Checker you can:

  • Calculate Texel Density for model for different texture size (includes non-squared textures and custom size)
  • Rescale UV for getting texel density what you want
  • Copy Texel Density from one object to others
  • Select faces for same Density
  • Vizualize Texel Density with Vertex Colors

Texel Density Checker simple for use. You need select your mesh (or faces) and texture size and just click button.

Download latest version:

If you want to support me you can buy this addon:

New in Texel Density Checker 2023

25% speed increase

Speed_Increase

Select anchor for scaling UV when using "Set TD"

Select Origin for Rescale UV: Average point of Selection, Corner of UV, Center of UV or 2D Cursor. Before that Rescale origin was from average point of selection of UV.
Select_Anchor_1
Select_Anchor_2\

Visualization of Distortion UV

Shows the ratio between the percentage of UV occupied area and the percentage of the object's geometry area.
Distortion

Ability to remove panel from View 3D or UV Editor

Added options to Preferences for hiding Texel Density Panel from View 3D or UV Editor.
Hide_Panels

Features

Different Units

Texture Size

Checker Material

Calculate TD

Copy Value

Set TD

Select

TD To VC

UV To VC

blender-texel-density-checker's People

Contributors

ivostrikov avatar mrven avatar oxicid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender-texel-density-checker's Issues

Adding real life target dimensions?

I'm not sure can this plugin do this, but what I'm hoping to find is a plugin that I could use to enter the texture pixel dimensions and what the texture should be in real world scale (for example a 4860x2430px texture that I would wish to be scaled to real life 600x300 mm) and the plugin would scale the UV accordingly.

If this plugin can achieve this functionality, could you consider adding a target dimension fields to it?

Headless mode?

Hi,

I really like this plugin. But I would love to implement it in my automation process. Setting the texel density in blender -b (background mode) is not working since this addon asks for:

if bpy.context.area.spaces.active.type == "IMAGE_EDITOR" and bpy.context.scene.tool_settings.use_uv_select_sync == False

bpy.context.area doesn't exists due to the lack of ui. Is it still possible somehow?

Best

Two Mesh Copies Are Created Every Time I Click A Button

Every time I click one of the buttons (Calculate TD, Set My TD, etc) the addon creates two mesh copies, the first time, and then four copies every subsequent time. This seems to only happen when I have more than one uv map. I am on 3.6.

image

This makes the addon very unusable. On an active project the addon created a thousand meshes and ballooned the .blend file size to 28GB.

error when attempting to set texel density in blender 2.91 beta

In a new blend file with a cube or some other mesh, go to the uv editor, select the object in edit mode, select the UV map island, and try to press one of the 'Set TD' buttons, and I got the following error:

`Python: Traceback (most recent call last):
File "D:\blender 2.91.0\2.91\scripts\addons\Texel_Density_3_2_1_283\add_td_operators.py", line 87, in execute
bpy.ops.object.texel_density_set()
File "D:\blender 2.91.0\2.91\scripts\modules\bpy\ops.py", line 132, in call
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
File "D:\blender 2.91.0\2.91\scripts\addons\Texel_Density_3_2_1_283\core_td_operators.py", line 221, in execute
bpy.context.screen.areas[ie_area].ui_type = 'VIEW'
TypeError: bpy_struct: item.attr = val: enum "VIEW" not found in ('VIEW_3D', 'IMAGE_EDITOR', 'UV', 'CompositorNodeTree', 'TextureNodeTree', 'ShaderNodeTree', 'SEQUENCE_EDITOR', 'CLIP_EDITOR', 'DOPESHEET', 'TIMELINE', 'FCURVES', 'DRIVERS', 'NLA_EDITOR', 'TEXT_EDITOR', 'CONSOLE', 'INFO', 'OUTLINER', 'PROPERTIES', 'FILE_BROWSER', 'PREFERENCES')

location: D:\blender 2.91.0\2.91\scripts\modules\bpy\ops.py:132

location: :-1

`

Request: Publish as official "Comunity" Add-on?

Hello. I really don't know anything about blender development or blender comunity in general, but I find this Add-on extremely useful.

Request: Would it be possible to publish it as a "Comunity" add-on so it appears by default in the list of Comunity add-ons when you browse the "Add-ons" tab?

image

Btw, this a character that I'm making using your great add-on. This addon let me ensure a 64px per unit consistency in my texel density. Thank you!
image

Ability to remove panel from 3D Viewport

I have a lot of panels from add-ons in the 3D viewport and would like to minimize them.
When I empty the text field "Panel Category (3D View)" in the add-ons preferences the name of the panel will just be "Misc".
Screenshot_4

Is there a way to completely remove it from the 3D viewport but leave it in the UV editor?

Speed improvements (from StroBlend)

Hi,
I’m using TDC a lot these days and I noticed poor performance with it, I can’t remember if it worked faster last year of use but to give an idea It tooks around 2 minutes to resize only one island (from 1024 to 512 with selected faces only checked). I like a lot this addon but I’m afraid it tends to be inefficient when you have a lot of resize to do. Do you think you can improve the speed ?
I’m using the latest version of the addon 3.3.1.291 with Blender 3.0.1

Original:
https://blenderartists.org/t/texel-density-checker-3-2-1-update-16-10-20/685566/198?u=mrven

Python: Traceback (most recent call last):

Texel_Density_2023_2_Bl400

I got an error when I try to calculate or set TD to many meshes. I also tryed older version

Python: Traceback (most recent call last):
  File "C:\Users\TemmieDola\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Texel_Density_2023_2_Bl400\add_td_operators.py", line 104, in execute
    bpy.ops.object.texel_density_set()
  File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\TemmieDola\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Texel_Density_2023_2_Bl400\core_td_operators.py", line 299, in execute
    bpy.ops.object.texel_density_check()
  File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\TemmieDola\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\Texel_Density_2023_2_Bl400\core_td_operators.py", line 90, in execute
    local_texel_density += face_td_area_list[face_id][0] * face_td_area_list[face_id][1] / local_area
ZeroDivisionError: float division by zero
Location: C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py:113
Location: C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py:113

Set My TD stops working periodically.

I have been using this addon extensively for quite some time, even before 2.8. I do a lot of environment design.
In the latest release (2.0) there is a strange bug where "set my TD" stops working completely. I can rapid-fire the button like crazy and it just won't work at all. I can demonstrate this first-hand (TooManyDemons #2125 on Discord) and I'm not sure if this bug is only for me, or if others are having a similar issue. I've reverted for now to the older update. I love your tool quite a bit and felt I should mention it. Cheers!

Research for "Default" Settings

Request:
Would it be possible to set some settings also as "default"? Like for me, I am doing a lot of walls at the moment. All of them should have the same settings.
To optimize my work it would be great if I could save some settings as default, so that I don't need to set up these for every new file again and again.

Texture

Would it be possible to change the texture used for color grid to my own? I prefer this one. I tried to look in the addon files but I can't find it anywhere. Tk! Wonderful addon!
grid3

EDIT: Ok, it's just s regular shader and I can change it. Never mind. :-)

Error: Does not work with the latest version of Blender - 3.0

throws errors with blender 3.0

Python: Traceback (most recent call last):
File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\Texel_Density_3_3_291\core_td_operators.py", line 200, in execute
utils.Sync_UV_Selection()
File "C:\Users\Moert\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\Texel_Density_3_3_291\utils.py", line 52, in Sync_UV_Selection
bmesh.update_edit_mesh(mesh, False, False)
TypeError: update_edit_mesh() takes at most 1 positional argument (3 given)

location: :-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.