Catherine kan

jingyukan

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

give color to a volume and remove a part of the volume 2020年6月16日9:48

Hello,

The visualization I want to achieve is to color my sphere volume shells by shells, which was successful by using a color node and using programming to modify its parameters; then, I want to cut a quater or a half of the sphere (it was achieved by Vexpression shown in screenshot 1) so that the shells of color contrast can be more obvious to be seen, like seeing a cross section.
However, what I noticed was that the color seems to be set again based on the new volume obtained after removing a part of the sphere by using volume wrangle node. This was noticed from the second screenshot attached, there should be half of the shells with bright color just like the color ramp gradient shows.

Could someone provide another way to achieve my visualization?

Thanks in advance!!

remove 1/4 sphere volume with VEX code 2020年6月15日23:56

mestela
One of no doubt many ways:

if (@P.z>0 && @P.y>0){
    @density*=1;
} else {
    @density=0;
}

Thanks so much!
I remembered I tried this logic before, my syntax might be wrong

remove 1/4 sphere volume with VEX code 2020年6月15日19:18

Hello,

I preciously cut my sphere volume in half and let one half disappear using Vexpression like “f@density *= v@P.x<0”, but what if I want its 1/4 to be removed?
I tried to use expression like “f@density -= f@density *v@P.z<0 *v@P.x<0;”, but it did not work at all.
Hope someone can provide another way, thanks!