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
0
votes
0answers
16 views

Pile of objects & collisions

I’m designing something which has a rather large number of 3d roundish objects and needs collision detection, in the best way I can muster. The user can move her fingers through the pile of objects ...
0
votes
1answer
30 views

How do I calculate a line segment that is a certain number of degrees from another line segment?

I have a line segment that is at an arbitrary angle in 3D space. I want to (in code) draw another line that shares an end point with the first line and has an angle of arbitrary degrees between them. ...
0
votes
1answer
40 views

Plotting a pseudo 3D globe

I would like to plot a small globe where the main character can walk, exactly like Sonic & Knukles Bonus Stage. For those who won't google it, here is a picture. I am familiar with Raycasting, ...
0
votes
2answers
43 views

How to make player seem bigger / world smaller, without changing world coordinates

I am making a voxel game with OpenGl, I've got the major parts working, except the camera seems small compared to the the blocks. How do I make the camera bigger? Do I do a scaling on the model ...
0
votes
0answers
21 views

How to fix normal map in unity

hey, I'm just using unity, I'm having a problem with the normal map, like the picture above, if I use blender I just need to change the sRGB to non-color data, but when I import it to unity using the ...
0
votes
2answers
160 views

Rotating camera in 3D without yawing diagonally

I'm programming a C raytracer. I'm having trouble getting the camera to rotate the way I intend. I would like the camera to rotate by pressing keys: F & H rotate left & right around the world'...
1
vote
0answers
27 views

Unity XR Spectator Camera

I would like to have a VR camera (for the player) but also have another camera (spectator). I am using Unity 2019.4.8f1 on the Universal Render Pipeline I have only been able to find outdated articles:...
-1
votes
1answer
25 views

How would I detect a collision between a rigidbody and a static

I have an object with a rigid body. How would I go around detecting collisions between this object and any other object with a collider on it? I know you can enable/disable collision detection (https:/...
0
votes
2answers
43 views

Mesh shaded as single pixel

I am trying to procedurally generate planets in Unity. The actual planet is already done, but now I am trying to add clouds. For this I created a PBR-Graph shader that draws the clouds based on some ...
0
votes
0answers
16 views

Efficient acceleration structure for moving 3D objects in scene

I am implementing a 3D FPS game in C++. The game has large outdoors areas with both static and dynamic objects in the scene, with the following implicit assumptions: Static objects: Do not move ...
0
votes
0answers
53 views

I want to create a 3D game in unity for wolf and sheep game. So, how can I set up pieces and move them using C# code?

This is the approach that I have made so far in the code that I have written. Based on the output in unity received from the code, I can see 4 white pieces on one end and 4 black pieces on the ...
0
votes
1answer
31 views

How to re-calculate orientation vectors when one of them is being changed?

I want to implement a Unity-like API for my transforms, with the ability to set forward, right, up vectors directly and change object's rotation quaternion accordingly. I got stuck at the math behind ...
0
votes
1answer
42 views

Unity3D multiple objects user rectangle selection

I wish to allow the user to select multiple units by click and drag as most RTS do. The issue I have is that the tutorials are either in 2D or only use the ...
0
votes
1answer
31 views

Formula Racing Physics in curves (under-steer, over-steer)

I have a working physics code for a -let's say- WipeOut-style vehicle [well, closest approximation]. Some time next year I would like to do a formula game but am struggling to get to tweak my code to ...
0
votes
3answers
51 views

How to calculate a direction that will turn a parent so that a locally-rotated child is faced in a given direction?

Imagine an old sailing ship with cannons: they're pointed out at 90° angles from the ship's hull, so in order to fire them, you have to turn the whole ship so that the cannons are pointed at the ...
-1
votes
2answers
68 views

How to load 3D modells when they are necessary

I'm working on a 3D game engine, currently I load ALL of my 3D modells into the memory when my game starts, but obviusly there will be hundreds of 3D modells, so somehow I should unload them when they ...
0
votes
0answers
27 views

3D visual effects on videos

I'm trying to get some hands-on experience with 3D visual effects on videos. Similar to those AR apps, I want to add a 3D model with effects, say a dragon, to a video. Something like this famous demo: ...
0
votes
1answer
32 views

Change Unity 3d viewport shortcuts to match Blender?

The shortcuts in Unity are more similar to Maya (Alt+Middle for 3d orientation, LeftClick select, etc). I've looked into Edit -> Shortcuts but couldnt find them. Is there any way to do this?
0
votes
1answer
25 views

An error comes up in console when trying to enter play mode in unity

Hay folks, i pray for everyone's wellbeing. I want to ask a question that whenever i enter playmode in unity, error message is displayed even though there is nothing in the console. This doesn't get ...
0
votes
1answer
67 views

Unity3D - Despite using Time.deltaTime, my camera and player move faster at higher framerates

I'm pretty new to c# and Unity so I wouldn't be surprised if I had made some stupid mistakes, but as far as I know, I don't think I misused Time.deltaTime. Any help would be greatly appreciated. ...
1
vote
1answer
86 views

How to sort polygons without a depth buffer

Please help me getting understanding how did they sort polygons in old games from the eighties. They did not use z-buffer or anything like this, thats for sure. Please look at the screenshot. How ...
0
votes
0answers
30 views

Saving mesh and instance data on the GPU?

I am trying to optimize drawing a large number of voxels by using GPU instancing in Unity. I am currently using Graphics.DrawMeshInstanced in a script Update(), but it occurred to me that I am still ...
0
votes
2answers
104 views

Can a game world be made using a 3D editor?

I'm just wondering it it's possible to create and render a game world in a 3D modelling program, such as Blender, with landscapes and trees and such, and then import it into a game engine? Is that how ...
0
votes
0answers
27 views

Sorting armor sprites over body sprites in 3D

I'd like to use sprites for my characters in a 3D game world, but I'm having issues getting them to cooperate. I want to have my characters to have outfit/appearance customization options, and so to ...
0
votes
0answers
12 views

How do you convert an object to camera view with a matrix

I've been stuck with this math problem for quite some time. I'm trying to convert an object to viewport coordinates, similar to gluLookAt. I tried putting the ...
0
votes
1answer
30 views

Animation via AnimatorController created in script does not play in Unity

I have created an empty GameObject and assigned it a script: Main.cs. ...
0
votes
1answer
27 views

Rotating projectile in direction it is moving

I am using a parabola curve to launch my arrows: ...
3
votes
0answers
33 views

How to find the smallest distance between two 4-sided objects in 3D space?

I was wondering if there is a way to calculate the smallest distance between two 4-sided objects in space. In this specific scenario, the only information I know about both of them are the 4 points ...
1
vote
0answers
43 views

What's wrong with my normal map implementation?

I'm trying to write my own 3D engine from scratch in C, and right now it can render spheres, but I wasn't able to perfectly implement norl maps. All of the resources I've found online about normal ...
0
votes
1answer
89 views

Cube doesn't render as expected when rotated (representing 3D in 2D)

Cube. When I rotate the object around OZ moves to the left. Rotation around OX - the cube rises up. Rotation around the OY-the cube is compressed. The function I use for rotation: ...
1
vote
1answer
28 views

Calculate UV sphere vertices (altitude)

There is an fantastic answer by DMGregory here where he explains how to calculate and generate the vertices of an UV Sphere: OpenGL calculate UV sphere vertices Based on his code, how can we change ...
0
votes
0answers
22 views

How to move 2D obstacle on Z axis in Javascript and HTML canvas?

I am trying to make a 3D-ish game where the player must dodge obstacles coming at them on the z axis. I have been trying for a long time to find a way to make it look like an object is moving on the Z ...
0
votes
0answers
79 views

Can I set the unity camera to have the same position in a real world?

I have a problem about setting the camera in the unity to have the same extrinsic parameters as my real world camera to the origin. So let's me describe my problem step by step. I have a camera in a ...
4
votes
3answers
1k views

How does 3D mesh morphing work?

In the Sims 4, you can drag to reshape the face and body when you create a sim. You can see a similar system implemented in this Body Visualizer. How can I implement similar geometry morphing in my ...
0
votes
0answers
21 views

Using Ray Marching to render object intersection in unity

I recently watched a Video where a person rendered only the intersection between two 3D objects. How do I implement this in Unity? Note: I am only looking to get a render with 2 colours (one for a hit ...
0
votes
0answers
23 views

C++ OpenGL Arcball controlls 'flipping direction' after crossing any of the axes

hello graphics developer... I want to implement something like the mouse rotation controls found in 3D modelling software like MeshLab Here is the code in the mouse callback: ...
0
votes
0answers
24 views

How can I draw filled triangles with the illusion of color?

So I have used the code of this website for drawing filled triangles. But I would like to improve my game by adding the illusion of color. Well sadly I made my game for the monochrome Nokia 5110 ...
0
votes
0answers
31 views

How to make an arrow / marker point to the offscreen object in 3D space?

I'm trying to create an off screen indicator. An arrow that would move around the screen to point to the target in 3D space. Something like this: I wrote this script, but the problem is that it ...
0
votes
1answer
57 views

How to create pixel graphics in 3D?

I stumbled across this game on itch.io: Backland After trying to find information on how to accomplish the same graphics, I found this tutorial: Youtube Video How can I accomplish this 3-dimensional, ...
0
votes
1answer
25 views

3d points to rotation matrix of orientation

I have a vector in a 3D view, defined by a point p1(x1, y1, z1) and a rotation r1(x1, y1, z1). I can get a direction and a yaw. I need that vector to point another point p2 (x2, y2, z2). So I need a ...
0
votes
0answers
67 views

Is making an acceptable 3D engine possible using only SDL_* functions?

I've been watching Javidx9's 3D engine series and I decided to start making it with SDL because it was something I had heard of and seemed simple enough. I'm not going to implement too complex ...
0
votes
1answer
64 views

What is the best way to create a square grid in Unity?

So I need to create a square grid like the one below. And be able to click on a square, the square you chose then is filled with a different color as well as all the squares right and below the square ...
0
votes
0answers
21 views

How do I implement a crouch script in this code?

So I've been following a video of Brakeys for the first person movement and i was wondering if there were any code to implement a crouch button/action ...
0
votes
0answers
21 views

Rotate 3D object along Perlin noise direction

I have a 3D object I'm moving with a noise function and I would like it to face the direction it is moving in, so far I broke down the problem into the 2D plane. I did this for the xy plane and the xz ...
0
votes
0answers
14 views

How to check if line of sight is blocked by a sphere? [duplicate]

Well, I'm trying to check that both players can see each other, and their line of sight is not blocked by a sphere(point with radius) Here is a simple 2D visualization Here is my code template: <...
0
votes
0answers
47 views

Correct distortion resulting from ray-marching

I am trying to combine ray-marching-algorithm and conventional rendering methods. My aim is to render a sphere and a corresponding atmosphere that gradually vanishes into space. It works' pretty fine ...
2
votes
0answers
42 views

Avoid shaking artifacts in 3D continuous collision detection

I am programming a 3D game physics engine that uses continuous collision detection to avoid my objects from being able to "tunnel" through the geometry. Here is basically how it works: Execute a ...
0
votes
0answers
22 views

How to make a fixed angle relative between player and camera when player traverses around sphere

I tried a lot of things as of now but nothing worked for me. This was my latest approach but the camera always stays at a fixed angle relative to world space and not to my player. ...
0
votes
0answers
36 views

Implementing W-buffering in modern GPU

I was trying to figure out how perspective projection matrix works, and somehow I ended up in this rabbit hole of depth buffer precision. It seems to be some interest in a depth buffer where the ...
0
votes
1answer
29 views

Algoritm for scaling an 3D model with fixed edges

I am looking for an algorithm that allows me to scale a 3D model with certain fixed edges. For example scaling up a window should have the frame remain a fixed width while the length of the frame ...

1
2 3 4 5
36