BulgePoints requires offset property for bulge center.

View: New views
9 Messages — Rating Filter:   Alert me  

BulgePoints requires offset property for bulge center.

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

See attached

There are a few issues here, I can't control the bulge center, the
bulge center is fixed even if the mesh changes and ideally I'd like to
control the formula or curvature of the bulge. A b-spline would be a
neat way to do this. i.e. on creation of BulgePoints node an orange
b-spline curve is created that indicates the nodes property settings
and if the spine is edited then the curvature of the deformation
changes.


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

BulgePoints_test_1.k3d.7z (6K) Download Attachment

Re: BulgePoints requires offset property for bulge center.

by Timothy M. Shead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Daniel Scott Matthews wrote:
> See attached
>
> There are a few issues here, I can't control the bulge center, the
> bulge center is fixed even if the mesh changes and ideally I'd like to
> control the formula or curvature of the bulge. A b-spline would be a
> neat way to do this. i.e. on creation of BulgePoints node an orange
> b-spline curve is created that indicates the nodes property settings
> and if the spine is edited then the curvature of the deformation
> changes.

Bulge points is an interesting anomaly in that it's a pretty
arbitrarily-defined transformation.  Shoehorning an "origin" property in
was easy, since it only adds functionality without changing existing
behavior.  Give it a shot.  Additional functionality probably ought to
go into a new modifier.

Cheers,
Tim

[tshead.vcf]

begin:vcard
fn:Timothy Shead
n:Shead;Timothy
org:www.k-3d.org
email;internet:tshead@...
title:Founder
x-mozilla-html:FALSE
version:2.1
end:vcard



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: BulgePoints requires offset property for bulge center.

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 6, 2009 at 2:38 PM, Timothy M. Shead <tshead@...> wrote:

> Daniel Scott Matthews wrote:
>>
>> See attached
>>
>> There are a few issues here, I can't control the bulge center, the
>> bulge center is fixed even if the mesh changes and ideally I'd like to
>> control the formula or curvature of the bulge. A b-spline would be a
>> neat way to do this. i.e. on creation of BulgePoints node an orange
>> b-spline curve is created that indicates the nodes property settings
>> and if the spine is edited then the curvature of the deformation
>> changes.
>
> Bulge points is an interesting anomaly in that it's a pretty
> arbitrarily-defined transformation.  Shoehorning an "origin" property in was
> easy, since it only adds functionality without changing existing behavior.
>  Give it a shot.  Additional functionality probably ought to go into a new
> modifier.
>
Like this? I'm not sure if adding three properties is the most elegant
way to do it, what do you think? See attached.

If you move the offset +- on one axis and have the others 0 you will
not that you get negative bulge at one point, I'm not sure if this is
good or bad/ bug or feature.

If you like it I´ll push it to my public repro for you to grab "officially"

[bulge_points.cpp]

// K-3D
// Copyright (c) 1995-2006, Timothy M. Shead
//
// Contact: tshead@...
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/** \file
                \brief Implements Bulge tool, applies a "Bulge" transformation to points
                \author Andy Gill (buzz@...)
                \author Tim Shead (tshead@...)
                \author Romain Behar (romainbehar@...)
*/

#include <k3d-i18n-config.h>
#include <k3dsdk/algebra.h>
#include <k3dsdk/axis.h>
#include <k3dsdk/document_plugin_factory.h>
#include <k3dsdk/measurement.h>
#include <k3dsdk/mesh_simple_deformation_modifier.h>
#include <k3dsdk/parallel/blocked_range.h>
#include <k3dsdk/parallel/parallel_for.h>
#include <k3dsdk/parallel/threads.h>

namespace module
{

namespace deformation
{

/////////////////////////////////////////////////////////////////////////////
// bulge_points

class bulge_points :
        public k3d::mesh_simple_deformation_modifier
{
        typedef k3d::mesh_simple_deformation_modifier base;

public:
        bulge_points(k3d::iplugin_factory& Factory, k3d::idocument& Document) :
                base(Factory, Document),
                m_bulge_factor(init_owner(*this) + init_name("bulge_factor") + init_label(_("Bulge factor")) + init_description(_("Bulge amount")) + init_value(1.0) + init_step_increment(0.1) + init_units(typeid(k3d::measurement::scalar))),
                m_bulge_offset_x(init_owner(*this) + init_name("bulge_offset_x") + init_label(_("Bulge offset X")) + init_description(_("Bulge offset amount along X axis")) + init_value(1.0) + init_step_increment(0.1) + init_units(typeid(k3d::measurement::scalar))),
                m_bulge_offset_y(init_owner(*this) + init_name("bulge_offset_y") + init_label(_("Bulge offset Y")) + init_description(_("Bulge offset amount along Y axis")) + init_value(1.0) + init_step_increment(0.1) + init_units(typeid(k3d::measurement::scalar))),
                m_bulge_offset_z(init_owner(*this) + init_name("bulge_offset_z") + init_label(_("Bulge offset Z")) + init_description(_("Bulge offset amount along Z axis")) + init_value(1.0) + init_step_increment(0.1) + init_units(typeid(k3d::measurement::scalar))),

                m_displace_x(init_owner(*this) + init_name("displace_x") + init_label(_("Displace x")) + init_description(_("Displace on X axis")) + init_value(true)),
                m_displace_y(init_owner(*this) + init_name("displace_y") + init_label(_("Displace y")) + init_description(_("Displace on Y axis")) + init_value(true)),
                m_displace_z(init_owner(*this) + init_name("displace_z") + init_label(_("Displace z")) + init_description(_("Displace on Z axis")) + init_value(true)),
                m_axis(init_owner(*this) + init_name("axis") + init_label(_("Axis")) + init_description(_("Axis to bulge along")) + init_value(k3d::Z) + init_enumeration(k3d::axis_values())),
                m_type(init_owner(*this) + init_name("type") + init_label(_("Type")) + init_description(_("Bulge type")) + init_value(RADIAL) + init_enumeration(type_values()))
        {
                m_mesh_selection.changed_signal().connect(make_update_mesh_slot());
                m_bulge_factor.changed_signal().connect(make_update_mesh_slot());
                m_bulge_offset_x.changed_signal().connect(make_update_mesh_slot());
                m_bulge_offset_y.changed_signal().connect(make_update_mesh_slot());
                m_bulge_offset_z.changed_signal().connect(make_update_mesh_slot());
                m_displace_x.changed_signal().connect(make_update_mesh_slot());
                m_displace_y.changed_signal().connect(make_update_mesh_slot());
                m_displace_z.changed_signal().connect(make_update_mesh_slot());
                m_axis.changed_signal().connect(make_update_mesh_slot());
                m_type.changed_signal().connect(make_update_mesh_slot());
        }

        class worker
        {
        public:
                worker(const k3d::mesh::points_t& InputPoints, const k3d::mesh::selection_t& PointSelection, k3d::mesh::points_t& OutputPoints, const k3d::point3& Origin, const k3d::point3& Min, const k3d::point3& Max, const k3d::axis Axis, const bool Radial, const bool displace_x, const bool displace_y, const bool displace_z, const double bulge_factor, const double bulge_offset_x, const double bulge_offset_y, const double bulge_offset_z) :
                        input_points(InputPoints),
                        point_selection(PointSelection),
                        output_points(OutputPoints),
                        m_origin(Origin),
                        m_min(Min),
                        m_max(Max),
                        m_axis(Axis),
                        m_radial(Radial),
                        m_displace_x(displace_x),
                        m_displace_y(displace_y),
                        m_displace_z(displace_z),
                        m_bulge_factor(bulge_factor),
                        m_bulge_offset_x(bulge_offset_x),
                        m_bulge_offset_y(bulge_offset_y),
                        m_bulge_offset_z(bulge_offset_z),
                        m_size(Max - Min)
                {
                }

                void operator()(const k3d::parallel::blocked_range<k3d::uint_t>& range) const
                {
                        const k3d::uint_t point_begin = range.begin();
                        const k3d::uint_t point_end = range.end();
                        for(k3d::uint_t point = point_begin; point != point_end; ++point)
                        {
                                const k3d::point3& Coords = input_points[point];

                                k3d::point3 coords = Coords + m_origin;

                                double delta = 0;
                                double length = m_size[m_axis];
                                if(length != 0)
                                {
                                        double min = m_min[m_axis];
                                        double max = m_max[m_axis];
                                        double value = coords[m_axis];

                                        double down = value - min;
                                        double up = max - value;

                                        delta = 2 * down * up / (length*length);
                                }

                                double bulge_amount = delta;
                                if(m_radial)
                                {
                                        double distance = k3d::to_vector(coords).length();
                                        double scale;
                                        if(0 == distance)
                                                scale = 1.0;
                                        else
                                                scale =  (distance + m_bulge_factor * bulge_amount) / distance;

                                        if(m_displace_x && (k3d::X != m_axis))
                                                coords[0] *= scale;

                                        if(m_displace_y && (k3d::Y != m_axis))
                                                coords[1] *= scale;

                                        if(m_displace_z && (k3d::Z != m_axis))
                                                coords[2] *= scale;
                                }
                                else
                                {
                                        double offset = m_bulge_factor * bulge_amount;

                                        if(m_displace_x && (k3d::X != m_axis))
                                                coords[0] += offset;

                                        if(m_displace_y && (k3d::Y != m_axis))
                                                coords[1] += offset;

                                        if(m_displace_z && (k3d::Z != m_axis))
                                                coords[2] += offset;
                                }

                                coords = coords - k3d::to_vector(m_origin);

                                output_points[point] = k3d::mix(input_points[point], coords, point_selection[point]);
                        }
                }

        private:
                const k3d::mesh::points_t& input_points;
                const k3d::mesh::selection_t& point_selection;
                k3d::mesh::points_t& output_points;
                const k3d::point3 m_origin;
                const k3d::point3 m_min;
                const k3d::point3 m_max;
                const k3d::axis m_axis;
                const bool m_radial;
                const bool m_displace_x;
                const bool m_displace_y;
                const bool m_displace_z;
                const double m_bulge_factor;
                const double m_bulge_offset_x;
                const double m_bulge_offset_y;
                const double m_bulge_offset_z;
                const k3d::vector3 m_size;
        };

        void on_deform_mesh(const k3d::mesh::points_t& InputPoints, const k3d::mesh::selection_t& PointSelection, k3d::mesh::points_t& OutputPoints)
        {
                const k3d::bounding_box3 bounds = k3d::mesh::bounds(InputPoints);

                const double bulge_factor = m_bulge_factor.pipeline_value();
                const double bulge_offset_x = m_bulge_offset_x.pipeline_value();
                const double bulge_offset_y = m_bulge_offset_y.pipeline_value();
                const double bulge_offset_z = m_bulge_offset_z.pipeline_value();

                const double displace_x = m_displace_x.pipeline_value();
                const double displace_y = m_displace_y.pipeline_value();
                const double displace_z = m_displace_z.pipeline_value();
                const k3d::axis axis = m_axis.pipeline_value();

                const k3d::point3 origin(m_bulge_offset_x.pipeline_value(), m_bulge_offset_y.pipeline_value(), m_bulge_offset_z.pipeline_value());
                const k3d::point3 min(bounds.nx, bounds.ny, bounds.nz);
                const k3d::point3 max(bounds.px, bounds.py, bounds.pz);
                const bool radial = m_type.pipeline_value() == RADIAL;

                k3d::parallel::parallel_for(
                        k3d::parallel::blocked_range<k3d::uint_t>(0, OutputPoints.size(), k3d::parallel::grain_size()),
                        worker(InputPoints, PointSelection, OutputPoints, origin, min, max, axis, radial, displace_x, displace_y, displace_z, bulge_factor, bulge_offset_x, bulge_offset_y, bulge_offset_z));
        }

        static k3d::iplugin_factory& get_factory()
        {
                static k3d::document_plugin_factory<bulge_points,
                        k3d::interface_list<k3d::imesh_source,
                        k3d::interface_list<k3d::imesh_sink > > > factory(
                                k3d::uuid(0xb7002ece, 0x8e6348f5, 0xa99ce9b0, 0xfbeba55f),
                                "BulgePoints",
                                _("Bulges mesh points around a point"),
                                "Deformation",
                                k3d::iplugin_factory::STABLE);

                return factory;
        }

private:
        typedef enum
        {
                LINEAR,
                RADIAL,
        } Type;

        friend std::ostream& operator<<(std::ostream& Stream, const Type& Value)
        {
                switch(Value)
                {
                        case LINEAR:
                                Stream << "linear";
                                break;
                        case RADIAL:
                                Stream << "radial";
                                break;
                }

                return Stream;
        }

        friend std::istream& operator>>(std::istream& Stream, Type& Value)
        {
                std::string text;
                Stream >> text;

                if(text == "linear")
                        Value = LINEAR;
                else if(text == "radial")
                        Value = RADIAL;
                else
                        k3d::log() << error << k3d_file_reference << ": unknown enumeration [" << text << "]" << std::endl;

                return Stream;
        }

        static const k3d::ienumeration_property::enumeration_values_t& type_values()
        {
                static k3d::ienumeration_property::enumeration_values_t values;
                if(values.empty())
                {
                        values.push_back(k3d::ienumeration_property::enumeration_value_t("Linear", "linear", "Linear bulge"));
                        values.push_back(k3d::ienumeration_property::enumeration_value_t("Radial", "radial", "Radial bulge"));
                }

                return values;
        }

        k3d_data(double, immutable_name, change_signal, with_undo, local_storage, no_constraint, measurement_property, with_serialization) m_bulge_factor;
        k3d_data(double, immutable_name, change_signal, with_undo, local_storage, no_constraint, measurement_property, with_serialization) m_bulge_offset_x;
        k3d_data(double, immutable_name, change_signal, with_undo, local_storage, no_constraint, measurement_property, with_serialization) m_bulge_offset_y;
        k3d_data(double, immutable_name, change_signal, with_undo, local_storage, no_constraint, measurement_property, with_serialization) m_bulge_offset_z;
        k3d_data(bool, immutable_name, change_signal, with_undo, local_storage, no_constraint, writable_property, with_serialization) m_displace_x;
        k3d_data(bool, immutable_name, change_signal, with_undo, local_storage, no_constraint, writable_property, with_serialization) m_displace_y;
        k3d_data(bool, immutable_name, change_signal, with_undo, local_storage, no_constraint, writable_property, with_serialization) m_displace_z;
        k3d_data(k3d::axis, immutable_name, change_signal, with_undo, local_storage, no_constraint, enumeration_property, with_serialization) m_axis;
        k3d_data(Type, immutable_name, change_signal, with_undo, local_storage, no_constraint, enumeration_property, with_serialization) m_type;
};

/////////////////////////////////////////////////////////////////////////////
// bulge_points_factory

k3d::iplugin_factory& bulge_points_factory()
{
        return bulge_points::get_factory();
}

} // namespace deformation

} // namespace module




------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: BulgePoints requires offset property for bulge center.

by Timothy M. Shead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Daniel Scott Matthews wrote:

> On Tue, Oct 6, 2009 at 2:38 PM, Timothy M. Shead <tshead@...> wrote:
>> Daniel Scott Matthews wrote:
>>> See attached
>>>
>>> There are a few issues here, I can't control the bulge center, the
>>> bulge center is fixed even if the mesh changes and ideally I'd like to
>>> control the formula or curvature of the bulge. A b-spline would be a
>>> neat way to do this. i.e. on creation of BulgePoints node an orange
>>> b-spline curve is created that indicates the nodes property settings
>>> and if the spine is edited then the curvature of the deformation
>>> changes.
>> Bulge points is an interesting anomaly in that it's a pretty
>> arbitrarily-defined transformation.  Shoehorning an "origin" property in was
>> easy, since it only adds functionality without changing existing behavior.
>>  Give it a shot.  Additional functionality probably ought to go into a new
>> modifier.
>>
>
> Like this? I'm not sure if adding three properties is the most elegant
> way to do it, what do you think? See attached.
>
> If you move the offset +- on one axis and have the others 0 you will
> not that you get negative bulge at one point, I'm not sure if this is
> good or bad/ bug or feature.
>
> If you like it I´ll push it to my public repro for you to grab "officially"
>
Sorry, I wasn't clear - I meant "I added an origin property ... give it
a shot" ... it's already in the SF repo.

Cheers,
Tim


[tshead.vcf]

begin:vcard
fn:Timothy Shead
n:Shead;Timothy
org:www.k-3d.org
email;internet:tshead@...
title:Founder
x-mozilla-html:FALSE
version:2.1
end:vcard



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: BulgePoints requires offset property for bulge center.

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 6, 2009 at 4:26 PM, Timothy M. Shead <tshead@...> wrote:

> Daniel Scott Matthews wrote:
>>
>> On Tue, Oct 6, 2009 at 2:38 PM, Timothy M. Shead <tshead@...> wrote:
>>>
>>> Daniel Scott Matthews wrote:
>>>>
>>>> See attached
>>>>
>>>> There are a few issues here, I can't control the bulge center, the
>>>> bulge center is fixed even if the mesh changes and ideally I'd like to
>>>> control the formula or curvature of the bulge. A b-spline would be a
>>>> neat way to do this. i.e. on creation of BulgePoints node an orange
>>>> b-spline curve is created that indicates the nodes property settings
>>>> and if the spine is edited then the curvature of the deformation
>>>> changes.
>>>
>>> Bulge points is an interesting anomaly in that it's a pretty
>>> arbitrarily-defined transformation.  Shoehorning an "origin" property in
>>> was
>>> easy, since it only adds functionality without changing existing
>>> behavior.
>>>  Give it a shot.  Additional functionality probably ought to go into a
>>> new
>>> modifier.
>>>
>>
>> Like this? I'm not sure if adding three properties is the most elegant
>> way to do it, what do you think? See attached.
>>
>> If you move the offset +- on one axis and have the others 0 you will
>> not that you get negative bulge at one point, I'm not sure if this is
>> good or bad/ bug or feature.
>>
>> If you like it I´ll push it to my public repro for you to grab
>> "officially"
>>
>
> Sorry, I wasn't clear - I meant "I added an origin property ... give it a
> shot" ... it's already in the SF repo.
>
Ah! I see what you did there, that is a neater way of doing it.

Now that you can add multiple bulges with different offsets it has
become a useful modeling tool, thanks!

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: BulgePoints requires offset property for bulge center.

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 6, 2009 at 8:45 AM, Daniel Scott Matthews
<dsmatthews@...> wrote:
> Now that you can add multiple bulges with different offsets it has
> become a useful modeling tool, thanks!

Also, remember that we have the DeformationExpression modifier, where
you can enter an arbitrary expression to deform a mesh. Deformation
using a curve is a good idea though.

Cheers,

--
Bart

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: BulgePoints requires offset property for bulge center.

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 7, 2009 at 6:49 AM, Bart Janssens <bart.janssens@...> wrote:
> On Tue, Oct 6, 2009 at 8:45 AM, Daniel Scott Matthews
> <dsmatthews@...> wrote:
>> Now that you can add multiple bulges with different offsets it has
>> become a useful modeling tool, thanks!
>
> Also, remember that we have the DeformationExpression modifier, where
> you can enter an arbitrary expression to deform a mesh. Deformation
> using a curve is a good idea though.
>

I did not realize that you can add scalar properties to that node type
and then refer to them as variable in the equations, that is awesome!

Now if I can have those scalars linked to properties of other geometry
(perhaps non-rendering) I would have curve control. Hmmm I will
experiment more, in the mean time check out the attached file, run the
animation to see it drive the variables in the equations.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

DeformationExpression_test_1.k3d.7z (6K) Download Attachment

Re: BulgePoints requires offset property for bulge center.

by hoako :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Daniel Scott Matthews wrote:
> See attached
>
> There are a few issues here, I can't control the bulge center, the
> bulge center is fixed even if the mesh changes and ideally I'd like to
> control the formula or curvature of the bulge. A b-spline would be a
> neat way to do this. i.e. on creation of BulgePoints node an orange
> b-spline curve is created that indicates the nodes property settings
> and if the spine is edited then the curvature of the deformation
> changes.
Sorry about the late answer.
In a prior thread we arrived to the conclusion of using InvertMatrix.
What to do?

Create a cube as as Dummy for the Center of the BulgePoints Modifier
Create a InvertMatrix and connect it to the ouputmatrix of the cube instance
Create a TransformPoint modifier of the to-be-bulged object
   Connect the inverted matrix to this modifier
Apply the Bulge Modifier
Create a new TransformPoint Modifier and connect it to the original
output_matrix of the cube

Move the cube -> move the bulge center. (connect the cube painter only
to the edge painter so it won't bother viewing)

Cheers!
Joaquín


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: BulgePoints requires offset property for bulge center.

by Daniel Scott Matthews :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 12, 2009 at 1:28 AM, Joaquin Duo <hoakoduo@...> wrote:

> Daniel Scott Matthews wrote:
>>
>> See attached
>>
>> There are a few issues here, I can't control the bulge center, the
>> bulge center is fixed even if the mesh changes and ideally I'd like to
>> control the formula or curvature of the bulge. A b-spline would be a
>> neat way to do this. i.e. on creation of BulgePoints node an orange
>> b-spline curve is created that indicates the nodes property settings
>> and if the spine is edited then the curvature of the deformation
>> changes.
>
> Sorry about the late answer.
> In a prior thread we arrived to the conclusion of using InvertMatrix.
> What to do?
>
> Create a cube as as Dummy for the Center of the BulgePoints Modifier
> Create a InvertMatrix and connect it to the ouputmatrix of the cube instance
> Create a TransformPoint modifier of the to-be-bulged object
>  Connect the inverted matrix to this modifier
> Apply the Bulge Modifier
> Create a new TransformPoint Modifier and connect it to the original
> output_matrix of the cube
>
> Move the cube -> move the bulge center. (connect the cube painter only to
> the edge painter so it won't bother viewing)
>
That approach seems like a good general method for creating custom
geometry manipulators. I wonder if the idea can be developed further
and parts of the method be automated via python scripts?

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development