Randomize (vertices) #38317

Closed
opened 2014-01-22 14:35:13 +01:00 by Campbell Barton · 17 comments

This would be a simple tool to randomize all points in a mesh/lattice/armature/curves/metaballs even.

Using ED_transverts.h API this can be written once and used for for different object types. (See how warp and snap use ED_transverts_create_from_obedit and related functions).

This would be a simple tool to randomize all points in a mesh/lattice/armature/curves/metaballs even. Using `ED_transverts.h` API this can be written once and used for for different object types. (See how warp and snap use `ED_transverts_create_from_obedit` and related functions).
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'
Author
Owner

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Added subscriber: @MarceloVaranda

Added subscriber: @MarceloVaranda

A few questions:
1- Is it desired to have UI controls added into Property panel for each type of object or the idea is just to expose API and either an Addon or a script would call it?
2- As those object changes on the fly while in edit mode is it desired to randomize while being dynamically updated? It maybe confusing for the Artist as all vertices are changing position in areas not being modified; or lets only apply randomization when leaving edit-mode or by an function call?
3- any preference where to implement the wrappers for setting up the parameters (amplitude, frequency etc)?

A few questions: 1- Is it desired to have UI controls added into Property panel for each type of object or the idea is just to expose API and either an Addon or a script would call it? 2- As those object changes on the fly while in edit mode is it desired to randomize while being dynamically updated? It maybe confusing for the Artist as all vertices are changing position in areas not being modified; or lets only apply randomization when leaving edit-mode or by an function call? 3- any preference where to implement the wrappers for setting up the parameters (amplitude, frequency etc)?
Author
Owner
  1. yes (but this is automatic), 2) not sure what you mean. 3) think this can wait - as in, first get basics working, eventually it could be good to have some more options.

Check object_warp.c

1) yes (but this is automatic), 2) not sure what you mean. 3) think this can wait - as in, first get basics working, eventually it could be good to have some more options. Check object_warp.c

Posting a patch with a simple implementation that randomize vertices.
Still need work.

Posting a patch with a simple implementation that randomize vertices. Still need work.

The sample code that I have attached moves vertices to/from the object center (maybe acceptable for rounded objects).
I guess it would be better moving along the vertices's normal but I did not dig enough to find where the normals are stored or calculated.

The sample code that I have attached moves vertices to/from the object center (maybe acceptable for rounded objects). I guess it would be better moving along the vertices's normal but I did not dig enough to find where the normals are stored or calculated.
Marcelo Varanda was assigned by Kévin Dietrich 2014-01-28 16:56:03 +01:00

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

You should at least claim the task if/when you're working on it. Just sayin'.

You should at least claim the task if/when you're working on it. Just sayin'.

I am still getting familiar with everything related to this project. This saturday was my very first day working with Blender.
The claiming/assigning operation does not show up in the task's right panel... it is not obvious that we need to "Edit" the task to assign it. Thanks for the tip anyways.

I am still getting familiar with everything related to this project. This saturday was my very first day working with Blender. The claiming/assigning operation does not show up in the task's right panel... it is not obvious that we need to "Edit" the task to assign it. Thanks for the tip anyways.
Author
Owner

Hi, some feedback on the patch,

First of all, I think randomizing around a central point is a bit strange. Probably best to just randomize each point in 3d space (move each vertex a random direction).

Also, randomizing in screen-space seems a bit unnecessary (I know warp does this, but its a special case - warp needs to be done in screen-space).

However it may be good to be able to constrain randomization, for example, randomized displacement along the vertex normal would be handy (like a noisy displacement).

Hi, some feedback on the patch, First of all, I think randomizing around a central point is a bit strange. Probably best to just randomize each point in 3d space (move each vertex a random direction). Also, randomizing in screen-space seems a bit unnecessary (I know warp does this, but its a special case - warp needs to be done in screen-space). However it may be good to be able to constrain randomization, for example, randomized displacement along the vertex normal would be handy (like a noisy displacement).

Thanks Campbell, I will try to make progress on this task tomorrow. Is the place in the UI acceptable?
I am placing it in Mesh->Transform->Randomize

Thanks

Thanks Campbell, I will try to make progress on this task tomorrow. Is the place in the UI acceptable? I am placing it in Mesh->Transform->Randomize Thanks
Marcelo Varanda removed their assignment 2014-02-01 17:00:54 +01:00

Assigning to nobody as I may be too slow to complete this task.
I tried a couple things today but I went no where.

It looks like that it would make more sense to implement the desired code under mesh editor area if the operation should be performed over the object space.
ex: in a "editmesh_tools.c" like file having a function like "edbm_do_randomize_vertex_exec(...) "
However, it will be restricted to meshes and the suggestion was to apply to many object types

Anyways... if anyone else wants to help in implementing this task then please be welcome.

Assigning to nobody as I may be too slow to complete this task. I tried a couple things today but I went no where. It looks like that it would make more sense to implement the desired code under mesh editor area if the operation should be performed over the object space. ex: in a "editmesh_tools.c" like file having a function like "edbm_do_randomize_vertex_exec(...) " However, it will be restricted to meshes and the suggestion was to apply to many object types Anyways... if anyone else wants to help in implementing this task then please be welcome.

Added subscriber: @Cruentus_Nex

Added subscriber: @Cruentus_Nex
Steve self-assigned this 2014-02-09 20:10:05 +01:00

Added subscriber: @PatriceBertrand

Added subscriber: @PatriceBertrand
Author
Owner

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Owner

Committed 2fc7d04804

closing.

Committed 2fc7d04804 closing.
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#38317
No description provided.