A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by Vagabond_, Aug 27, 2014.
Hey there! Interesting tool.
Eventually I'm going to need to offload my continuous-space pathfinding algorithm to alternate threads. The algorithm throws 2D circlecasts against 2D obstacles of different shapes to trace a path around them (inspired by this). AFAIK, this is a pretty standard method that modern RTS-style games (like DOTA) use. At some point I was planning on writing my own custom circle/raycasting solution so that I could remove the logic from the main thread, but am willing to buy someone else's asset to get it all done more quickly. I was looking through your docs and didn't see support for 2D, but I suspect it would be a relatively simple matter to have a 2D version of your asset, and maybe you might expand the potential customer base.
Hi, thanks you for suggestion. Honestly i do not think there will be any support for 2D objects coming at all.
Only additional options and features will be added to the current state.
Hi, just wanted to show a new feature i am working on. I need to put some more effort on it before release though...
Custom LODs - this should replace the old LOD mesh feature which gives you only one available LOD mesh !
This should be available in v1.70 and it is not available in v 1.61 !
Hey guys some further work has been done on custom LODs. A few more thing need to be implemented and DRCS will be updated to v1.70 .
Hi guys, DRCS is on sale now with 30% discount ...
ah not anymore on sale ^^
do you know if it works together with opsives third person controller?
Hi Arganth, yes unfortunately DRCS is not anymore on sale !
In general if the Physics Raycast and Spherecast are working -> DRCS should be working ok as well. It just needs initial position and direction to raycast and spherecast !
DRCS is alternative to Physics Ray/Spherecasting... however i can not test it as i do not own the opsive's controller.
DRCS is back on sale for those who are interested...
just a quick update on the next version on DRCS...
The main big new feature is the custom LOD support...
The Mesh Grouping Tool will be able to setup triangle tags per LOD now, or you will be able to disable tags!
It is almost done and i hopefully will be able to update it this month !
The LOD part might be released as beta until there is enough feedback in order to make it final... It has been thought for a long time and the current variant seems to be easy and intuitive to setup. However, will need user feedback on that in order to be sure it is useful and done well...!
Thank You !
DRCS v1.73b was just uploaded to the store for review.
The update will be considered as "Beta" for some time based on user feedback.It is tested though and it works, however it will be great if i can receive some feedback on the feature in order to finalize its state !
For those who are interested and do not own a copy, the price will be set from 30$ to 20$ for a limited time - while the package is in "Beta" stage... this may be for a few days up to a month !
* The major new feature is the custom LODs which will allow you to use a simpler meshes in distance... Up to four LOD levels will be supported for the current version but this limit might be increased.
* LOD meshes can be swapped at run time which means the cheaper meshes will be rendered which is kind of rendering optimization and is always good. You do not have to use Unity's LOD system for these objects in case you do!
Known issues for this release regarding LODs:
* while in editor some times you get error message that culling groups should be disposed manually. I have to catch when this is happening as the culling groups are disposed in general ! Builds should be OK !
* swap a skinned meshes glitches some times (rigid meshes are just fine)
Some new features that might come at some point are:
* using a BVH tree for accelerating initial intersection of objects ( This might help in case you have many objects to faster test bounds for intersection )
* using a Scriptable Object container for LODs - the idea is all the objects which are actually the same prefab to use a single data container which means that some memory will be saved instead of making one copy per object
the new update is now available... The price is be set from 30% to 20$ while in beta !
Any feedback will be appreciated !
Thank You !
@Vagabond_ , I'm interested in this asset and am wondering if it can help me in the following scenario?
I'm using two character models (rigged mecanim) and a bunch a colliders to detect physical contact: i.e. A punch to head: basically a source and target.
Hi, i think in your case there must be some specialized system which is especially designed for the purpose... With DRCS you can still use the sphere cast method eventually to create some detection system, but i think you will need a specialized approach tor your needs !
Best Regards !
Just letting you know that we use DRCS in our game, and we noticed that you have a rather nasty issue with reallocating ObjectMemory objects every frame when it's not necessary. This was causing a huge GC spike for us every few seconds.
The fix is to add a Clear method to the ObjectMemory class (in DRCU.cs):
public void Clear()
And in DRCMesh.cs, change line 838 from:
oM = new ObjectMemory();
if (oM == null)
oM = new ObjectMemory();
Hi, sure, this will be fixed ! Thanks for the feedback !
Hi again, we've just noticed with our game that after a period of playing (at least an hour), DRCS stops working altogether. I'm not sure what the issue is exactly, but I wanted you to know. It's happened a few times now.
just to let you know about a couple new features which should come in v1.80 ( which is in development ).
1. You will be able to use a shared mesh object asset between all the instances of a single prefab which should save some memory
2. Another new thing is that you will be able to set up separate meshes for visualizing in game and for intersection.
So now a new asset should be created internally in case you do not use a shared asset and LOD will be automatically setup whenever you add a second set of meshes to the asset.
Does DRCS work with an orthographic camera?
Any chance of adding spherecast all if its not too troublesome?
Hi, the DRCS.SphereCast(...) method always returns ( by default ) a list with all intersected objects!
You may want just to give the end point to be far from the start point. Note that this method is more expensive than the raycast and it can be slow if you intersect many objects in one frame !
Hi, i haven't tested this actually - have to check this and will write back when do so.
But i guess it should be working if you generate correct rays using Camera.ScreenPointToRay method !
Hi, guys just to let you know that i am doing an update and will try to upload it to the store this week as beta in order to get some feedback !
* The system is now wrapped into a namespace "DynamicRaycast"
* Mesh data is now stored into a scriptable object which is shared between clones ( this will save some memory )
* LODs are now taking two meshes - one used for visualizing in viewport and one used for intersection
P.S. just a notification in case someone is planning to use the system in a project !
i am almost ready to update to the v2.0. At first it will be set as beta (b1) and today i am experimenting with C# Jobs.
As i see there is a good chance to get it ready for the update. May be only the raycast methods at first will be implemented in order to get some feedback !
You can see the test code and C# Jobs in action in the video !
Thank You !
P.S. I am still experimenting but the Ray/Triangle intersection test is around 5 times faster currently !
I was just wondering, if you are doing any update toward ECS + Job System. But what you stating you are doing indeed. That would be great, as efficient ray cast system is more than desired with current ECS.
This asset package sounds great & will probably save me a LOT of work
Can I just confirm a couple of things:
1) is the implementation entirely C# (i.e. no special shaders)?
2) have you tried it with the IL2CPP scripting backend?
3) have you ever tried it on console(s) (PS4 / Xbox One / switch)
4) assuming the answer to 2) or 3) is "no" is the supplied source code 100% complete in case I need to change it?
1. Al the code is pure C# - no shaders are used in the system itself, except a vertex color shader for visualizing meshes when editing mesh tags !
2. I actually have implemented all the recommendations i found on the IL2CPP blog, and Il2CPP showed like x3-4 speed boost even on android devices. I would actually recommend IL2CPP as it is faster, at least in my tests !
3. I haven't tried on any console cause i do not develop anything for them and do not have access to any dev kit, but i don't think there is something that would prevent from compiling for consoles...
4. The code is 100% provided and you could alter it in any way you need !
For more information, feel free to ask !
Thanks so much for getting back to me.
Does DRCS support physics materials?
Hi, hmm i don't think i understand your question actually !
Physics materials are supposed to describe friction characteristics between two rigidbodies with colliders.
How you would like them to be integrated with raycasting (i.e. how would you use physics materials with such system) !?
I might consider implement this !
Thanks for your prompt response @Vagabond_
I'd like to utilize the features DRCS currently offers but combined with the capability to assign layers of physical materials for the increased chance of projectile ricochets based on type of materials, visual impact effect based on type of materials, and impact sound effects based on type of materials.
Greatly appreciate your consideration.
You welcome !
I think i understand what you want to have as an option, but the actual behave of a projectile after it detects a mesh would be a job for the physics system which will require a collider, and all this is done internally in the Physics system. In other words, there is no way for the DRCS to tell a projectile how and where to go after intersection, simply because the meshes do not have any type of colliders !
If i understood your request correctly, there is no way for you to deal with this without the mesh have a collider with physics material, or you will have to calculate your own methods for applying correct physics forces to the projectile depending on material properties which requires heavy math and physics knowledge !
I bought your asset, hoping that I could achieve the effect shown on the picture somehow (bullets that impact in the body). I might have misunderstood what this is about, but cant find anything helpful in the demoscenes. I want a character that I can shoot at, with impacts of the bullets at the right spots and a loss of lifeenergy depending on the spot where it got hit.
Is this somehow possible - otherwise and if possible I would request a refund. :-(
This is exactly what it is about. To be able to intersect meshes. Just go through the docs, everything is explained there.
Hmm, I looked into that and - as a non coder - can't really find the part to make it possible. How about a demoscene with that functionality as shown in the picture?
The picture is always with marketing purpose, but of course is all about detecting the mesh so it is correct !
The DRCS system is a generic intersection system and i can not make all the possible demos !
No matter what system you get you always have to write some code - for example what happen if you detect this or that part of the mesh etc etc ...
You use the mesh grouping tool to define per triangle tag ( if you need ) and then you can take different damage values based on the tag. But you have to define this for yourself of course cause i couldn't know your needs !
You also get the closest bone, so you can do different things using that information.
Im interested in this Asset, i just have some questions before i buy it...
We working on a Shooter which needs 1st detect the Mesh ( Check )
The Layer System is really interesting and would also help a lot with hit detection, other Particles and more for the NPC, the question is how compatible is it with UMA?
Because our character is generated with UMA which mean we have to assign the Layers somehow to the current Character, also when the Player decide to ware a other shirt we need to redo the assignment.
Hi, if i can remember correctly it should work. Sometime ago someone asked me if it is working and we came to the point that there is a way. I can't remember how to set up because i am not sure how UMA is working. I may give it a try, but as soon as you have skinned mesh component it should work.
I think i found a way.
Getting the Mesh would be the easy part.
The problem is the Hit Detection, because to layer the mesh for head, arms and all the other body parts would be a huge problem when the mesh changes and become a completely new shape after wearing a new shirt for example.
So my idea is to get the closest Bone of the character from the Ray Impact and define from this constant position the damage value, the bone structure is the only constant thing in this case.
You actually add a separate component to each skinned mesh. I guess any shirt is a separate mesh, still skinned to the same skeleton but as a separate mesh ! You might consider exclude cloth from intersection because they are not always tightly fit to the body may be !?
For procedural meshes, there is no any specific setup workflow.
In UMA all become one Skinned Mesh for performance, you can separate it but i think i found a other solution which maybe is only good in my case.
We only have like 20 to 30 Character in the same scene at once because of gameplay reasons which mean we have space for more Meshes and don't need to look so much on performance like maybe other Games, also we don't aim for high poly AAA characters we have a low poly flat shaded concept.
We can create a second character mesh inside the current character only a little smaller to not having problems with the overlapping and only generating him without any cloths and hairs to have just the body and this shape for the hit detection.
Translating the bones just to the same positions like the real character without any new components needed.
However im going to buy this asset, support is there and the system looks really good
Well, you actually can use different meshes for visualizing and intersection. There is a LOD sub system where you can lod separate meshes for intersection. If you can duplicate the body only and load it into the slot you can then have the body only for intersection and other whole mesh for visualization !
Sounds good i will give it a try soon, i already have buy it and need to finish something other first but as soon this is done i can start working on the Hit Detection.
sorry for the dumb question but does this work with grass ? or objects that don't have collider ? Thanks !
Hi, it works with non-skinned meshes as well, but using it with grass or objects that are copied many many many times is not something i would be even think about doing. This system suppose to be used with the most important objects in your project.
Im currently working on the Hit system and im getting a error.
What i did is creating the Skinned Mesh Component at runtime to work with my UMA mesh
var renderer = this.GetComponentInChildren<SkinnedMeshRenderer>();
if ( renderer != null && !init )
init = true;
renderer.updateWhenOffscreen = true;
if ( RaycarstMeshObject == null )
RaycarstMeshObject = this.gameObject.AddComponent<DRCMesh>();
RaycarstMeshObject.usesBlendShapes = true;
RaycarstMeshObject.Initialize( renderer, this.transform );
No errors but when i fire a Raycarst im getting on some areas of the Mesh where the ray should hit this error above
Code to shoot out the Raycarst
if ( DynamicRaycast.DRCS.RayCast(
new DynamicRaycast.DRCRay( arcList[ i - 1 ], ( arcList[ i ] - arcList[ i - 1 ] ).normalized ),
Vector3.Distance( arcList[ i - 1 ], arcList[ i ] ),
false ) )
info.HaveMeshHit = true;
How ever the error does not come from arcList[ i - 1 ], this would match the exception but it's not the case i made a check first.
Maybe im missing something, it was the first try on this system
Hi, please contact me by the support email provided !
I tested the part of your code by replacing the arcList array with my logic and it works on my side.
So send an email and we will figure it out !
Hey, thank you for the offer, i have solved the problem already.
UMA was about to change the Race after the skinned mesh was initialized in the Dynamic Raycast System which destroyed the Skinned Mesh Renderer so he initialized the wrong Mesh.
I was trying then to Initialize the Component with the correct Mesh again but this was not the correct solution, which gives me this error.
I solved it by Initialize the DRCMesh one time after the correct Race was given from UMA.
Hi. I was wondering if this would be a feasible use of your product:
I have a hair simulator using cloth physics. It's relatively lightweight, as the moving "hair chunks" are handled by 64 meshes of 54 vertices each (this may have to double). I need to detect a hit on any of these cloth/skinnedmeshrenderer objects and get the UV of the material's texture map. I saw your comment on grass, saying it's only for the most important scene objects - which makes sense - but would this scenario be also overloading it? The big concern is that it's for mobile VR, so I don't have much performance headroom.
well as at first. it looks ok, your scenario shouldn't overload the system in general.
However, as you are targeting mobile platforms i couldn't say exactly how it would perform, as mobile devices have wide range of CPUs, plus i am not really into VR.
I know DRCS is working in VR because i have been told it does !
IL2CPP helps with the performance in my tests even on mobile - a little tip !
I would say it is ok, but always depends on whole scenario, so it is up to you to decide if you give it a try !
Thank You !