Nice one Robske![]()
Nice one Robske![]()
" Spy sappin mah sentry! "
@Robske:
Recast is based on the idea to voxelize the complete world before anything else is done. That makes it possible to generate navmeshes out of nearly all data representations you have. To answer your question: Yes it is possible to put a simple triangle soup into it.
Also the output mesh is simplified.
We pass to Recast the triangles from the ADTs/WMOs/M2s/etc. It has the ability to give us back n-sided polygons defining the mesh where n is 3, 4, 5 or 6. So yes, it is the case.
At the moment I am trying to figure out the best way to connect the various ADT meshes, because the math involved in generating the mesh polys which are near the edges require some extra geometry if you want the meshed regions to actually touch the border. This lives us with something like this:
As small as that gap is, it is proving to be a real pain to bridge in a nice and clean manner =)
Hit me if I'm wrong, but it looks to me like you've rendered a mesh from each ADT's trianglelist seperatly, that way recast has no clue of adjacent triangles, hence the border. Wouldn't you be able to solve this issue if you merged the lists of the required ADT's prior to generating a mesh? Or could that be a gigantic performance hit? (Gl loading Winterspring -> Silithus)
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
[16:15:41] Cypher: caus the CPU is a dick
[16:16:07] kynox: CPU is mad
[16:16:15] Cypher: CPU is all like
[16:16:16] Cypher: whatever, i do what i want
Well; since the idea is to dump each ADT into it's own mesh (thus; cutting out any form of on the fly processing, since Recast takes roughly 30s per ADT to fully mesh [Org is pushing 1m15s easily)). So... we're meshing 1 ADT at a time, regardless of what else is loaded. I'm working on the math to merge/split polys that hang on the edge, so we can create this as a tiled mesh (instead of our current static mesh). Clipping overhanging tris is the easy part. Making them actually 'flush' with the edge is a whole 'nother matter. (Need to take into consideration keeping the triangles the way they were as far as normalized tris are concerned)
@Robske:
....the chopper needs to be changed to a train, imo. A fail train. Choo choo........
Argh, I really need to get off my arse and do my own version of the W2S code.
Last I looked the SetTransform()'s being called weren't too much of a help - looks like I should check out some shaders...
We are generating them separately, but that by itself does not mean there has to be a gap. The algorithms used by Recast require some geometry beyond the outermost mesh polygons and that is why there is a border. There are many different solutions to this, but we have yet to find (and prove feasible) one that is sufficiently elegant.
looks awesum robske![]()
Mmmmm, not 100% accurate, but pretty much close enough for what I want to do with it:
![]()
Sample of the 3D rendering library i'm going to pushout soon.
The box itself is rendered using DrawIndexedPrimitive translated around the target's coordinates. The text is just projected from game coordinates into screen coordinates.
Kynox that looks awesome, though something that would be awesome or added is an arrow pointing at the same way the npc or objects front is facing. or one of the sides red.
" Spy sappin mah sentry! "
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku