hi. im sorry for a weird title. i have no idea how to call it. but please, could someone help me?
what i want to achieve is effect as on the first image but without creating that geometry from the curve. is there some way to calculate area within the curve and then find point in that area (well, below the area)?
now i have to make this:
but i would just like to use the curve somehow:
Test if particle is inside curve area...
-
- Posts: 143
- Joined: 09 Jun 2009, 12:12
- Location: Czech Republic
- Contact:
Re: Test if particle is inside curve area...
If you pretend that the curve points define a polygon, you can use one of the algorithms discussed here: http://en.wikipedia.org/wiki/Point_in_polygon. However, you might need to add a lot of points on the curve to get the desired smoothness.
This page discusses an algorithm using spline curves directly: http://alienryderflex.com/polyspline/.
Personally, I think it's a lot easier to create the extra polymesh geometry.
This page discusses an algorithm using spline curves directly: http://alienryderflex.com/polyspline/.
Personally, I think it's a lot easier to create the extra polymesh geometry.
Re: Test if particle is inside curve area...
Cheap trick would be something like this. Of course this is not "inside curve", it's just what you see in ICE tree. By inverting the curve you invert the result, too.
-
- Posts: 143
- Joined: 09 Jun 2009, 12:12
- Location: Czech Republic
- Contact:
Re: Test if particle is inside curve area...
thanks a lot both of you.
Mathaeus, your solution does all i need! it's a great way to control areas without using tons of weightmaps etc. i added some turbulence to the last "greater than" node so it has irregular edge and here is a test... it will be cool addition to the scattering compounds set... thanks again
Mathaeus, your solution does all i need! it's a great way to control areas without using tons of weightmaps etc. i added some turbulence to the last "greater than" node so it has irregular edge and here is a test... it will be cool addition to the scattering compounds set... thanks again
-
- Posts: 253
- Joined: 17 Feb 2010, 15:13
Re: Test if particle is inside curve area...
that's pretty cool. i just can't make it work with multiple curves
SI 2015 @ WIN7-64
Re: Test if particle is inside curve area...
caledonian_tartan wrote:that's pretty cool. i just can't make it work with multiple curves
If you mean ICE tree I've posted, it should work with multiple curves, let's say by grouping them with 'group geometry' node, plugging this into 'get closest location'...
However, tangents on curves should be oriented in the same way (clockwise, counter clockwise).
Also, method really doesn't like sharp corners on curves, or linear curves, as it rely on comparison of curve tangent and direction from particle to closest location on curve. These two vectors should be perpendicular as much as possible. Doesn't work for text, for example.
In real word, this is like looking at river and finding on *which side* on river you are, according to direction of water flow.
Re: Test if particle is inside curve area...
Nice .. should be a great compound for someone to study how cross and dot product can be used.
Ps I see a "screenshot of the week" coming
Ps I see a "screenshot of the week" coming
softimage resources section updated Jan 5th 2024
Who is online
Users browsing this forum: No registered users and 44 guests