Forgot your password?
Click here
•
No account yet?
Please Register
•
Or login using
EN
Login
Toggle Navigation
Products
What's New in H20
Overview
Animation
Character FX
Karma XPU
Environments
VFX
Houdini
Overview
FX Features
CORE Features
Solaris
PDG
Houdini Engine
Overview
Engine Plug-Ins
Batch
Karma Renderer
Compare
SideFX Labs
Partners
Industries
Film & TV
Game Development
Motion Graphics
Virtual Reality
Community
Forum
News Feed
Project Profiles
Gallery
Contests & Jams
Houdini HIVE Events
Event Calendar
User Groups
Artist Directory
Learn
Start Here
My Learning
Learning Paths
Tutorials
Tech Demos
Talks & Webinars
Schools & Training
Education Programs
Overview
Students
Instructors
Administrators
Support
Customer Support
Help Desk | FAQ
System Requirements
Documentation
Changelog / Journal
Report a Bug/RFE
Get
Buy
Download
Content Library
Contact Info
Advanced Search
Forums
Technical Discussion
Delete by id %
Delete by id %
10437
8
1
circusmonkey
Member
2624 posts
Joined: Aug. 2006
Offline
Feb. 25, 2016 4:02 a.m.
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: March 2013
Offline
Feb. 25, 2016 5:14 a.m.
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: Aug. 2006
Offline
Feb. 25, 2016 3:26 p.m.
Thanks ….
Gone fishing
megasets
Member
85 posts
Joined: Aug. 2010
Offline
Feb. 25, 2016 4:16 p.m.
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 -
Feb. 25, 2016 16:22:00
Sam Swift-Glasman
Art Director
Five AI
circusmonkey
Member
2624 posts
Joined: Aug. 2006
Offline
Feb. 25, 2016 4:18 p.m.
I am going to test that as soon as I get to work !
Rob
Gone fishing
megasets
Member
85 posts
Joined: Aug. 2010
Offline
Feb. 25, 2016 4:49 p.m.
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: Aug. 2006
Offline
Feb. 25, 2016 6:38 p.m.
Very cool and going straight into my online notebook
Rob
Gone fishing
megasets
Member
85 posts
Joined: Aug. 2010
Offline
Feb. 28, 2016 6:30 p.m.
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: Aug. 2006
Offline
Feb. 28, 2016 7:23 p.m.
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
日本語