This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/nodes/NOD_simulation.h
Jacques Lucke 396d0b5cd0 Particles: new Age Reached Event, Kill Particle and Random Float node
The hardcoded age limit is now gone. The behavior can be implemented
with an Age Reached Event and Kill Particle node. Other utility nodes
to handle age limits of particles can be added later. Adding an
Age Limit attribute to particles on birth will be useful for some effects,
e.g. when you want to control the color or size of a particle over its
life time.

The Random Float node takes a seed currently. Different nodes will
produce different values even with the same seed. However, the same
node will generate the same random number for the same seed every
time. The "Hash" of a particle can be used as seed. Later, we'd want
to have more modes in the node to make it more user friendly.
Modes could be: Per Particle, Per Time, Per Particle Per Time,
Per Node Instance, ...
Also a Random Vector node will be useful, as it currently has to be
build using three Random Float nodes.
2020-08-02 22:10:47 +02:00

50 lines
1.7 KiB
C++

/*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __NOD_SIMULATION_H__
#define __NOD_SIMULATION_H__
#ifdef __cplusplus
extern "C" {
#endif
extern struct bNodeTreeType *ntreeType_Simulation;
void register_node_tree_type_sim(void);
void register_node_type_sim_group(void);
void register_node_type_sim_particle_simulation(void);
void register_node_type_sim_force(void);
void register_node_type_sim_set_particle_attribute(void);
void register_node_type_sim_particle_birth_event(void);
void register_node_type_sim_particle_time_step_event(void);
void register_node_type_sim_execute_condition(void);
void register_node_type_sim_multi_execute(void);
void register_node_type_sim_particle_mesh_emitter(void);
void register_node_type_sim_particle_mesh_collision_event(void);
void register_node_type_sim_emit_particles(void);
void register_node_type_sim_time(void);
void register_node_type_sim_particle_attribute(void);
void register_node_type_sim_age_reached_event(void);
void register_node_type_sim_kill_particle(void);
#ifdef __cplusplus
}
#endif
#endif /* __NOD_SIMULATION_H__ */