Particle texture behaves incorrectly after changing the number of particles #35247
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#35247
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%--- Operating System, Graphics card ---
Windows 7 64-bit Service Pack 1, Mobile Intel 4 Series Express Chipset
Error: Blender 2.66a 64-bit, Blender 2.67 RC 64-bit, both official versions from www.blender.org
Working: none I know of
A particle texture which controls the emission time behaves incorrectly after changing the number of particles.
It is 100% reproducible with the attached .blend file in Blender 2.66a 64-bit and Blender 2.67 RC 64-bit on my PC, which runs Windows 7 64-bit Service Pack 1.
Some notes:
%%%
Changed status to: 'Open'
Will try to have a look :)
Added subscribers: @LukasTonne, @brecht
Have a quick patch for this which seems to work here: http://www.pasteall.org/49304/diff
Root of the issue goes to the order of particle initialization which does texture evaluation (which does depend on particle coordinate) and particle birth coordinate calculation. So basically what happened is:
Reshuffled code a bit so now texture evaluation happens after particle coordinate calculation, but that requires more eyes to check: http://www.pasteall.org/49305/diff
@brecht, @LukasTonne guess you're most familiar with this code. Mind having a look into the patch?
I'm not so sure about this,
initialize_all_particles
does more than just callinginitialize_particle
for each particle, and that code is never called now? Except for keyed particles which still callsinitialize_all_particles
, but that probably needs to be changed as well?@brecht, that's a good catch actually.
Here's an updated patch: http://www.pasteall.org/49311/diff
Restored call of
initialize_all_particles()
. After some code research found thatinitialize_particle()
andinitialize_all_particles()
are followed byreset_particle()
orreset_all_particles()
. In the reset function we do know coordinates and could sample texture from there. And now the idea is to sample the texture from reset and don't do it from initialization.By the looks of it there's nothing which depends sampled texture after
initialize_particle()
and before thepsys_get_birth_coordinates()
(if someone could doublechec this it'll be cool) and also seems since resetting could change coordinates of particles then texture is to be re-sampled.Does it all seems logical now?
Looks good to me.
This issue was referenced by blender/blender-addons-contrib@78c491e62a
This issue was referenced by
78c491e62a
Changed status from 'Open' to: 'Resolved'
Closed by commit
78c491e62a
.Removed subscriber: @hal9000