Projection outline of object to other object in scenekit - scenekit

Hello~ I want to draw outline of cube on capsule surface. It is outline through normal between camera and cube center. That image is made by unity but I wnat to render on ios scenekit. Do you have good way to do this simply??
enter image description here

Related

How to draw a polygon shaped data annotation shape for image detection?

I am training some images using imageAI object detection. What i want to do is draw a polygon shaped data annotation around the objects in an image. Not a square box. Even though I ca draw the shape, the imageAI class doesn't consider polygon shapes. If some one can help me to find if is there is some model where polygon shapes are allowed in image training, that would be great.
ImageAI only supports PascalVOC image annotation format, which is upright rectangular bounding boxes. You would need to change frameworks for this to work. For a workaround, consider using an image editing tool to get rid of the background and then provide a square bounding box.

How to implement halo effect with Wpf 3D?

I'm trying to build a 3D earth with Wpf Viewport3D. I have created the earth and it works pretty good. Then I want to add a halo effect around the earth like this attached image:
.
Some recommend to use diffuse material for the globe model. Then build a slight larger globe model with emissive material and little opacity. But the effect is not very good. It affects the color of diffusion material like this:
How can I implement the effect like the first screenshot?
I've done exactly this by creating a ring, inner radius the same radius as the planet and an outer radius to relect the atmospheric depth. Oriented to 'face me'. Using texture coordinates into a LinearGradientBrush to have the atmosphere fade from sky blue to transparent black.
Alternatively, there are some fairly good PNGs around of semi-transparent cloud layers you could use on the slightly larger sphere.

C# How to draw a Polygon connected by smooth curved lines

Hi friends i'm developing an application just like ms paint, in that i want to draw a polygon like shape with curved lines.I used graphicsPath and drawcurve method but i'm not able to get the corners.Please give me some idea for drawing
Plolygon with curved line.

WPF 3D transparent textures - clipping?

http://www.youtube.com/watch?v=gZNdfVwkttM - you can see all of the problem described on this video if you can't see pictures.
All of walls in all images below have a semitransparent PNG texture. Each square wall, floor and ceiling tile is a separate GeometryModel3D (I know that is no good for performance but...). The floor and the ceiling of the central cube have no any geometry and textures - so they have a color the same as Window.Background (black). But the effect considered appears in any way of transparency obtaining: texture for ImageBrush with transparency, Material.Color (for example DiffuseMAterial.Color) where Color has alpha channel, ImageBrush as material where ImageBrush has Opacity - all the way I have the same problem.
All of walls consists of two triangles. Where are no explicit normals , because I define triangle indices so normals culculated automatically by WPF.
http://imagepost.ru/images/i/ma/image00001.png
It also haven't any back material or extra triangles from the back side.
As you can see there is no problem if you look only from +Z to -Z (standing on the blue square and looking to the red square - that is the second picture).
But if you look backward (from red to blue - the first picture) there is no transparency!
Well, I desided to look from the yellow square (third picture).
And then I walked nearer - you can see what was happening (pictures from 4 to 6).
There are no geometry construction error or texture mapping error or lighting error! It is some kind of clipping, I guessed! In addition there are some interested pictures 7 and 8 to prove my guess.
The last picture shows the white background of the window that hosted Viewport3D (previous was black), and my guess about clipping confirmed - WPF just not painted this part of the scene and we can see the window background!
BUT! If this happens from various looks, why the look from +Z to -Z (second picture) seems well?!
You need to sort the triangles based on their distances from the viewpoint. Only then, wpf will be able to blend the transparent textures.
DirectX is able to blend triangles on top of each other but only when drawing them back to front
http://www.ericsink.com/wpf3d/2_Transparency.html

Getting Relative Position of a Rotating Camera

I have a Viewport3D with a 3D model composed of multiple smaller components centered at the origin. I'm animating the PerspectiveCamera to rotate about the Y-axis using an AnimationClock created from a DoubleAnimation to create a rotating effect on the model. In addition, I have another rotateTransform3D assigned to the camera's transformgroup to enable the user to orbit around and zoom in-out of the model using the mouse.
I want to be able to translate each component as it is being selected to move in front of the rotating camera. However, I don't know how to get the position of the camera relative to the 3D model because the coordinate system of camera is being animated and transformed by the user's input.
Is there a way to get the offset between two coordinate systems?
Any help or suggestions would be appreciated.
Thanks,

Resources