I am trying to setup a crowd sim where each agent can fire a weapon depending on their state, and when they fire it create a particle which would travel and ideally hit either a wall and die or another agent a trigger them into a ragdoll. I am fairly new to crowds but I got the particles triggering the ragdoll down, I am just trying to find the best approach for some of the other requirements.
#1. Controlling when each agent would fire their weapon.
I was thinking of parenting a grid at the muzzle of each gun and add that as a layer to the agents. I am doing that for the gun, but the grid would track the transforms for where the the weapon projectile would start. I would also add some type of parameter on those grid for the rate of fire, then limit that animation to specific states so the weapons are not firing all of the time.
#2. Emitting a particle for each weapon fire
The muzzle grids from #1 would then be unpacked and used as a point emitter within the same dop network as the agents. The problem with this is that I am having trouble singling out the muzzle grid I added without unpacking the agent every frame, which is not desired.
If anyone has any better direction on this please let me know. Again I am pretty new to crowds and would love to know a better way to do this.
Found 83 posts.
Search results Show results as topic list.
Technical Discussion » Crowd firing weapon mutual relation
- Tyler Britton2
- 83 posts
- Offline
Technical Discussion » Crowd randomly switch to different clips within state
- Tyler Britton2
- 83 posts
- Offline
I have a crowd sim where I am transitioning between different states which have different clips.
STATE_ADVANCE (clip_run)
STATE_ATTACK (clip_firing, clip_run, clip_prone)
STATE_RETREAT (clip_runbackwards, clip_die)
I have it setup where I can easily switch between different STATES using the crowd transition sop, that works well.
However I was wondering if once an agent transitions into STATE_ATTACK, that they randomly then transition between the three clips that I have for that state (clip_firing, clip_run, clip_prone). The Idea is that I have a bunch of troops advancing, once they get within a certain region they start attacking, however I don't want them just stuck on their initial ATTACK animation clip, I want them to randomly switch between them. I could setup each clip as a state, but I was trying to not have to do that since it will start to complicate my setup with once I start adding more ATTACK clips.
STATE_ADVANCE (clip_run)
STATE_ATTACK (clip_firing, clip_run, clip_prone)
STATE_RETREAT (clip_runbackwards, clip_die)
I have it setup where I can easily switch between different STATES using the crowd transition sop, that works well.
However I was wondering if once an agent transitions into STATE_ATTACK, that they randomly then transition between the three clips that I have for that state (clip_firing, clip_run, clip_prone). The Idea is that I have a bunch of troops advancing, once they get within a certain region they start attacking, however I don't want them just stuck on their initial ATTACK animation clip, I want them to randomly switch between them. I could setup each clip as a state, but I was trying to not have to do that since it will start to complicate my setup with once I start adding more ATTACK clips.
Technical Discussion » CHOPS frame offset
- Tyler Britton2
- 83 posts
- Offline
jpparkeramnh
or you can use a CHOP expression in the Shift node to look up the first sampled frame index.
Thanks for your help, this is what I would ideally do. How could I get the first sampled frame index, do I need the lookup CHOP for that?
Technical Discussion » CHOPS frame offset
- Tyler Britton2
- 83 posts
- Offline
I am importing a camera .chan file into chops and then exporting the transforms to a camera node, and everything is working great.
However,by default the animation is starting at frame 1, and I am manually offsetting it to start at the frame I exported it at (frame 952) using a Shift node. Is there a way that I can do this more proceedurally? I am importing the frame attribute into the chopnet, so ideally I would use that for the offset instead of manually setting it. Maybe getting the first “frame” attribute and setting that as my offset start? My chops skills are very poor so I would love some advice.
I can't upload my scene or a picture but I can answer any questions. Thanks.
However,by default the animation is starting at frame 1, and I am manually offsetting it to start at the frame I exported it at (frame 952) using a Shift node. Is there a way that I can do this more proceedurally? I am importing the frame attribute into the chopnet, so ideally I would use that for the offset instead of manually setting it. Maybe getting the first “frame” attribute and setting that as my offset start? My chops skills are very poor so I would love some advice.
I can't upload my scene or a picture but I can answer any questions. Thanks.
Technical Discussion » Aliasing in Mantra deep rendering
- Tyler Britton2
- 83 posts
- Offline
Tyler Britton2I haven't actually, as I had read they're turned off automatically for DCM's. Should it help? I'll give it a try.
Have you tried turning off the Stochastic Samples?
Try this.
Technical Discussion » Aliasing in Mantra deep rendering
- Tyler Britton2
- 83 posts
- Offline
Can you post an image so we can see what you are referring to?
Have you tried turning off the Stochastic Samples?
Have you tried turning off the Stochastic Samples?
Houdini for Realtime » Game Tools - MapBox issue
- Tyler Britton2
- 83 posts
- Offline
I am having the same problem on Linux. It was working, and now I get the white box. Were you ever able to fix this?
Technical Discussion » "Open" dialogue box on startup?
- Tyler Britton2
- 83 posts
- Offline
I was wondering if there was a way to have the “Open” dialogue box open on the startup? It would ideally run as a Python expression in the 123.py script, I just don't know the specific command.
I was also wondering I could change the default “Look In” address to something other than the original default of “$HIP/”. Ideally I would want the default to be something that I could set, such as “$JOB/Scenes”.
Thanks.
I was also wondering I could change the default “Look In” address to something other than the original default of “$HIP/”. Ideally I would want the default to be something that I could set, such as “$JOB/Scenes”.
Thanks.
Houdini for Realtime » GameDev Tools Custom Installation Shelf
- Tyler Britton2
- 83 posts
- Offline
I am running into this problem as well. I have Arnold, and when I installed GameDev tools all my shaders went away. It happens with new scenes as well as existing scenes. I checked my $PATH and $HOUDINI_PATH vars and they seem to be loading all the proper stuff from a glance.
Edited by Tyler Britton2 - 2019年9月12日 16:28:43
Technical Discussion » Dynamic Grid Spacing for HeighField?
- Tyler Britton2
- 83 posts
- Offline
I am importing layout geometry and I am converting it to a HeightField with a HeightField and HeightField Project sop. This is working great, however I was wondering if there was a way I could find the correct Grid Spacing values to roughly match the poly amount of the layout geometry with my new heightfield after I convert it to geo with a convertheightfield sop. I can do this manually but adjusting the grid spacing, but I want something a bit more procedural.
Right now I am find how many polygons are in the layout geometry, as well as the max x and z size, and forming an equation to try to detect this automatically, and checking my math by converting the new heightfield to polygons.
My equation I have so far is something like this
(ch(“sizex”)*(GRID SPACING VALUE)^2 * ch(“sizey”)*(GRID SPACING VALUE)^2) = (TOTAL POLYGONS)
This is of course incorrect, but I was wondering if there is a way at all to calculate this out. I can't attach a hip right now, but I can later if this doesn't make sense at all.
Right now I am find how many polygons are in the layout geometry, as well as the max x and z size, and forming an equation to try to detect this automatically, and checking my math by converting the new heightfield to polygons.
My equation I have so far is something like this
(ch(“sizex”)*(GRID SPACING VALUE)^2 * ch(“sizey”)*(GRID SPACING VALUE)^2) = (TOTAL POLYGONS)
This is of course incorrect, but I was wondering if there is a way at all to calculate this out. I can't attach a hip right now, but I can later if this doesn't make sense at all.
Technical Discussion » Set attribute from @Frame, and hold that value
- Tyler Britton2
- 83 posts
- Offline
This can easily be done. If you have all your points black, then color your points when you want them to start their animation, you can then throw down a sop solver, inside the solver, add a wrangle node and this expression below.
//Inside sop solver with Previous Frame being Input
vector Cd1 = point(1, “Cd”, @ptnum);
vector Cd2 = point(0, “Cd”, @ptnum);
@Cd = max(Cd1, Cd2);
if (Cd1 == 0 && Cd2 == 1)
i@hitframe = int(@Frame);
if (point(1, “hitframe”, @ptnum) != 0)
@hitframe = point(1, “hitframe”, @ptnum);
Just be sure to put the Previous Frame into input (second input on the wrangle). This script will record the frame that the point turns from black, to white. If you time shift to the end of the sop solver sim, and then transfer the hitframe attribute back into your original points, then that should get you started.
//Inside sop solver with Previous Frame being Input
vector Cd1 = point(1, “Cd”, @ptnum);
vector Cd2 = point(0, “Cd”, @ptnum);
@Cd = max(Cd1, Cd2);
if (Cd1 == 0 && Cd2 == 1)
i@hitframe = int(@Frame);
if (point(1, “hitframe”, @ptnum) != 0)
@hitframe = point(1, “hitframe”, @ptnum);
Just be sure to put the Previous Frame into input (second input on the wrangle). This script will record the frame that the point turns from black, to white. If you time shift to the end of the sop solver sim, and then transfer the hitframe attribute back into your original points, then that should get you started.
Technical Discussion » NodeShapes sourced from HSITE
- Tyler Britton2
- 83 posts
- Offline
Technical Discussion » NodeShapes sourced from HSITE
- Tyler Britton2
- 83 posts
- Offline
Yes that is where I put the json file.
I also ran this
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
editor.reloadNodeShapes()
And I could not find it in the nodes listed.
I also ran this
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
editor.reloadNodeShapes()
And I could not find it in the nodes listed.
Technical Discussion » NodeShapes sourced from HSITE
- Tyler Britton2
- 83 posts
- Offline
I am trying to source json files for my node shapes in my $HSITE instead of my $HFS/houdini/config/NodeShapes/ directory. I created a NodeShape folder inside of $HSITE/houdini17.5/NodeShapes/, and dropped my json in there, but it doesn't seem to be picking it up. Is there a way to force search this directory, or does it have to be inside of the $HFS folder?
Technical Discussion » Add to Key-Value parameter through Python
- Tyler Britton2
- 83 posts
- Offline
Awesome, thanks man. Would you know how to remove am individual instanced based on the index? Or just remove all of them?
Edited by Tyler Britton2 - 2019年8月14日 20:09:21
Technical Discussion » Add to Key-Value parameter through Python
- Tyler Britton2
- 83 posts
- Offline
I have a Key-Value parameter on an OTL, and I was wondering how I could add, set, and remove the entries into the parameter through Python.
Houdini Indie and Apprentice » Arnold .ASS export?
- Tyler Britton2
- 83 posts
- Offline
PDG/TOPs » Running PDG Work Item with Python script
- Tyler Britton2
- 83 posts
- Offline
Thanks for the fix. I can't really test it out with my exact situation because we are in full production and are hesitant to switch to a non-production build, but I will check it out in the future. Should executeGraph(self, False, True, True) crash or did that require a fix as well?
For testing, the ID is set to an index I know will pickup a work item, but in the overall case it is corresponding to a variation or cluster that the user is caching geometry for. Basically we were using PDG to cache out all of our geometry, so we had a lot of setups that used it. However we now got Houdini on our farm so I wanted a way to run a work item for each variation/cluster, and then launch that on the farm.
For testing, the ID is set to an index I know will pickup a work item, but in the overall case it is corresponding to a variation or cluster that the user is caching geometry for. Basically we were using PDG to cache out all of our geometry, so we had a lot of setups that used it. However we now got Houdini on our farm so I wanted a way to run a work item for each variation/cluster, and then launch that on the farm.
PDG/TOPs » Running PDG Work Item with Python script
- Tyler Britton2
- 83 posts
- Offline
Yeah I am still getting crashes after having tried a lot of combinations. I cannot use setSelectedWorkItem after using executeGraph to cook a dynamic PDG node. It does work if I cook the dynamic node using Right Click-Generate node, and then use the setSelectedWorkItem to select the work item.
PDG/TOPs » Running PDG Work Item with Python script
- Tyler Britton2
- 83 posts
- Offline
Nevermind, it looks like executeGraph does not run the whole network, only up until the specified node.
However I am still getting crashes, even when I have already exectuted the graph. I am doing something like this.
“
otlTopPath = ”/obj/Box/topnet1/CacheIt1“
otlTopNode = hou.node(otlTopPath)
otlTopNode.executeGraph(0, 1, 1)
otlTopNode.setSelectedWorkItem(1)
”
I am not getting an error when I manually generate the top node (Right Click - Generate Node). I am only getting the crashes after doing the executeGraph(0, 1, 1).
I found setting executeGraph to executeGraph(0, 1, 0) resulted in no crashes, however that so only if I have Static jobs. When I have Dynamic ones, I get the crashes again.
However I am still getting crashes, even when I have already exectuted the graph. I am doing something like this.
“
otlTopPath = ”/obj/Box/topnet1/CacheIt1“
otlTopNode = hou.node(otlTopPath)
otlTopNode.executeGraph(0, 1, 1)
otlTopNode.setSelectedWorkItem(1)
”
I am not getting an error when I manually generate the top node (Right Click - Generate Node). I am only getting the crashes after doing the executeGraph(0, 1, 1).
I found setting executeGraph to executeGraph(0, 1, 0) resulted in no crashes, however that so only if I have Static jobs. When I have Dynamic ones, I get the crashes again.
Edited by Tyler Britton2 - 2019年5月29日 15:42:36
-
- Quick Links