I have a joint chain controlled by a Spline IK and a dense curve.
I'd like to keep that curve as is, but use a simpler curve (same length, but less CV's) to control the complex curve.
I'm using the Wrap deformer, but the results are not what I'd expect. The dense curve doesn't smoothly follow the simple curve.
Here's a pic:
I've fiddled with the options but they haven't helped. Is there another deformer or method I should try?
This isn't a programming question. You should post elsewhere like cgtalk.
You'll probably get much better results using a wire deformer (Create Deformers menu->Wire Tool). It's made to deform other objects based from curves.
Related
Is there a way to change the clutter perspective for a given container or widget?
The clutter perspective controls how all the clutter actors on the screen are displayed when rotated, translated, scaled, etc.
What I would really like to do is to change the perspective's origin from the center of the screen to another coordinate.
I have messed with a few of the stage methods. However, I haven't had much luck understanding some of the results, and often I hit some stability issues.
I know there are transformation matrices that do all the logic under the hood, and there are documented ways to change the transform matrices. Honestly, I haven't researched much further and just though I would ask for guidance before spending a lot of time on it.
Which leads me to another question regarding the matrices and transformations. Can one of these matrices be used to skew an actor? Or deform it into a trapezoid, etc? And any idea how to get started on that, ie. what a skew matrix would look like?
Finally, does anyone know why the clip path was deprecated? It seems that would have worked for what I ultimately want to do: draw irregular shaped 2d objects on the screen If I can implement an answer to question 2, then I guess a clip box with a transformation can be used here.
1, I do not know if (or how) one might change the Clutter stage's focal point.
2 A skew or shear transformation matrix is easy enough to construct, and can be implemented in the GJS Clutter functions Clutter.Actor.set_transform(T) and Clutter.Actor.set_child_transform(T) where T is a Clutter.Matrix .
This does present another problem, however, for the current codebase; and this leads to another question. (I guess I should post it somewhere else). But, when a transform is set on a clutter actor (or its children), the rest of the actor's properties are ignored. This has the added effect that the Tweener library cannot be used for animation of these properties.
3 Finally, one can use Cairo to draw irregular shaped objects and paths on a Clutter actor, however, the reactive area for the actor (ie. mouse-enter and -leave events) will still be for the entire actor, not defined by the Cairo path.
I can't find a working example of a cutting plane implementation for HelixToolkit.Wpf.SharpDX.
I hope to achieve something simpler than the HelixToolkit.Wpf cutting plane which can be invoqued by shift+clic anywhere on the displayed model.
I'll be happy if at least I would be able to do cutting planes with axis-oriented normals, I don't have any interest in custom oriented cutting planes.
Edit
After answering to first comment, I add the precision about trying to do something after the CrossPlaneSection example from the github, but couldn't find someting to use on a more complicated scene. Still waiting for tips.
See the cross section example in Sharpdx version
https://github.com/helix-toolkit/helix-toolkit/tree/develop/Source/Examples/WPF.SharpDX/CrossSectionDemo
The documentation states
GameplayKit also works well for 3D games built with the SceneKit framework
However, there seems to be no mention of using SceneKit's pathfinding features such as GKGraph with SCNNodes that exist in 3d space.
Are GameplayKit's pathfinding feature unsuitable for SceneKit games, or is there extra documentation somewhere to illustrate how to combine the two?
Depends on the scenario really. My current side project is a SceneKit based boat game; boats move on a 2D plane which means GameplayKit's 2D pathfinding works well.
It's not without complications though... SpriteKit gives you some useful functions such as obstaclesFromSpriteTextures:accuracy:, to help with the generation of your pathfinding graph. There is no corresponding function in SceneKit. I've adopted the approach of rendering my scene 'top down' to an offscreen buffer, and using edge detection to trace around the 2D projection of my islands.
For full 3D pathfinding I can't see GameplayKit being much help, well not without some hacks (eg; break 3D pathfinding down into several 2D planes).
I'm new to x3d/vrml and I'm trying figure out how to punch a hole in a solid shape. For example, a 6x6x2 cube with a smaller 2x2x2 cube in the middle to create a hollow shape. I have tried extrusion and indexedFaceSet without success. I haven't found any tutorials that show me how to do this. Therefore, A working example would be useful to me as well as others .
Normally you don't create this kind of shapes manually. Of course it is possible to use the IndexedFaceSet node in order to achieve this but it's much better and easier to use a tool (e.g. 3D Studio Max) where you can create shapes using a graphical interface. Then you export the file to X3D or VRML or whatever and you'll see the IndexedFaceSet there and possibly the complexity of the node (I mean the node values which are nearly impossible to determine by yourself).
In your specific case you could use 4 cubes that are intersecting and leaving a hole in the middle...this would be just a tricky solution.
I am looking for some algorithms to add a convex mirror effect and concave mirror effect to an image. I want to know also how to make this efficiently: applying the algorithm to image data or overlay it by a transparent image that contains the effect. But I don't think the second choice is applicable in this case.
If you are doing it manually instead of using hardware primitives, then the bresenham interpolation algorithm (usually used for line drawing) is the way to go: error propagation is far more efficient than other, more complex, methods.
What Bresenham does is just interpolation. Don't miss the opportunity to use its efficient design elsewhere (slope calculation for line-drwaing is just one of the many applications of interpolation: you can interpolate another dimension: 2D, 3D, transparency, reflection, colors, etc.).
25 years ago, I remember having used it to resize bitmaps and even do texture mapping in a real-time 3D engine! That was at a time graphic-accelerated video boards costed a fortune...
CImg library has a fisheye sample, in examples\CImg_demo.cpp. The core algorithm seems very simple (and fast, as generally this library). I think it's an approximation of the real optical effect, but could be modified to handle the convex mirroring. I don't know if it could be extended to handle 'negative' curvature.
You can use a pre-calculated sin() table and interpolate values to match the size of your bitmap. The inverse effect is achieved by either using an offset or a larger table.
Remembers me the (great times of the) DOS demos in the 80s...