# Questions tagged [3d]

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

2,042 questions
Filter by
Sorted by
Tagged with
20 views

### In Unity, how can I check whether two objects are sliding on each other or rolling against one another?

I'm coding a script to make objects emit appropriate noises on contact with other objects, with different sounds for isolated impacts, sliding, and rolling. Impacts work just fine, but for the other ...
22 views

### Differences between rotations and translations of different camera properties in LiBGDX

I am trying to understand the camera API (applicable to perspective camera ONLY) of LiBGDX. It really does not make sense that you can call rotate and translate on many different properties of the ...
• 121
11 views

### LiBGDX camera drifts far away from modelinstance after translation and rotation

My camera starts in the position I expect. However, after some time it drifts far away from the red modelinstance! How to keep it position right behind the red modelinstance without drifting far away! ...
• 121
6 views

### Modelinstance rotation breaks apart after translating modelinstance foward in LiBGDX project

The following code rotates my modelinstance about its centerpoint y-axis. HOWEVER, when I move the modelinstance foward the rotation gets all wrong! I am not sure what is happening. I need for the ...
• 121
17 views

### Rotate modelinstance node about its own centerpoint y axis in LiBGDX

I am trying to rotate the node of a modelinstance as follows: Note: the node and modelinstance are rotating BUT not about their own center Y axis! ...
• 121
15 views

### Libgdx modelinstance rotates about some imaginary circle circumference. NOT its own center y axis! [duplicate]

So confused about how rotation works based on local y axis of modelinstance: This how I create the modelinstance: ...
• 121
30 views

### Converting voxels into polygons taking into account the colors

I have code to convert voxels to polygons: ...
1 vote
84 views

### How to rotate a 3d grid?

I have a spatial hashing grid that's mapped out like ...
• 13
85 views

### 3D AABB vs AABB discrete collision - How to choose resolution axis?

I'm working on a simple 3D collision system that only needs to handle dynamic AABB vs static AABB. It needs a sliding collision response, but it doesn't need to sweep (i.e. doesn't need continuous, ...
• 33
38 views

### Implementing pyramidal "half-voxels" to smooth terrain (not marching cubes)

I need pointers and advice about this idea. I know next to nothing about coding, but I like to design games and come from the art side. I'm designing a survival 3d game which so far doesn't feature ...
1 vote
129 views

### How to use screen space coordinate of the mouse to set a model position in game?

I'm trying to make a movement system in my game where you click the mouse and your model moves towards where you clicked on the landscape, my understanding is the normalized screen coords go from [-1,...
• 11
19 views

### I want to change the tint of my panoramic skybox for daylight cycle

So i am trying to create a daylight cycle, where it switches between two panoramic images. The change happens slowly one over 2 minutes and the other over 3. During this the fog and light changes ...
43 views

### Rotating SDF rectangle with Matrix4

Hei I'm trying to create my own UI renderer from scratch using SDF functions, got it working pretty good without any transformations, but now I would like to add ...
• 31
33 views

### Even after changing Default Behaviour Mode to 3D, my scene still remains in 2D. Why?

I had created a new scene, which didn't have sky and directional light. To solve this, I created a new skybox, then added to the maincamera. But there was no difference to scene & game view. ...
35 views

### BSP Tree Troubles and Unpredictable Results

I've been trying to fix this problem myself for ages, but I really do need help. I'm creating a BSP tree for my 3D game (baked in the map files, quake style) to replace my existing naïve collision &...
1 vote
30 views

### Get all the vertices my game object covers

I want to get all the vertices of an 3D object. I'm using this: ...
• 11
44 views

### How can I map out multiple decals on a reel?

So I want to map out multiple Decals on this reel. How can I map it out aesthetically and mathematically correct ? Looking for a math god to help me with this calculation. So far I have hardcoded the ...
• 101
73 views

### Why is my Gouraud Shading not working correctly?

I am trying to write a 3d Renderer in C using SDL and cgml but my shading seems to be not working correctly. When rendering the teapot I get seams and when I want to render a cube I get a bright white ...
• 1
1 vote
85 views

### Octree as struct not class

I was wondering (as I could not find any implementation online), if anyone here would have an idea of how to create an octree as a struct and not a class. The problem is that Octrees are usually ...
• 119
20 views

### Select polygon (and create submesh) by color of texture?

For a procedural unity mesh operation: What is a performant way to select polygon (and create submesh) by color of texture? Raycast hit a point on the mesh, then paint bucket search for the same ...
• 294
54 views

### How do I move a point in a specific direction in 3D Space?

I know how to move a point in a direction in 2D space it's like this: pointX += sin(angle) * movementSpeed; pointY += cos(angle) * movementSpeed; How do I do the ...
315 views

### Avoiding z-fighting when reimplementing Freescape games

I need to avoid z-fighting in exactly co-planar surfaces that are too close to the other solids. I'm re-implementing the Freescape engine in ScummVM (all my code is open-source, available here), and ...
1 vote
137 views

### How to add natural barriers or obstacles without impeding vision?

I am working on a natural, fairly small, grassland like environment/level. I have a few natural, minimally intrusive paths (something like this) throughout it to help guide players to the main weenies ...
• 1,707
125 views

### In a modern game engine, what parts of the rendering process needs to be handled by the CPU?

In older systems, the CPU calculates the final vertex positions and feeds those, along with material properties, color, lighting info and uv position for each vertex and the GPU renders the image ...
• 21
62 views

### How can AI tools support asset generation?

I'm a newbie in game development and looking for some advice from the community about getting game assets. I've been messing around with Luma and Meshy for making 3D models, and they've been ...
59 views

### Camera rotation in TouchDesigner

I need help on something I'm struggling with very much. I am working on a TouchDesigner patch where I have a Camera COMP with rotation on x, y and z axes. I need the formulas to convert such rotations ...
95 views

### Kinematic "dive bomb" motion toward a moving target

Context: infinite runner, stationary player, obstacles move toward player. I have an asteroid that currently Vector3.MoveTowards a moving target e.g. a "rubble&...
• 123
89 views

### Pin object to the end of a rope

I'm trying to make a cool simulation where a rope swings with an object attached to its end. I've set up the rope using Verlet integration and used Hooke's law to attach the object. But here's the ...
90 views

### Why does everything I've made in Unity begin to vanish when I get close to it?

I've attempted looking into this via. the Unity Manual, and even posts on the Unity forum, although I've found nothing. I have already tried checking Occlusion Culling and general Object Culling. I've ...
• 1
31 views

### Dimetric Screen to World coordinates

I've got a successful projection of world coordinates to the screen, but when I try to generate a ray for screen coordinates to the world, it always generates a fixed point which is invalid. I started ...
• 101
230 views

### invert:condition "det==0" is true error with no obvious cause

For my project I am turning my CharacterBody3D 90 degrees on the x-axis towards a wall. To achieve this I set basis.Z to the <...
• 23
105 views

### Understanding transform.forward vs. Converting World Space Forward to Local Space for Ray Drawing

I'm working in Unity and trying to visualize the forward direction of a GameObject. I came across two approaches: Using transform.forward: ...
92 views

### Hide Horizon Line with Small Terrain?

I'm drawing a sky plane with an atmosphere fragment shader in front of my terrain. It looks pretty much fine at sea level, but if you move above the sea level, the illusion is quickly broken, as you ...
• 124
1 vote
50 views

### Momentum of a ball on a moving platform

I'm seeking information on how to implement something. I have a ball on a moving platform. The ball has a position and momentum. Here's a gif illustrating the situation: So the way it works is, the ...
• 111
75 views

### How to rotate spaceship quaternion to face target direction with constant angular speed?

I have an enemy spaceship, and I want to make it turn to face the player with (for now) a constant angular speed. The ship's orientation is a quaternion. How do I do this? Since this is totally free ...
• 111
42 views

### Can't delete an edge

I'm new to Maya. I mirrored my box, combined and merged the pieces and tried to delete edges in the middle. I see in the channel box that the application registers the command, but edges won't delete. ...
94 views

### Calculate Up Vector of Object on Surface Given Points and Normals

Context I want to find the up vector an object would have if it were leaning on a surface, given a large amount of points on that surface and their associated surface normals (i.e., an equation that ...
• 21
51 views

### How can I convert .obj files into a 2D array of [x,y,z] coordinates and color values?

I have a cool 3D model I want to use, but for this program I'm working with, I need it in array form, with each point's coordinates and color value. I've already voxelized the model using this tool, ...
36 views

...
117 views

### How to achieve camera zoom-In effect and locking view during NPC Interaction in Unity

I am currently working on an interactive game in Unity 3D where, upon pressing the "E" key, the player character interacts with an NPC. During this interaction, I aim to implement a camera ...
• 45
1 vote
77 views

### How to call every method with a certain name from a set of classes in C#

I have the following case: I have a class called App.cs and here I have a function called Render, that runs once every frame: ...
• 111
34 views

### Ray-Sphere Intersection Always States Ray Origin Is Point Nearest Sphere Center

I am writing a simple graphics engine using Rusts WGPU. I have a Sphere rendering at the origin of my scene like so: ...
1 vote
145 views

### What specific lighting property creates "the unity look"

Nearly all unity games have specific "unity" look. It is quite obvious that it is caused by the rendering pipeline and shading, but I was wondering which specific part is responsible for ...
• 155
71 views

### Vulkan Phong shader problem

Light increases its intensity as it come closer the origin model. Vertex Shader: ...
76 views

### Weapon jitter when playing FPS animation

I extracted drg's auto cannon, and the gun and arms are separated models. When I try to get them into unity, something wrong happened, I tried a lot of methods. Like using script to attach, using ...
56 views

### Concept Shader to achieve such Toon/Graphical Novel look style

Hi to all, I have no clue how to achieve this kind of style (DallE Ai picture) by having a shader and custom textures applied to a 3D object. I see an outline (maybe sobel on normals and depth), and a ...
50 views

### Cinemachine FreeLookCam stays in "bottom rig" and won't switch to other rigs

I have an issue with Cinemachine. I set it up to follow and look at the "player," and I added the script recommended by another user: ...
6k views

### How can I help my unpaid 2D and 3D artists improve their portfolio?

I'm part of a 20 people team working on a game for free but we've got intentions of starting a company soon. At the moment, not even the prototype is finished, but we've got 6 artists, half 2D and ...
• 121