Questions tagged [3d]

3D refers to three dimensional space where coordinates are represented with X, Y and Z values.

Filter by
Sorted by
Tagged with
6
votes
2answers
3k views

Triangle-triangle continuous collision detection

I am making a 3D game engine and I use continuous collision detection. I am using Sphere-Trees to cull primitive collision checks to a minimum. However, I'd like to perform continuous triangle-to-...
2
votes
1answer
527 views

Does triangle-plane clipping in 3D always produce a triangle?

When you clip a triangle against a plane, will you always get a triangle out? Are there perhaps cases where you don't get a triangle out of clipping it against a plane?
2
votes
0answers
147 views

How do you find the collision between 3D boxes and 3D QUAD face meshes?

I have an axis aligned bounding boxes for 3D object collision, but I have a complex 3d mesh that's divided into 3d faces so I want to check for bounding boxes and collision with the faces of that ...
-2
votes
1answer
71 views

2D and 3D Tablet Games Definition

I would like some clarifications how to distinguish between a 2D and 3D mobile game, as mobile devices do not really have 3D screens. i) Do 3D iOS or android games really exist or are they 2D tablet/...
1
vote
1answer
698 views

3D/perspective Top down shooter bullet issues

I'm developing a top-down shooter with multiple levels (ground for ground units, middle level for buildings, top level for air unity). The problem is the collision. Though I can make the collider ...
3
votes
2answers
1k views

Scan-Line Z-Buffering Dilemma

I have a set of vertices in 3D space, and for each I retain the following information: Its 3D coordinates (x, y, z). A list of pointers to some of the other vertices with which it's connected by ...
0
votes
2answers
183 views

How Can I Fix Spawning The Tiles?

I am making a 3D infinite runner game in Unity in C#. When the player has reached the end of the tile it should spawn another tile and then delete the previous tile. When the player reached the end of ...
0
votes
1answer
217 views

Using PyOpenGL, can I rotate raw data rather than the current matrix?

I'm trying to create a sort of PyOpenGL renderer for the Bullet physics engine, and at the moment I'm rotating my basic cubes with math in Python. However, if I do the math in Python that's going to ...
1
vote
1answer
491 views

Greiner-Hormann clipping problem

I have a set of planar polygons in 3D space defined by their vertices in counterclockwise order. Let's define the 'positive face' as being the face of the 3D polygon such as when observed, the ...
1
vote
1answer
126 views

Transforming a 2D Grid in 3D Space

Hi everyone, I'm trying to implement a 2D Grid in a simple 3D Editor. Here are some debug-rays I already implemented: Everything is working as intended as long as the object is not rotated. For ...
0
votes
1answer
338 views

Scanline filling of polygons that share edges and vertices

In the image below (a perspective projection of an icosahedron), the scanline (red) intersects that vertex at the top. In an icosahedron each edge belongs to two triangles. From edge a, only one ...
5
votes
2answers
586 views

Drawing circles at the background of a 3D scene and updating their size

So, here is what I am trying to do in Unity 5 (using C#). I want to draw a a 2D circle at the background of a 3D scene and apply a texture/image to fill it. Just like it would be if the circle was in ...
2
votes
1answer
178 views

Opengl - Cascading Shadow Maps Implementation

after reading about CSM, I have a few questions about the implementation that I can't find the answer to. According to the wiki, an FBO can only take 1 depth attachment, so in order to render ...
0
votes
1answer
237 views

libGDX 3D texture is stretched

I'm working on a 3D maze game using libGDX. I'm using MeshBuilder to render the walls. All walls are a single part made using a ModelBuilder in the create(): ...
1
vote
1answer
162 views

I don't understand code that builds 3D sphere

I'm trying to learn some lwjgl and opengl, and I was trying to make a 3d sphere etc, I found a code to do that, but I don't 100% understand the code and the math behind it and would like to get some ...
1
vote
0answers
122 views

How to implement weighted blended order independent transparency in OpenGL?

I want to implement weighted blended OIT in my C++ OpenGL 3D game, but I didn't find any C++ examples about weighted blended order independent transparency. Paper How to clear accumTexture(...
2
votes
1answer
5k views

How to make texture size correctly in THREE.js?

I'm new to THREE.js and I have a frustrating problem. I can't get my grass texture to size "normally" on the terrain. I get it, the terrain is steep, but that doesn't mean the grass should be ...
22
votes
1answer
2k views

Why do transformation matrices always have an extra dimension? [duplicate]

In 3D math I always see matrices with one additional dimension. For example, in 3D graphics, matrices are always 4x4 and in 2d they are 3x3 matrices. Can anyone explain why?
1
vote
2answers
109 views

What issue in the shot in unity 3D?

when the start game in the client [localserver], the bullet can't forward in the space just fixed in the Gun, here image about what I say:https://imgur.com/prWNxBx "image" network manager https://...
0
votes
0answers
108 views

Collision physics error

I am working on a game developed using Scenekit (iOS). I am facing some strange issues with collision physics. I have added one 3D table (with a hole at its center) to the scene. I am setting physics ...
0
votes
1answer
123 views

Collision not smooth in unity3d

I am working on a project(Racing car). When it hit an object the object should be destroyed. The Object is being destroyed when it is hit, but the car stops for a moment after hitting like an obstacle....
1
vote
1answer
40 views

Aim/Scope Oscillation Algorithm

I have been struggling to find an algorithm to implement something that will make a direction oscillate within a cone constraint, in a helix-shaped fashion as in photo (it will always go back to the ...
0
votes
2answers
87 views

D3D11 SkyDome with texture

Has anyone some code about a skydome mesh with a texture and a shader? Or even know how can I create a skydome mesh in Direct3D11? I wanted give an idea from https://ifun01.com/R8CTFZQ.html but it ...
2
votes
2answers
170 views

Jerky motion when standing on hovering object

In a level of a 3D FPS I'm making, I have several floating pillars that move up and down (the x and z positions are always the same). When the player stands on one of the pillars, the motion is ...
2
votes
2answers
621 views

How can I generate the smallest enclosing sphere from a mesh?

I have a polygon which is defined by a set of vertices and I need the smallest sphere encompassing the mesh. The spheres are defined by a position vector (x,y,z) and a radius. Is there an algorithm ...
1
vote
1answer
249 views

How can I add 3D animation to my Pygame window?

I've developed a quiz game using Pygame but now I'm being asked to implement a 3D animation element (a game show host) to the game. I used Pygame as I was told it would be an easy enough language to ...
0
votes
2answers
1k views

How to make projectiles shoot at mouse position?

I'm looking to make it so my fired projectile is shot at the position of the mouse so aiming is an option ie:up down ect.. I have the script working to where it spawns the cloned object and launches ...
1
vote
0answers
29 views

Switch Vector 3 x,y,z Components Based on Rotation

I have a cube that moves by rotating on its edge. I want my code to also work for cuboids. The following code is what I'm using to rotate my cube: ...
1
vote
0answers
252 views

Is there a way to convert a shader code to shader graph?

I would like to ask if there is a way to convert a Coded shader into the new Shader graph, beacause i want to edit my shaders in more efficient way. Any help is appreciated.
1
vote
1answer
60 views

How to keep triangles from connecting across voxel mesh

I am working on a voxel engine and have just started learning webgl. I have generated a list of Vertices and Indices by using Array.concat() on a template array and adding a value based on my position ...
1
vote
0answers
45 views

How can I move the camera to create a parallax effect?

Right now I am making an application which can be described as model viewer for iPad Pro. The client wants to have an orbiting camera around the object and in addition he wants to have a parallax ...
25
votes
4answers
26k views

What exactly is UV and UVW Mapping?

Trying to understand some basic 3D concepts, at the moment I'm trying to figure out how textures actually work. I know that UV and UVW mapping are techniques that map 2D Textures to 3D Objects - ...
1
vote
1answer
342 views

libGDX 3D rendering

I'm currently working on a FPS 3D game using libGDX. I aim to have maze-like levels (like the original Doom and Duke Nukem 3D) so I'm making a level editor with a top-down view and lets you stretch ...
0
votes
1answer
688 views

Getting the winding order of a mesh

I'm doing some topological operations on my mesh and I need to know the winding order for my mesh. Since I will be importing models from different sources I will need to know whether the winding ...
9
votes
2answers
2k views

In very simple 3d racing games, how are collisions handled?

I was wondering how collisions in some simple 3d car racing games are done (especially in games like Outrun 2/Motoracer). In classic car racing games with complex environment (open world), I guess ...
0
votes
2answers
23 views

Unity GameView Differrent with CameraView - Dont have 3D environments

Now on my existing project, if i create new scene, automatically i got my gameview like below : above game does not have 3d environments outlook, i'm expecting like below (my old existing scene) : ...
1
vote
1answer
550 views

Engine and level of detail for maze / labyrinth / dungeon scene?

My question is similar to these: Algorithm for generating a 2d maze To scene graph or not to scene graph? I.e. in this case should I use jME3 or some other engine (I heard Unreal offers a free ...
6
votes
2answers
5k views

3D terrain map with hexagon grids

I'm working on a hobby project (I'm a web/backend developer by day) and I want to create a 3D tile (terrain) engine. I'm using XNA, but I can use MonoGame, OpenGL, or straight DirectX, so the answer ...
0
votes
1answer
34 views

3D infinite platform generation: Can't increase space between platforms. (Unity)

As seen in the images, changing the value of 'spawnZ' affects the distance between the initial platform and the first generated platform but afterwards it has no affect whatsoever. ...
14
votes
3answers
2k views

What caused “falling out of the world” and what fixed it?

A lot of early 3D games had the problem where you'd be trundling merrily along and suddenly everything was black, with an island of what looked like the hollow facade shell of the scene you'd been ...
4
votes
1answer
2k views

Polygon count budget

Is there any smart way to think about polygon budget relating to PC gaming today? My game will have one static 3d background scene and two fighters. No more enemies. I am thinking about having ...
0
votes
1answer
24 views

How to orient a layer to connect 2 points AND facing the camera

here is my question, which I hope will be in general interest: If you have got 2 Points in 3D space and want a plane to connect those, you can quite easily use a function similar to "lookAt" to ...
11
votes
2answers
10k views

Shadows in deferred rendering

I've read some material about deferred rendering, and I think I get the gist of it. But what I don't understand is how it accomplishes shadows. The G-buffer, as far as I'm aware, does not involve ...
1
vote
0answers
158 views

Is there a way to rotate a TexturePaint?

I wanted to add a grass texture to my 3D polygon-based game, and thought the easiest way to do it was to use a TexturePaint. Currently, the texture stays fixed while the world rotates which isn't the ...
0
votes
1answer
351 views

Recommended polycount for a MMORPG character

"How much polygons is too many for a MMORPG character?" I did some research and found a few discussions about the matter. But the answers I found was mostly "Polygons has nothing to do with ...
1
vote
0answers
32 views

Creating Smooth Corners when Converting 2D Polylines to 3D Models

Part of my game takes SVG polylines (which are just basically a set of x,y coordinates that define a multi-segment line) and converts them into 3D 'paths' (ie. a line created as a set of faces all ...
1
vote
0answers
350 views

Screen-space shadows?

Is there such a thing as screen-space shadows? I know that most shadow projection comes from rendering the world from the viewpoint of the light source, projecting the shadows onto a large square ...
1
vote
0answers
32 views

HTC Vive Grabbing Object Trigger

I'm doing a HTC Vive VR game with Unity. I have 3 objects, and I want to trigger different events when the player pick up different objects. Since I set the rigidbody to the controller and don't ...
0
votes
1answer
45 views

Import 3D model into Unreal Engine 4

(Sorry if I misunderstood the context of what I want, I'm currently noob in game development). I want to retrieve a 3D model from let's say Saints Row 3, and import it to Unreal Engine 4, is it ...
1
vote
0answers
53 views

Unity3D: Simple animations ending with a bit of offset

I'm trying to make a simple game with some cubes rotating 90º when the user clicks on them. I've setup an empty game object, a simple cube nested, an animator, and two animations: RotateClockWise, ...