Hi Marcel,

Thanks again for your insight.

I know about the functor to run raycasts on my terrain, and I was planning 
to use that for my traditional terrain mesh. I can't call into Unreal's 
terrain data 
with that function since there is no thread safe method of doing so that I 
know of, however I can copy that mesh into the Chrono side so it can query 
it whenever it needs.

My concern lies more with the non terrain type meshes that are still 
drivable, but seperate meshes. I have long spline type pathways, rocks, 
rubble and other debris that can also be driven upon.

These separate meshes have simplified primitive and convex colliders.

I have begun the process of extracting all collision shapes from unreal and 
making static versions of them on the Chrono Bullet side, but not sure how 
nicely Chrono's tire models will interact when driving over those non 
terrain objects, or 
perhaps it ignores them entirely. I have to make a distinction between 
drivable mesh and a terrain type mesh. But I will for sure have to do some 
work in that height/normal query to determine what its driving over, and 
may need to trace against 
my static meshes also, which could start getting expensive without 
optimizations. 

Guess we will see what happens!

Will report back

On Thursday, August 10, 2023 at 1:40:55 AM UTC-7 [email protected] 
wrote:

> Hello JC,
>
> On 07-Aug-23 17:47, 'JC Denton' via ProjectChrono wrote:
> > I have my simulation running in unreal, where I have a terrain mesh 
> > that I can export as a mesh or heightmap. But I also have numerous 
> > static meshes that the vehicle can  drive on also such as extended 
> > dirt pathways, large flat rocks etc.
> Understood.
> > I can't call from Chrono-> into Unreal to ray cast these objects in 
> > this case and let Unreal do the height queries, since there isn't a 
> > synchronous method of doing so.
> You are aware that there is an option to provide a way to provide a 
> "functor" object for doing such raycasts in your custom terrain to 
> calculate the height, normal and friction at any point? See 
>
> https://api.projectchrono.org/development/classchrono_1_1vehicle_1_1_ch_terrain.html#a8e3e66a8f15858149786fe234dda23bd
>  
> for the methods to register such functors. If you have terrain that 
> needs to be used differently (I'm not that familiar with the terrain 
> code in Unreal) then this is a hook you might be able to leverage. Or 
> did you try this and is something else blocking you from making this work?
> > How best to add these to the simulation? Should I treat them as static 
> > bullet colliders and add them that way, or should I be converting each 
> > of these pathways into a terrain patch of their own? Is there a 
> > realistic limit on how many terrain patches I can add?
> > The overall poly count of all my meshes is quite high so I would like 
> > to anticipate any performance issues ahead of time.
>
> In general I would say that if you just provide a huge mesh (or multiple 
> smaller ones) the speed of the default implementation is likely to 
> become an issue (it was in my case, which is why I ended up using the 
> functors I mentioned above).
>
> Hope this helps (a bit).
>
> Greetings, Marcel
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/7a4a6201-fb38-4330-a206-38e9d79bf8fbn%40googlegroups.com.

Reply via email to