Use A Higher Hair Segment Limit #51297

Closed
opened 2017-04-23 14:17:37 +02:00 by Leon Cheung · 12 comments
Member

I'm always wondering why the hair segment cannot be set to 50+. Is that for performance conern?

seg.png

Normally, segments up to 50 can be quite enough for most cases. However, when dealing with things like braids, the current limit can sometimes be quite a pain.

If there has to be a limit here for some reason, then a higher limit (like 100 to 120) will be more convenient imho.

I'm always wondering why the hair segment cannot be set to 50+. Is that for performance conern? ![seg.png](https://archive.blender.org/developer/F570330/seg.png) Normally, segments up to 50 can be quite enough for most cases. However, when dealing with things like braids, the current limit can sometimes be quite a pain. If there has to be a limit here for some reason, then a higher limit (like 100 to 120) will be more convenient imho.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @ZhangYu

Added subscriber: @ZhangYu

Added subscriber: @zeauro

Added subscriber: @zeauro

As you said, it is enough for most cases.
This setting is here to set up basic settings of particle system.
When you encounter a particular case, you are free to increase to 120 segments in particle edit mode with the Rekey operator.

Of course, such amount of segments have a consequence on performance.
It is better to avoïd a too high limit for such setting.
It is better to keep it with a limit for newbies and to inform advanced user that they can go further in particle edit mode.

As you said, it is enough for most cases. This setting is here to set up basic settings of particle system. When you encounter a particular case, you are free to increase to 120 segments in particle edit mode with the Rekey operator. Of course, such amount of segments have a consequence on performance. It is better to avoïd a too high limit for such setting. It is better to keep it with a limit for newbies and to inform advanced user that they can go further in particle edit mode.
Aaron Carlisle self-assigned this 2017-04-23 16:26:34 +02:00
Member

Here is a patch, I can commit if we agree that we should increase this limit.

P468: Fix #51297

diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 95dab13..3024ace 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -2363,7 +2363,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)");
 
        prop = RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
-       RNA_def_property_range(prop, 2, 50);
+       RNA_def_property_range(prop, 2, 128);
        RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");
Here is a patch, I can commit if we agree that we should increase this limit. [P468: Fix #51297](https://archive.blender.org/developer/P468.txt) ``` diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 95dab13..3024ace 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -2363,7 +2363,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)"); prop = RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 2, 50); + RNA_def_property_range(prop, 2, 128); RNA_def_property_ui_text(prop, "Segments", "Number of hair segments"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); ```
Member

Added subscriber: @LucaRood-3

Added subscriber: @LucaRood-3
Member

I really don't think this is the way to go about this. There is no point in slightly increasing the limit, as you can just as well find the new limit to be too low at some point in the future. I would be for keeping the 50 limit, but replacing it with a soft limit, that way, new users don't accidentally freeze their sims, but you are free to increase the the segments to whatever you want.

I really don't think this is the way to go about this. There is no point in slightly increasing the limit, as you can just as well find the new limit to be too low at some point in the future. I would be for keeping the 50 limit, but replacing it with a soft limit, that way, new users don't accidentally freeze their sims, but you are free to increase the the segments to whatever you want.
Author
Member

+1 for soft limit.

+1 for soft limit.
Member

Here is a fix which uses a soft limit of 50 and a hard limit of 128:

P477: Fix #51297

diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 127c66a..ed1792c 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -2363,7 +2363,8 @@ static void rna_def_particle_settings(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)");

        prop = RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
-       RNA_def_property_range(prop, 2, 50);
+       RNA_def_property_range(prop, 2, INT_MAX);
+       RNA_def_property_ui_range(prop, 2, 50, 1, -1);
        RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
        RNA_def_property_update(prop, 0, "rna_Particle_reset");

Here is a fix which uses a soft limit of 50 and a hard limit of 128: [P477: Fix #51297](https://archive.blender.org/developer/P477.txt) ``` diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 127c66a..ed1792c 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -2363,7 +2363,8 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)"); prop = RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 2, 50); + RNA_def_property_range(prop, 2, INT_MAX); + RNA_def_property_ui_range(prop, 2, 50, 1, -1); RNA_def_property_ui_text(prop, "Segments", "Number of hair segments"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); ```
Author
Member

Very nice solution, Aaron! ❤

Very nice solution, Aaron! ❤

This issue was referenced by 4621583612

This issue was referenced by 4621583612fa40d90fa89dfc32686d39dc596714
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#51297
No description provided.