Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [3d]

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

0
votes
3answers
898 views

Need advice concerning the creation of open world game in Unity 3D

I just wanted to ask for advice those being an expert in Unity 3d and overall in game industry about how it is possible to create an open-world game by means of Unity 3D, that is, I already tried to ...
1
vote
1answer
47 views

Agents going to the same position

So more often than not I have a case where two agents get the same destination vector3. This causes some hiccups because they won't be able to get to their target because they block for one another. ...
1
vote
0answers
43 views

Distance from capsule center to point on the surface

this question is engine agnostic, I will use the term "object" to refer to entities in my scene. The scenario is the following: I have 2 entities Entity O is a capsule Entity C is a point I want to ...
0
votes
0answers
46 views

Getting to know if a truck ahead of car

I'm checking if a car is passing through a truck and check if passing on its right or its left. that works, but when car stops, and the truck passes, that condition is also valid, I want to limit it, ...
1
vote
1answer
145 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
1answer
54 views

Camera rotation is weird when it's a child of another object

I implemented scene graph hierarchy into my 3D game engine, and there seems to be a problem with the camera's rotation when it is a child of another object. It only happens with the camera, not any ...
61
votes
6answers
17k views

Are all games made by drawing each frame?

I am a beginner learning about computer animation(for games). So far, the only method that I have come across is drawing each frame, every frame update. So at the start of every frame, the entire ...
1
vote
0answers
53 views

Modern way of getting points within a distance?

I'm making a game engine, and some components may want to interact with others based on distance. Currently, the component registers an update listener which runs on a loop, then it checks the ...
1
vote
0answers
21 views

Quat.AngleAxis broken on one axis

I have a scene in my game where you create your own designs by placing static meshes and manipulating their scales, positions, and rotations. For the rotations I'm using Quaterion.AngleAxis as so: <...
4
votes
3answers
3k views

How do I implement flat shading in GLSL?

I'm working with GLSL and trying to implement flat shading on a 3D model (rather than smooth shading). To illustrate what I mean, here are two screenshots of cubes in Blender. Here's one with flat ...
0
votes
1answer
118 views

Monogame Effect World Translation Z and alpha in objects not visible behind

I have an effect in each triangle and rectangle: In the triangle class I have: ...
0
votes
1answer
86 views

Change color of selected polygons

I have a "low poly" surface, where the color palette for polygons is low (e.g. 20 distinct colors). Is there a way to change the color (with a smooth transition) for all polygons painted with a ...
0
votes
1answer
491 views

Unity: Set new Origin using empty GameObject

You used to be able to set a GameObject with your Mesh as a child of an Empty GameObject. By rotating the Empty the Mesh would rotate around the position of the Empty. Now after the update it seems it'...
1
vote
2answers
271 views

How do I get from orthographic to perspective?

I programmed a cube in java and calculated the x y and z position for it's rotation on the x,y and z axis but I'm finding it hard to display the z axis i've been trying to change the distance of the ...
2
votes
2answers
398 views

Transform.LookingAt() does nothing

To get used to how Godot transforms work, I am attempting to write an orbit control. The goal is for it to behave similarly to the Godot viewport. So far I have the positioning of my camera working. ...
2
votes
1answer
106 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 ...
1
vote
0answers
124 views

Handling character with world object collision in libgdx and bullet

I am using libgdx and bullet for my 3d mmo project. I have been able to detect collisions using a collision world with collision objects. This was working fine for things like detecting players ...
1
vote
2answers
99 views

How do I represent a 3D world-based game in a 2D Platformer/Top-Down gameview?

To imagine the question lets have the following scenario: We have Terraria (a 2D Platformer revolving around harvesting resources and building stuff). We have a large 3D sphere populated with ...
1
vote
0answers
142 views

How could I generate a document that catalogs a collection of 3D models?

I have a lot of 3D models (.obj and .fbx) I can re-use in some games, but sometimes I forget them. So I want to create a (for instance) Word document with the images of all my 3D models. This can ...
0
votes
0answers
64 views

How to Use My Third Person Camera Correctly When Rotating Around Another Object

I am creating an OpenGL 3D space game and when my ship enters a planet’s atmosphere, the ship starts rotating along with the planet. In first person everything looks great but when I go into third ...
3
votes
2answers
692 views

Why not derive velocity from position updates in games?

Is there a reason why retrieving velocity of a 3d object in a game engine vs deriving it from position updates is preferable? I am currently polling position at every step and deriving current ...
0
votes
0answers
33 views

Calculating Offset Matrices for 3D Animation

I am experimenting with SkinnedMesh sample in Microsoft DirectX SDK June 2010. I am trying to understand how offset matrices work. The .X format comes with Offset matrices for every bone, but I am ...
0
votes
0answers
23 views

How were games from the N64 era made? [duplicate]

This thought came to me while i was playing on my Nintendo sixty four, These games had a lot of content, the cartridges were either 32 MB or 64 MB, games like ocarina of time and more had a ton of ...
0
votes
2answers
63 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 ...
3
votes
1answer
287 views

representing transforms without a world/global reference frame

Background: I'm trying to make a segmented/portal-based game engine that supports impossible (non-euclidean?) geometry. By segmented/portal-based I mean the world is divided into segments which are ...
0
votes
1answer
253 views

Canvas enabling is not working

I have a canvas with two buttons in it and I want to enable it on the button click, but when I try to enable it, it doesn't work. However, when I try to disable it on button click it does work. Here ...
2
votes
1answer
494 views

How to rotate directional billboard particle sprites toward the direction the particle is moving

Behavior: With the following texture I get a weird behavior when I try to rotate my particles in the direction they are moving. Essentially, the quad seems to rotate, but just barely so that when ...
0
votes
1answer
164 views

Calibration using quaternion

I have an external hardware which gives me quaternion values. Now I would like to calibrate the device at a certain position and show tilt variations from that position on the UI. For example, I have ...
0
votes
0answers
43 views

Remove triangles from mesh

I'm having a ray to intersection and getting an intersection point, then I compare a condition. I would like to remove that particular triangle from the mesh. In the RayCasting function, when I get ...
0
votes
0answers
43 views

Converting 3D Points into 2D

I have a simple problem, just converting 3D points into 2D image coordinate, the image center should be 0,0 to -1,1 I have done the following equations with the help of @iedoc but I still don't get ...
0
votes
2answers
61 views

Check whether object is looking in between a minimum and maximum angle in 3d Space

What I want to accomplish is to check whether an object is looking in between a minimum and maximum angle in 3D space for example if a Helicopter is looking to the right... it would have to check ...
0
votes
0answers
24 views

Rough camera rotations

I'm doing a First Person Camera with Monogame. Moving the camera with WQSD works fine, but when I want to use my mouse in order to rotate the camera, the rotation is rough. I'm doing this process : 1....
1
vote
1answer
111 views

Separating Axis Theorem and rotated objects

Quick question which hopefully won't require thralling through my code. I have a working implementation of SAT for 3D collision detection but I'm having some problems with dealing with rotated ...
0
votes
0answers
165 views

Resolving collision with multiple objects

I already have SAT implemented for collision detection and MTV computation and it works totally fine when my character collides with only one object. But it's possible that there is a collision with ...
6
votes
0answers
354 views

How to create skeletal animation data for a skirt?

Please think of this in an engine-agnostic way first, and then we can talk about specific engines. In my game, I have a 3D character which is wearing a hakama (think of it as a long pleated skirt). ...
0
votes
0answers
208 views

3D Coulomb Friction - Use Collision Impulse To Calculate Friction Force?

I've been using this document to learn how to implement a very basic physics engine. The section on Coulomb Friction on page 55-56 (marked as pages 43-44) confuses me. It observes that the friction ...
0
votes
0answers
79 views

How can I spawn an object where I clicked in a 3D space, but spawn it in a 2D location?

I have a game where I have an object sat on a 3D plane and I want to click above it to drop an object. Wherever I click I want the object to drop where I clicked on the Z-axis, but on a fixed ...
0
votes
1answer
169 views

Rotation of a cylinder between to spheres in R3

I want to connect two spheres with the coordinates [ax, ay, az] and [bx, by, bz] with an cylinder which is placed in between the spheres an rotated. For the placement I calculate the center of the two ...
2
votes
1answer
291 views

Draw edges of a complex 3D shape

I have a 3D complex shape composed of simpler primitive geometric shapes. The geometric shapes are made of triangles. I already know how to draw the edges of a single object (geometric shapes). In ...
1
vote
1answer
118 views

3D camera - window resolution relation

I'm having a bit of an issue when it comes to 3D- and 2D camera(s), in relation to a game's window resolution. I want to let the player choose from different window resolutions, either from a menu or ...
1
vote
2answers
183 views

Mesh complexity vs Texture Size (Performance)

From a performance view, which is preferable: A higher detailed meshes with small textures (like 32x32 pixels) or A less detailed mesh with a bigger texture (like 1024x1024 pixels)? Additional info. ...
1
vote
0answers
309 views

Computing the UV coordinates of a 3D point that lies within a 3D triangle

From a triangular mesh I have a 3D triangle T represented by 3D vertexes v0, v1 and v2. Each vertex has an associated UV coordinate into a common texture image, represented as uv0, uv1, uv2. ...
0
votes
1answer
42 views

Partially transparent surface over opaque surface causes strange artifacts

I have a world with many unit square tiles, each made up of a 3d terrain chunk and a 2d water chunk (a square). Each chunk stretches from [0, 0] to [1, 1] (inclusive) in its tile space. This means ...
0
votes
2answers
635 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
2answers
87 views

TRS Matrix between 2 points

I have got 2 Points in 3D Space whose TRS Matrix' from 0.0 to there current place is known. Now I want to change the Matrix of the left point so that the matrix of the right point combined with the ...
-1
votes
1answer
93 views

How to remove gameObjects once they are out of screen

My game has a player that keeps running forward automatically. Here is the code I'm using: ...
1
vote
1answer
197 views

Orthographic Projection viewable area

I have a simple orthographic projection that is rotated at an arbitrary angle on any combination of the three axes. I am trying to use these matrices to calculate the viewable area of the screen for ...
0
votes
1answer
141 views

How can i prevent objects faces clipping over other objects faces?

I have a naked body, I have a bra over that body, I have a suit over that bra. Since the objects arent accurate enough, i get ugly "clipping". Is there a way or method I can prevent this? (except ...
1
vote
1answer
241 views

Convert Tris to Quads or Polygons

Im working on a ledge climbing system in Unity. I am coding a method that takes a mesh and tries to generate a bunch of connected nodes that will help the player detect ledges that can be climbed. ...
0
votes
1answer
157 views

Can't find Model Substance Painter - Lost in the Void

I must have zoomed out too far, turned the camera in the wrong direction, whatever. The model is lost, I cannot find it in the 3D View. This is a complex project and I don't want to start over. I have ...