Is there any way to put DX11IndexedGeometry back to disk?

Currently, after mapping the vertices, i write them using Writer (EX9.Geometry XFile). XFile (EX9.Geometry Load) spreads my Meshes perfectly. But that was in the DX9 world.
Now, i can split those .x files using Mesh (EX9.Geometry Split) only to join them using Mesh (DX11.Geometry Join Subsets).
But that way doesn’t spread.
Since there’s the GeometryFile (DX11.Geometry Assimp), is writing DX11IndexedGeometry to disk really impossible right now?
Thank you. Hope flat eric wasn’t sick after the flight in your suitcase.

next vveekend vvorkshop will be about geometry in dx11 and this will be also covered.

in dx11 the geometry is only a dumb stream of bytes with some metadata attached to them and in theory there are no mandatory semantics like in DX9. even there can be geometry which doesn’t contain any data (NullGeometry) or a geometry which contains a single number per-vertex with a semantic called KITTYCAT. dx11 doesn’t even use indexbuffer anymore internally on the gpu.

so to write geometry in dx11 you have to ReadBack the rawbuffer of a geometry via a geomfx or a streamout renderer. Set ReadBack to uint and connect it to asraw and set that to uint32 then write it to disc, i recommend doing that in a patch with exposed evaluate pin because it will take a lot of cpu time. you can also write a metadata file which tells you the inputlayout of the geometry (InputLayout node -> InputElement split node) (it will be necessary during reading the geometry from disc).

reading back is similar read the file you saved before and use AsValue (Raw) set to float32 connect that to GeometryBuffer node. define your input layout with InputElement advanced from the metadata you saved and connect that to GeometryBuffer too. make sure Apply pin is not true every frame.

cheers!

also instead of spreading you can use a subset pipeline so you can attach a subset ID to vertices (which subset this vertex is in) and in your shader you can access structuredbuffers or texturearrays with those id’s. not as intuitive as spreading but you only have this now.

Phew! That’s a biggie, no question. At the same time i was expecting something like this for DX11. New degrees of freedom come with more complexity complexitywith handling it. But i was absolutely not aware that it can be accomplished with existing means. So a huge thank you, @microdee! I’m gonna exercise this next week.
Sounds like this thread will live for a while, however :)

if i’m not mistaken kyle has a obj writer in his instance noodles contribution. (not on a pc right now)

yeah obj can be a good starting point indeed. supported by assimp too so you can spare reading back. However if you need subsets, you are out of luck there