Tag Info

Hot answers tagged

6

No, it is not usually possible. But when it is, it’s quite useful. The problem is that there will always be two possibilities for the missing coordinate. For instance, if you store [x,y] as [0,0] this could mean the unit vector was either [0,0,1] or [0,0,-1] and without additional information there is no way to tell which of the two it was. Fortunately, in ...


4

Deep within the game engine your mesh is defined by your vertices, your indices (which define how to draw the triangles using the vertices), and its material (which consists of the shader as well as other parameters). Submeshes allow you to define separate lists of indices and materials (depending on the engine) over the same vertex data which is useful not ...


3

Luckily for you, you don't actually have to deal with any of this! Instead of actually creating a top-down world, you can use Unity's built-in 2D mode, and create sprites instead of cubes and planes, to make it look like it is top down. 2D mode makes the camera line up automatically, and have the depth appear to be non-relevant, though it is. Also, there are ...


3

I'm not entirely sure I understand the question but, given a 3D point cloud with a 2D "shape" (like a disc) the problem is simply one of dimension reduction. The algorithm you're looking for is called "Principal Component Analysis". How it works is not trivial, so I'll leave that for you to research if you're not already familiar with PCA. What it will give ...


3

Yes it's possible. Instead of using 3 cartesian coordinates [x, y, z] you can use 2 spherical coordinates [theta , phi] to represent any 3d unit vector. It depends on the case if it's useful or not. For example it can be useful for compressing animation data. There are also other representations you could use and there was actually an interesting paper ...


2

Yes, there are many performance implications to consider even when two objects share the same amount of geometry. Fragments that fail a Z-buffer test will not invoke fragment shaders. The amount of screen-space that the objects occupy will impact performance, as fill-rate is a big deal especially on mobile devices. If you have large triangles that are ...


2

This is generic solution that will work even with FFP: Sort models from far to near (in the example this is just a matter of 2 planes) Set blending to additive. Render opaque outline; Render half-transparent insides; Render outlines with half-transparent fading gradient; Render glowing dots sprites on the corners.


1

For that orientation you described you want to use the following Euler rotations: //Camera (0, 0, 0) //Plane/quad (0, 0, 0) In this setup the x value will move the object "East" and "West". The Y position will move it "North" and "South" and the Z value will be "Altitude". It is worth noting that the coordinate axes in Unity are different from some ...


1

You cannot count with px, px are irrelevant because of different resolutions. Cast a ray onto plane at your target location perpendicular to the direction(target loc - actor loc) vector. Then calculate the distance between ray(aiming direction) intersection with that plane and your target location on the plane. Note, this is one way of doing it. If you dont ...


1

To render just the edges of an arbitrary polygon you could use a Solid Wireframe technique. It uses barycentric coordinates to determine which edges to draw. For example you might have a triangle whose barycentric coordinates are (for each vertex) B0: (1, 0, 0) B1: (0, 1, 0) B2: (0, 0, 1). Put it simply, when these values are interpolated the further any of ...


1

At some point in my time at e-on I have maintained the gizmos of Vue product line. I can tell you, it will take you multiple days, full time. Unless you find some library or super clever way, the classic way is to get the coordinate of the mouse in the window when you click, if its a relative coordinate to the viewport, you can simply divide x and y by width ...



Only top voted, non community-wiki answers of a minimum length are eligible