diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-16 17:09:09 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-16 17:09:19 +0300 |
commit | f64710a518238fd4bf5e1842481bc1194249d6e7 (patch) | |
tree | b8d93a8ce1547cc1e32049c12412fc49c2a08a4f /source/blender/blenkernel | |
parent | 4249d6f58e08bec0c7dbaddc41548dfb0bd7d7be (diff) |
Particles: change initial velocity of particles
This is only temporary, but makes testing the system a bit easier.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/simulation.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc index e735c30ffae..7ba6e07fb64 100644 --- a/source/blender/blenkernel/intern/simulation.cc +++ b/source/blender/blenkernel/intern/simulation.cc @@ -732,12 +732,12 @@ static void simulation_data_update(Depsgraph *depsgraph, Scene *scene, Simulatio fn::MFNetwork network; ResourceCollector resources; MFNetworkTreeMap network_map = insert_node_tree_into_mf_network(network, tree, resources); - // WM_clipboard_text_set(tree.to_dot().c_str(), false); Map<const fn::MFOutputSocket *, std::string> attribute_inputs = deduplicate_attribute_nodes( network, network_map, tree); fn::mf_network_optimization::constant_folding(network, resources); fn::mf_network_optimization::common_subnetwork_elimination(network); fn::mf_network_optimization::dead_node_removal(network); + // WM_clipboard_text_set(network.to_dot().c_str(), false); Map<std::string, Vector<const ParticleForce *>> forces_by_simulation = collect_forces( network_map, resources, attribute_inputs); @@ -763,7 +763,7 @@ static void simulation_data_update(Depsgraph *depsgraph, Scene *scene, Simulatio for (uint i : positions.index_range()) { positions[i] = {i / 100.0f, 0, 0}; - velocities[i] = {0, BLI_rng_get_float(rng), BLI_rng_get_float(rng) * 2 + 1}; + velocities[i] = {0, BLI_rng_get_float(rng) - 0.5f, BLI_rng_get_float(rng) - 0.5f}; ids[i] = i; } } |