Trying to replicate in DX11 the old “geometry morphing using a shader” patch (as in the tutorial here: tutorial geometry morphing gpu1)..) But I haven’t been able to replicate the function of the dx9 nodes Vertexbuffer (split) and (join). In particular, being able to get the data from the 2nd mesh onto the fake 3d texture coordinates of the first. Am I missing some new node that does the same job or some other dx11ish way of doing this?
Hey, I’ve not done what you want in particular, but if you check the InputElement & GeometryBuffer nodes I think they should do what you need.
bumping this thread.
is there any easy way to do geometry morphing in DX11 at this moment?
yes, using geomfx, the base geometry will be the geometry in pin and the target geometry will be a streamout (raw buffer coming from a geomfx or the geometryfile structuredbuffer version) note that you still have to maintain the same vertex count for simple stuff. i have a geomfx for that on https://github.com/microdee/Emeshe/tree/master/nodes/geom11 called mix.gsfx
hello, i’m not getting this mix geometry shader to work. can anyone shed some light on it. i do understand its code roughly since its similar to the dx9 morph (lerp pos A to pos B) but it seems i’m feeding it with the wrong buffers or its something else…
Mix.zip (75.4 kB)
Maybe Microdee has an example patch. From taking a look at the shader code here is what I see (and please someone that knows what they are doing correct this if need be):
the mix gsfx
- is expecting a byte address buffer
- that there should be a pos, normal, texcoord, vcol structure to this buffer
Now, here is the confusing part: byte address buffer ≠ structured buffer. Even though in this case the actual functionality is pretty much the same. The assimp node you are using is giving a structured buffer which I think is a different data type as far as vvvv is concerned, hence why you can’t connect the pins to the geom 1 & 2.
2nd problem, even if you could, I think your layout from the FBX is gonna have a lot of extra slots (eg tangents etc), so the byte reading offsets in the shader will be all wrong. In the case of generative geometry it’s no problem you can just declare your layout to match what the shader expects. But the FBX will have all that done in the background on export from your 3D software.
So, I guess the solution for you, would be to have an extra gsfx before the mix, so you can tell it to convert your geometry to the layout mix.gsfx wants. You can then use the buffer outputs (which I believe are byte address buffers) on the morph inputs.
even if you had a shader that fade between structuredbuffers instead, it would still not work because your meshes have different vertex/index count (Vertices Count/Indices Count pin in that geometry loader node)
hey unc, i’m aware of this. the attached mesh is not the best example. i’m basically looking for a efficient way of morphing meshes with same vertexcount in dx11. similar to the oldschool method in dx9.
SDF and meshing = perfect morph
I also have a plug to get indices from mesh
U can get them native with dx9 mesh split. Still distance reorder pain in the ass.
antokhio, do you have a working SDF implementation?
I would like to use that mesh mixer, but I’m very confused when buffers get in the game.
I’m using a mesh as Input and the same mesh modified as second Input using the Buffer Output node, nothing happens…
Here my patch, is a bit dirty but is a test…
You will need the mix.gsfx shader from mre.mdmod.2 pack
microdee help us! :)
mixing_geometry.zip (1.1 MB)
bumping this thread.
is there a way to morph geometries in dx11 ?
the Mix.gsfx form latest Emeshe pack does not seem to do anything, or am i missing something?
concering: morphing between 2 SDF. i checked microdees mighty MUPS sdf patch and the voxeliser patch. dumb question: how do i get two custom meshes into two sdf?