Giter VIP home page Giter VIP logo

crowdmaster's People

Contributors

ekaj2 avatar johnroper100 avatar niewinny avatar peter-noble avatar theduckcow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crowdmaster's Issues

Action slows down when the agent does

Someone had noticed in other crowd systems that when the agent slows down to not creash into somebody or something, it's animation slows down as well. Any ideas as to if this is dooable?

Validate brain graph

Method to check brain graph (like the gen nodes). If not valid stop sim and highlight incorrect node. Check for loops in the graph. Loops in state machine allowed but not logic.

UI: Zero and Fake users not displayed correctly in Sim and Gen datablock in node editor menu bar.

Current behavior (both Sim and Gen exhibit this behavior):

  1. When a datablock is unlinked using the X button the "0" character does not appear next to item in the browse node tree list of datablock. If you save the file, exit and then reopen it will display correctly. However, if you link and unlink and again the "0" will not appear.
  2. When adding a Fake using the F button user the number "2" does not appear in the datablock info to indicate there is more than one user linked. If you move to another node tree and then back it will display correctly.

Expected behavior:

  1. If no users are linked then "0" should always appear next to the noodle name in the browse node tree list of datablock
  2. When a fake user is added the number "2" appears to indicate there is more than one user linked.

NOTE: On face value it looks like Gen and Sim noodles are saved when the even if no users are linked when no zero is displayed as the User count is not being reduced (note I believe this can lead to noodles disappearing unexpectedly... see next Issue). Most datablocks are purged when the session ends (I believe actions may be an exception). If the system is meant to be designed like this the do you need the Fake user option all all?

To reproduce 1 - 0 not appearing. Example is Gen but Sim acts the same way:
Step 1: Create a new Gen noodle. Unlink the noodle by press in the X button. Bring up the browse node tree list of datablock. The "0" is missing.

image

To reproduce 2 - Fake user not being added to displayed user count.
Step 1: Create a new Gen node. Press the F button. No change - compare with snapshot from a material with fake user added.

image

image

Python error if bone in Pose or Edit mode when Resetting group

Current behavior: If you have a agent that is child object of a bone, when resetting the group if you have either the agent bone or the originating bone in Pose mode it will generate a python error. The group cannot be reset. Same error occurs if bone in Edit mode.

Expected behavior: Group is reset as if both bones are in Object mode.

Steps to repeat:
Step 1: Set up a noodle as in the image below. Armature and Mesh are not grouped or parented. Set up an empty as the agent generation target.

image

Step 2: Generate agent
image

Step 3: Change originating armature into Pose mode
image

Step 4: Select group in tool panel (if not selected). Reset group from Tools panel. Python error will appear. Group, armature and mesh remain.

image

Step 5: Select the Agent armature bone and change to Pose mode.
image

Step 6: Select group in tool panel (if not selected). Reset group from Tools panel. Python error will appear. Group, armature and mesh remain.

image

To repeat for Edit mode same instruction, replace Pose mode with Edit mode.

Link Armature

When using LinkArmature node and generate agents, group objects are at expected places but proxies created for linked armatures are always at zero. There's no much information on it even in docs.

For example, Say, in LinkArmature node, following are input values

  • Group Name : grpTest
  • Rig Object : testArmature
  • Constrain Bone : root

After generating agents, Objects and their positions are as follows :

  • cm_grpTest.000 : (10, 0, 0)
  • cm_grpTest.000_proxy : (0,0,0)

  • cm_grpTest.001 : (-10,0,0)
  • cm_grpTest.001_proxy : (0,0,0)

.....etc,.

Expected output is, Even proxies(cm_grpTest.XXX_proxy) should be at same position as groups (cm_grpTest.XXX)

Nodes: More than one input being connected to same socket

In the Agent Generation node editor you can connect the output of more than one node to the input of another node (see image attached). Seems to break Blender convention of one input per socket and may lead to unexpected outcomes for users.

Suggested behavior is when an new input is connected to a socket with an existing input, the existing input is deleted and replaced with the new input (in line with the compositor).

Simulation node editor has not been tested for same behavior but suggest that it should also conform to a single input into a socket.

20170613 - more than one node connected

Rigid Bodies

Any Ida's on how these could be integrated? All other crowd simulators have them.

Agent Generation is not being added to Undo stack

IF you generate agents and then use Undo (Ctrl+Z) then it undoes the operation prior to Agent Generation. for the relevant view.

To repeat:
Step 1 - create a simple Generation noodle.

Step 2 - do some form of operation and view the history (F3 in 3D view). Example: Resize the cube

image

Step 3 - Generate Agents and view change history - Agent generation is not part of the History.

image

Step 4 - Undo and it will undo generation AND the previous operator resulting in the cube reverting to previous size.

image

I understand that you can regenerate the agent system by hitting Agent Gen again. However, it is natural for people to use Undo which may lead to unexpected results and unhappy users.

Generating a new set of agents reset previously generated agents resulting no more than one group of agents at a time

Current behavior: When one set of auto agents is generated it resets the previously auto generated agents meaning you can only have one set of auto generated agents at a time.

Expected behavior: Only the agents for the Generated group generated, no other groups are reset.

Note 1: Added manual agent group and had it selected in the View Group Details panel when generating second group. No change in behavior.

Note 2: you can workaround this issue by combining the nodes together into one.
image

Steps to repeat:
Step 1: Open sample file.
groups overwriting.zip

Step 2: Select Gen - Cube noodle for agent generation. Generate Agents. Cube will appear and Cube brain group will be listed in the View Group Details panel list.

image

Step 3: Select Gen - Sphere noodle for agent generation. Generate Agents. Cube agent previously generated will be deleted along with Cube brain group. Sphere will appear and Sphere brain group will be listed in the View Group Details panel list.

image

Step 4: Select Gen - Cube noodle for agent generation again. Generate Agents. Now Sphere agent previously generated will be deleted along with Sphere brain group. Cube will appear and Cube brain group will be listed in the View Group Details panel list.

image

Reroute or null node

Can reroute nodes have multiple inputs? If we implement our own reroute will it be used when pressing shift-click? Use to group dependencies.

Licensing

I noticed that CrowdMaster is missing the standard GPL 3 licensing block at the head of all of the script files. Would you like me to add these?

UI: Current noodle is "forgotten" when moving between Gen and Sim node contexts.

UI: For both the Gen and Sim context when changing between context Blender "forgets" which noodle that was last selected causing the user to have to reselect the noodle from the list to be able to edit.

Expected behavior: When moving between other contexts the last noodle being edited is displayed. e.g If you create a new material noodle then move to another node context then back it will still be displayed.

To repeat for Gen (for Sim just replace in step):

Step 1 - Create a new Gen noodle.
image

Step 2 - Change context to any other to any other (composite, texture, material or Sim)
image

Step 3 - Change context back to context to Gen - the noodle has disappeared
image

Step 4 - reselect noodle
image

Generate Node

I just installed the CrowdMaster Addon but am having trouble with the Generate Node. The 'Generate Agents' button doesn't show.

I am using Blender 2.78 & CrowdMaster 1.2.1

To test if it was a mistake in my node setup, I have downloaded the sample files from the CM website, the 'Generate Agents' button does not show on the Generate Node either however.

Has anyone come across this issue before?

Agent Gen - Adding a non-vertex based object to Mesh node causes python eror

Current behavior: If you select a non-vertex object e.g. empty, armature, spline, text, etc... from the drop down list for guide mesh in the Mesh node, generating agents will throw a Python error.

Expected behavior: List of objects to select from is filtered so it only shows legitimate mesh objects. Is this is not possible then fails gracefully with a meaningful error message.

Steps to reproduce:
Step 1: Replace default cube with an Empty or other non-mesh object (text, armature, etc)
Step 2: Set up a noodle as per the image below.

image

Step 3: Select Empty and hit Agent Generation. Error will occur.

image

Crowdmaster 1.3.0 - develop
Last commit 59bca6f
Windows 10
Blender 2.78b

Cannot install addon

When the CrowdMaster folder is dropped into the addons folder in Blender program files, the addon shows up in the user interface, but it gives an error when trying to enable it.

Debug Options -> Run Small Tests produces failure

Output is


FAILED (errors=1)
Info: Total files 0 | Changed 0 | Failed 0
.Error: You must save your file first!
E..
======================================================================
ERROR: testStartStopSim (CrowdMaster.cm_tests.AddonRegisterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fabian/.config/blender/2.80/scripts/addons/CrowdMaster/cm_tests.py", line 40, in testStartStopSim
    bpy.ops.scene.cm_start()
  File "/home/fabian/Programme/blender-2.80-4a3348cfe04-linux-glibc219-x86_64/2.80/scripts/modules/bpy/ops.py", line 192, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: You must save your file first!


----------------------------------------------------------------------
Ran 4 tests in 0.067s

FAILED (errors=1)

Fixed position formations

Please see my folk and pull request for relevant updates.

Agents can now request specific positions in formations (by index number of the vertex in the guide mesh) but to make this useful each agent needs to request a different position. I think an option would be to have the generation script assign a vertex index to each agent as an agent variable (a dictionary called agvars stored in each agent object for things like this. At the end of each frame the resulting variables in agvars are moved to access to be used) based on where the script places the agent. The attached file demonstrates how it might be used. The input string would look something like: Formation.A.fixedDist(State.userObject.vars["targetID"]). I don't really understand how the generation script is working so I can't finish formation for the moment.

FixedPositionFormations.zip

Random Rotation not working

Currently, there is a random rotation value. This does not seem to work for some reason and I have gone through multiple different revisions of code. You can see what I mean if you open the test scene and just press Run Sim. The random rotation and the actions should already be set up. @niewinny @TheDuckCow Could one of you take a look at this?

Mingle sim not working

I recreated the mingle scene from Inaite with CrowdMaster nodes. I have not changed any of the node code and I kept all the values exactly the same, but when I ran the sim, each object got three keyframes right at the beginning of the animation the stopped. I will attach a file when I have a chance.

Multiple node trees datablocks and multiple file saves, open and closes causes deletion of node tree datablocks without warning

Background: Most datablocks will be not be saved if there are no users linked (see here: https://docs.blender.org/manual/en/dev/data_system/data_blocks.html).

Crowdmaster node tree datablocks with a User Count of 0 are not written on save and purged on exiting a Blender session effectively deleting them forever like most other data blocks. Note there is a previous issue raised that unlinking a datablock does not reduce the user count for that session only and so may still be saved (#29).

Issue: If you create multiple Sim and/or Gen datablocks they will all save because of issue #29 even if unlinked. When you close and reload the file only the Sim or Gen datablock(s) displayed will not have a User count of 0. Any node trees you load into the node editor will also be updated and not have a 0 next to their name in the nodetree browser list. Any unloaded node trees will have a 0 next to their name in the node tree browser list from the datablock and will not be saved and are purged on exit ๐Ÿ’ฅ ๐Ÿ˜ฑ

Steps to recreate:
Step 1: Create two Sim node trees and two Gen node trees. In the node tree browser list they will not have 0 next to their name. Leave one of the node trees displayed (I have used Brain 2 in this example) and save file. Exit blender.

image

image

Step 2: Reopen blender file. In the node tree browser list the displayed node tree will not have 0 next to it's name. All the other Sim and Gen node trees will have 0 next to their name. Save file and exit Blender.

image

image

Step 3: Reopen file. Displayed node tree will remain - all other node trees will have been deleted

image

image

Step 4: Hope you have a backup!!! ๐Ÿ˜ฐ

evacuation modeling?

Hi, I am looking for a tool which would evacuate hundreds of agents from a multi-storey buildings. Is your tool capable of that?

Slack Channel

As more developers join on, it would be nice to have somewhere to chat and pass around ideas. What would you think of a slack channel for CrowdMaster?

Add to Group Node does not assign agents to created group

Current behavior: Add to Group node creates a Crowdmaster Group - but does not assign agents to the group (count is 0 after generation).

Expected behavior: Generated agents are assigned to Group.

Steps to reproduce:
Step 1 - create Gen node like the one in image. Press Generate Agents. Note the three positions indicated with a ห… have been tried and all resulted in no agents being assigned to a group.

Note: Have tried adding multiple objects and multiple templates in case a group had to have more than one object/template. Have also tried saving, exiting and reloading in case it is a refreshing issue. In both cases error still occurs.

image

Crowdmaster 1.2.1
Windows 10
Blender 2.78b

Saving Sim on frame other than frame one causes agents to start future sims from saved frame position

Current behavior: After generating a sim if you move the current frame to any frame other than frame 1 and save the file when you generate the sim again it returns the current frame 1 but the agents start from where they were on saved frame. This necessitates a "regen" of the agents to get them back to their starting position, which if generated randomly cannot be identical to what you had before...

Note 1: I am assuming this is not an undocumented "feature" allowing you to set the start point of your sim.

Note 2: Cannot test if this also occurs with frozen agent groups due to issue #31

Expected behavior: Agents always start from frame 1 in their original position.

Steps to reproduce

Step 1: generate agents
image

Step 2: run sim to at least frame 100. Does not seem to matter if you interrupt the sim part way through or let it run all the way to the end.

Step 3: Move to frame 100 and save file
image

Step 4: Regenerate Simulation - agents start in Frame 100 position.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.