Forgot your password?
Click here
•
No account yet?
Please Register
•
Or login using
JA
ログイン
Toggle Navigation
製品
What's New in H20
概要
Animation
Character FX
Karma XPU
Environments
VFX
Houdini
概要
FX 機能
CORE 機能
Solaris
PDG
Houdini Engine
概要
Engine プラグイン
バッチ処理
Karma Renderer
製品比較
SideFX Labs
Partners
業界
Film & TV
ゲーム開発
モーショングラフィクス
Virtual Reality
コミュニティ
フォーラム
ニュース
カスタマ ストーリー
Gallery
Contests & Jams
Houdini HIVE Events
イベントカレンダー
User Groups
Artist Directory
学習
Start Here
My Learning
ラーニングパス
チュートリアル
Tech Demos
Houdini 講演
学校紹介
教育プログラム
概要
学生
講師
管理者
サポート
Customer Support
ヘルプデスク FAQ
Houdini システム環境
ドキュメント
Changelog / Journal
Report a Bug/RFE
Get
購入
ダウンロード
コンテンツライブラリ
お問い合わせ
Advanced Search
Forums
Technical Discussion
Delete by id %
Delete by id %
10449
8
1
circusmonkey
Member
2624 posts
Joined: 8月 2006
Offline
2016年2月25日 4:02
Hi Brains trust,
Is there a way to delete points by a ID % . I can already delete by a % with $PT as there's $NPT to give you the total. I can delete based on a id number ie
$ID <= 3000
I just thought there might be something more elegant
Any ideas
rob
Gone fishing
Skybar
Member
166 posts
Joined: 3月 2013
Offline
2016年2月25日 5:14
You could do something like rand(@id) > 0.5. Maybe not the most controllable, but should get you roughly a correct percentage.
circusmonkey
Member
2624 posts
Joined: 8月 2006
Offline
2016年2月25日 15:26
Thanks ….
Gone fishing
megasets
Member
85 posts
Joined: 8月 2010
Offline
2016年2月25日 16:16
in a attribute wrangle running on points you can use:
int modulus = 5;
if (@id %modulus==0 )
{
removepoint( geoself(), @ptnum );
}
the code above is tested
Edited by -
2016年2月25日 16:22:00
Sam Swift-Glasman
Art Director
Five AI
circusmonkey
Member
2624 posts
Joined: 8月 2006
Offline
2016年2月25日 16:18
I am going to test that as soon as I get to work !
Rob
Gone fishing
megasets
Member
85 posts
Joined: 8月 2010
Offline
2016年2月25日 16:49
my example above would remove 20% of points
using a modulus is fine if you want to remove a simple amount ie half %2, a third %3 ect
I had another go and realised that to use a percentage instead you could use the following snippet:
int percentage = 75;
if ( @id % 100 < percentage )
{
removepoint( geoself(), @ptnum );
}
Sam Swift-Glasman
Art Director
Five AI
circusmonkey
Member
2624 posts
Joined: 8月 2006
Offline
2016年2月25日 18:38
Very cool and going straight into my online notebook
Rob
Gone fishing
megasets
Member
85 posts
Joined: 8月 2010
Offline
2016年2月28日 18:30
No problem
is your notebook public? I wouldn't mind having a look if so
do you have a link?
cheers
Sam Swift-Glasman
Art Director
Five AI
circusmonkey
Member
2624 posts
Joined: 8月 2006
Offline
2016年2月28日 19:23
PM sent
Rob
Gone fishing
Quick Links
Search links
Show recent posts
Show unanswered posts
Jump to
News
Houdini Indie and Apprentice
Houdini Lounge
Technical Discussion
Work in Progress
Houdini Learning Materials
Houdini for Realtime
BYOC + Illume
Solaris and Karma
Rigging
Animation
PDG/TOPs
The Orbolt Smart 3D Asset Store
Houdini Jobs
日本語フォーラム
Licensing
Houdini Engine API
Houdini Engine for Unreal
Houdini Engine for Unity
Houdini Engine for Maya
Houdini Engine for 3ds Max
Mardini 2024
H20 Tech Art Challenge
Mardini 2023
SideFX Labs Tech Art Challenge 2022
MARDINI Daily Art Challenge 2022
SideFX Labs Tech Art Challenge 2021
MARDINI Daily Challenge 2021
Nodevember 2020
HOULY Daily Challenge
3rd Party
SI Users
Choose language
English
日本語