Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15782)

Issue 15410043: Move curve's boundbox and texspace calculation out of modifier stack (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by sergey.vfx
Modified:
10 years, 4 months ago
Reviewers:
bf-codereview, ideasman42, brechtvl
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

There were several issues with how bounding box and texture space are calculated: - This was done at the same time as applying modifiers, meaning if several objects are sharing the same curve datablock, bounding box and texture space will be calculated multiple times. Further, allocating bounding box wasn't safe for threading. - Bounding box and texture space were evaluated after pre-tessellation modifiers are applied. This means Curve-level data is actually depends on object data, and it's really bad because different objects could have different modifiers and this leads to conflicts (curve's data depends on object evaluation order) and doesn't behave in a predictable way. This change moves bounding box and texture space evaluation from modifier stack to own utility functions, just like it's was done for meshes. This makes curve objects update thread-safe, but gives some limitations as well. Namely, with such approach it's not so clear how to preserve the same behavior of texture space: before this change texture space and bounding box would match beveled curve as accurate as possible. Old behavior was nice for quick texturing -- in most cases you didn't need to modify texture space at all. But texture space was depending on render/preview settings which could easily lead to situations, when final result would be far different from preview one. Now we're using CV points coordinates and their radius to approximate the bounding box. This doesn't give the same exact texture space, but it helps a lot keeping texture space in a nice predictable way. We could make approximation smarter in the future, but fir now added operator to match texture space to fully tessellated curve called "Match Texture Space".

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -27 lines) Patch
b/release/scripts/startup/bl_ui/properties_data_curve.py View 1 chunk +2 lines, -0 lines 0 comments Download
b/source/blender/blenkernel/BKE_curve.h View 2 chunks +2 lines, -2 lines 0 comments Download
b/source/blender/blenkernel/intern/curve.c View 7 chunks +40 lines, -10 lines 0 comments Download
b/source/blender/blenkernel/intern/displist.c View 4 chunks +0 lines, -12 lines 0 comments Download
b/source/blender/blenkernel/intern/object.c View 1 chunk +5 lines, -0 lines 0 comments Download
b/source/blender/blenloader/intern/readfile.c View 1 chunk +0 lines, -1 line 0 comments Download
b/source/blender/editors/curve/curve_intern.h View 1 chunk +2 lines, -0 lines 0 comments Download
b/source/blender/editors/curve/curve_ops.c View 1 chunk +2 lines, -0 lines 0 comments Download
b/source/blender/editors/curve/editcurve.c View 2 chunks +63 lines, -0 lines 0 comments Download
b/source/blender/makesdna/DNA_curve_types.h View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 2
sergey.vfx
10 years, 6 months ago (2013-10-20 15:29:03 UTC) #1
brechtvl
10 years, 6 months ago (2013-10-23 18:36:18 UTC) #2
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b