CompuServe Thread

#Morphing

15 messages in this thread
#156456From: Craig Sharp [Mem TM]Mar 1, 1995 12:33 PM
I'm trying to morph from one mesh to another. The meshes are topos of land. The coordinates of each and every vertex are EXACTLY the same except for the Z value. What I get looks terrible. I'm using v3.x of 3DS. Anyone have any suggestions? Is it because I don't have closed volumes? TIA. C#
#156467From: Jonas Ruikis [ADESK]Mar 1, 1995 1:03 PM
Hi Craig, << ..exactly.. >> How were these topo meshes created? << What I get looks terrible. >> I'd like to know more about what it looks like, how much of a change in z-value there was, were there many morph targets? I ask all this because 3DS uses interpolation between morph targets and the more intermediate targets you have, the more control you'll have over the morph. jonas[adesk] .
#156613From: Craig Sharp [Mem TM]Mar 2, 1995 7:52 AM
Jonas (and Martin): These are 3dface surface meshes of topographic data that is created in AutoCAD. The only, and I repeat, the only difference between the two is the Z coordinate (I have my axes switched in 3DS). Even the ORDER of the creation of the 3dfaces is the same. The Z coordinates of one are 10x (10 times) those of the other. The x and y vertice coordinates are exactly the same to eight places. This is a typical approach to terrain modeling where you amplify the vertical axis to assist humans in visualizing the lay of the land. Both meshes were created in the same drawing, dxf'd out as a pair, and imported into 3DS at the same time. The model is of an entire county in Virginia and so the coordinates are large in range. Creating a copy of the orginal mesh and pulling the vertices by hand is out of the question. There are about 6200 vertices in the terrain model. If I can't do it, I can't do it.. I just wanted the vertical expansion to be animated, is all. I would place better morphing high on my wish list for v5 if this wasn't improved in v4. Thanks. C#
#156632From: Jonas Ruikis [ADESK]Mar 2, 1995 10:16 AM
Hi Craig, I'm trying to figure out what went wrong but without seeing a flic and the meshes I can only guess… << Creating a copy of the orginal mesh and pulling the vertices by hand is out of the question. >> How about creating a copy and scaling it in the z axis and run a test of the morph between them? I'm curious if the results are identical to your earlier results. jonas[adesk]
#156644From: Yost GroupMar 2, 1995 10:41 AM
Somewhere along the line, the vertex order of the two meshes became different. ("Somewhere along the line" meaning somewhere before they go into 3DS.) As Jonas suggests, if you simply want to morph between identical landscapes with different Z values, load a single landscape into 3DS, copy it, and then scale the selected vertices of the copy along Z, after first placing the global axis at the base of the landscape. Should morph perfectly.
#156648From: John K. JordanMar 2, 1995 11:04 AM
>>topo morphing… There are lots of ways to make something look "terrible!" <g> If the vertices don't match up (the faces get crossed up during the morph) as Martin suggested, you may be out of luck using your original pair of meshes. I've done morphs like you describe (using surfaces made from mathematical descriptions) to make animated 3D surface plots, and the results were beautiful each time. (I even had one changing materials during the morph to highlight a certain feature of the plot.) You should not have a problem with the meshes not being closed volumes. If it looks terrible due to something else, like face/smoothing problems, it may be due to faces that are too long and narrow. I had a lot of trouble with this on the last terrain model I did and had to manually Mod/Edge/Divide and Mod/Edge/Turn to lay the faces properly with the terrain. If it's some other definition of terrible… what? However… If you simply need to scale a given terrain mesh by 10x, you should be able to simply make a copy of the original, scale it by 10x in the editor, then morph between the copies. (You may need to compensate for the vertical movement which will probably result, but that should be no problem.) You could probably animate the scaling in the keyframer and forget the morph, depending on your overall project requirements. Will this work in your case, or does "terrible" imply something I have not yet grasped? JKJ
#156699From: Craig Sharp [Mem TM]Mar 2, 1995 3:43 PM
John (and everybody else who chimed in) Thanks. I >think< that the software that I'm using for the terrain modeling actually amplifies in the Z direction and the increase in Z value is proportional instead of uniform, but I'm not sure. If it's uniform (I will check) then I can use the Z scale as you all suggested. I agree with whomever that what probably happened is that the dxf file was written with the 3dfaces in different order between the two meshes (maybe in exact opposite order, for that matter.). Nonetheless, with something that is mathematically duplicated in this fashion, morphing should be enhanced to handle this straightforward translation… I mean, I'm not asking for 3DS to perform tesselation while balancing the number of vertices and faces, too… Geeeze! <grin>. There is nothing particularly radical about this surface. It shouldn't have been that big a deal. C#
#156745From: John K. JordanMar 2, 1995 8:55 PM
C#, Do you have programming skills? (Seems like I remember from long time ago that you do.) If Z is scaled by some function, it sounds like a candidate for the TSE. Alternatively, (and probably easier) you could write a simple program in C (or BASIC) to process the original DXF and create a new DXF where all the vertices were ordered identically but scaled in Z according to your function. When creating the mathematical surfaces I mentioned earlier, I researched the DXF format for a couple of hours and was able to write a program that created the surface mesh – it turned out to be pretty simple. (It's MATHDX.ZIP in the libs here.) I wrote a second program which processed a DXF and made all invisible lines visible (before AutoEdge). If you are interested, it would probably be a good place to start since it shows a simple way to process a DXF file with a C program. Let me know if you want it. JKJ
#156480From: MARTIN G FOSTERMar 1, 1995 1:23 PM
Craig, >> The meshes are topos of land. The coordinates of each and every vertex are EXACTLY the same except for the Z value. What I get looks terrible << sounds like the vertices don't correspond even though you think they might. If they were made outside of 3ds and imported it's a good possibility you'll get the mess you describe. It's best to make copies in the 3d editor and then manipulate the morph copies the way you need. The script extensions might help in parsing z-coords out of and ascii file and moving the verts for morph targets. there may be a simpler solution but I can't think of one.
#156706From: David J. MarksMar 2, 1995 4:41 PM
>> there may be a simpler solution but I can't think of one. If "exact" z-values aren't required, a slightly clumsy method using the Displace IPAS and the SEEZ IPAS might work. Create a greyscale bitmap from the topo mesh using SEEZ for each of the two meshes. Create a grid object and copy it. Displace grid1 with the "before" greyscale and displace grid2 with the "after" greyscale. These 2 grid objects should morph flawlessly. – Dave
#156729From: MARTIN G FOSTERMar 2, 1995 6:21 PM
David, >> If "exact" z-values aren't required, a slightly clumsy method using the Displace IPAS and the SEEZ IPAS might work.< cool idea, David. I'm filing that one away for the future.
#156746From: John K. JordanMar 2, 1995 8:55 PM
>>mesh->SEEZ->image->displace->morph… I like it too. You get the creative thinking award for this week! JKJ
#156879From: Forcade & AssociatesMar 3, 1995 11:13 AM
Craig, As others here have said: if the vertex ordering is not absolutly the same between the meshes, you're in trouble. The Morph function can only take vertex#1 from mesh A and change its postition to that of vertex#1 from mesh B and so on for each vertex. If the faces of your meshes were combined into a mesh in a different order from each other, it won't work. One way around this might be to organize the face in AutoCAD. If the mesh is a rectangular grid, it should be fairly easi to write a Lisp program to sort the faces by X and Y and then build a Polyface mesh in correct vertex order. If the mesh is a nonuniform network mesh you can probably still do it but it will be harder. Good luck. Terry Gilbert Forcade & Associates
#157064From: TBrunoMar 4, 1995 2:01 PM
Craig, I do this all the time. I use Eagle Point survey software in autocad to create a TIN with no vertical games. DXF this out and get it into 3DS. Do a render to make sure you have all the faces going the right way. Now make a copy of your mesh, keeping it at the same location. Scale the copy. Morph between the two. Works every time. You will run into problems if you want to morph between an original surface and a proposed grading plan. Different number of faces, vertex count, vertex order. If anyone wants to deal with this extra credit problem, I would be glad to hear. Todd
#157509From: Craig Sharp [Mem TM]Mar 7, 1995 7:43 AM
Todd: Thanks. It was so easy to scale the mesh with the surfacing software that I was using that I didn't even think about using 3DS. I appreciate everyone's help. C#