Tag Info

New answers tagged

2

That side force is the horizontal component of the road's normal with respect to the car's forward movement. Roads are banked like you are discussing to facilitate cornering at higher speeds without flying off the track from momentum pushing them to the outside corner. The banking pushes back in a direction the tires do not freely rotate and can hopefully ...


0

Generally, you have to use a bunch of matrices. With the traditional OpenGL pipeline, you'd have to mutiply these matrices: finalMatrix = modelMatrix * viewMatrix * projectionMatrix * viewport.windowMatrix; To find the position of the vertex on your viewport, just multiply the vertex by the matrix: onViewportVertex = in3dVertex * ...


1

I solved it! A friend of mine told me it's pretty standard if the material is not set to doublesided. (Or I could make a billboard out of it). But in code I had to add mat.side = Three.DoubleSide; Sorry guys for bothering you with this - it was probably quite basic but I'll leave it on just in case someone else encounters this problem!


1

Assuming that you want to compute the position that an arbitrary 3D vertex (x,y,z,1) has on the view plane after the projection: You can use the given parameters to compute a projection matrix: where f = cotangent(fovy * 0.5) This is also the matrix that will be set by a call to gluPerspective. Then, you can multiply this matrix with your vertex to ...


1

Your observation about the convex hull of intersection points still works in 3d & can be computed relatively quickly. You could simplify things by restricting the the orientation of the corridors. E.G. restricting to 90 degree turns reduces the 3d problem to a series of 2d problems.


2

They do whatever it takes to get the job done in the time allotted to the project. If that means working off of reference art or using existing assets that they have the legal right to use (licensing, etc.) then that's what they do. The kinds of schedules we pulled in game development pretty much required everyone to cut whatever corners necessary to meet ...


1

Yes, You can do this in very simple way by creating 3d Text/TextMesh for the text and Quads for images.


0

Yes it is possible and here is the documentation


-1

Raycasting is what you want. As far as I know Minecraft uses raycasting aswell. How it works is basicly, that you send a "ray", represented as a 3D vector from the middle of your camera. The voxel you look at then is the first one the ray " collides with. ThinMatrix made a tutorial on ray casting.


3

1. Creating textured model in Blender First, add a new texture by going to texture panel on the right. Select type "Image or Movie", click "Open" and locate your texture file. Then, move your mouse to the 3d view, press Tab to select the default cube, then press "U" and select Unwrap. Go to UV Image Editor: and select the texture: At this point, the ...


1

This projection matrix should do the trick: .tg {border-collapse:collapse;border-spacing:0;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px ...


3

I had a similar problem while trying to render a skybox. Mine was only a problem with .x files, but you might find some luck with this. It seems that the alpha is set to 0 on the rendering. My code inside the BasicEffect loop looked like this from XNA: currentEffect.LightingEnabled = false; currentEffect.PreferPerPixelLighting = false; currentEffect.World = ...


2

Since it looks like your model is loaded correctly by the pipeline, this is the most barebones solution that should work to draw it(I've just tested it). It is built with VS2015 and the most recent MonoGame DirectX template using the standard blender cube. public class Game1 : Game { GraphicsDeviceManager graphics; private Model model; ...


0

If the content load failed you should have got an error. But it's easy to check if something was loaded. Set a breakpoint and open up _model, you should have at least one ModelMesh within it, and it should contain at least one MeshPart. Have you checked if there's any effects to iterate in your rendering loop? Otherwise you might need to add a BasicEffect ...


1

As stated in the comments, drawing points is as simple as drawing GL_POINTS instead of GL_TRIANGLES, you'll need one vertex instead of three of course. Now to your non-structured input: Of course it is structured. It may not be in the format OpenGL expects, but it definitely has some sort of structure, some format you're able to parse. In case of a ...


1

The simplest solution to this would be simply buffering the vertices into a VBO like you normally do, then rendering them as GL_POINTS instead of GL_TRIANGLES or GL_TRIANGLE_STRIP. This will give you a cloud of dots, that you can rotate the usual way with your vertex shader. If you want nicely sized circles, you should use a geometry shader to create a ...


3

Let's call the vertices of a single triangle v1, v2, v3, and the colours of those vertices c1, c2, c3. The general start to filling in your polygons is as follows: iterate over every pixel of your screen for every x/y coordinate calculate the barycentric coordinates b1, b2, b3 with respect to the triangle you are trying to draw. You can find formulas on ...


0

Just like to say that I have little experience in the lua language BUT, If you take the x y z position of your model "Freddy" and the x y z position of all your other bricks, from there you could find the distance between "Freddy" and the brick and whether the color of that brick is black or not. Then when "Freddy" is a touching distance from the brick, ...


0

Since in OpenGL, by default, negative z is out towards the 'camera' and positive z is forward You're wrong. OpenGL uses a right-handed coordinate-system where x is right, y is up and z is into the camera, therefore negative z is forwards.



Top 50 recent answers are included