Questions tagged [clipping]
The clipping tag has no usage guidance.
59
questions
0
votes
1
answer
32
views
Lower Near Clipping Plane
I've searched everywhere and can't really find a good answer... Even with my near clipping plane set to 0.01 the objects are clipping too close.
Tried to get a view where you can see it clipping a ...
0
votes
0
answers
28
views
How to implement and understand Clipping
I am writing a 3D renderer from scratch in Python using PyGame and Numpy. I have the basics implemented, which are working well. I have noticed that when you get too near to objects, the objects ...
1
vote
1
answer
183
views
What's the purpose of this cross product and dot product in triangle clipping code?
I have this code that inserts a triangle into the drawing list. The PHD_VBUF structure stores one x,y,z vertex. If the vertex is behind the front plane, then ...
2
votes
2
answers
503
views
Orthogonal Camera Clip/Hide part of 3D model
How to prevent the Camera from Clipping/Hiding part of the 3D Model/Object?
I tried playing around with ...
0
votes
0
answers
120
views
Clipping walls in Doom-style FPS view
I have two points representing a line, and a player position. I translated and rotated the points around the player, and this works just fine.
Next I want to clip the resulting line like Bisqwit did ...
0
votes
0
answers
61
views
How to prevent Rigidbodies with restricted movement from clipping
My player is a rigidbody cube with a box collider that can push other "NPC" rigidbody cubes that also have a box collider. These NPC cubes have restricted movement either in horizontal or ...
1
vote
1
answer
481
views
Geometric clipping of triangles intersecting near plane
I was reading about how rasterization works but there is one topic I can't quite understand.
After perspective projection, our point is in clip space as I understand it.
Now we test all points in a ...
0
votes
1
answer
32
views
Player clips into the ground when I press the restart button
The title says it all. I have a subway surfers like game prototype, where I just added a restart button that can reload the scene. However whenever I press restart the charaters gets into a slightly ...
0
votes
1
answer
561
views
Render only a cross-section of a 3D scene in Godot
I'm working on a 3D game where I sometimes want to display only a cross-section of the scene. Ideally I would like this to be just the intersections of the scene with a plane. But the only way I've ...
-1
votes
1
answer
865
views
Calculate the near clip plane distance in meters from a certain object - Unity
How do you convert the near clip plane and far clip planes to position units, to be able to find out its distance to a game object?
1
vote
0
answers
59
views
Drawing a deferred decal when the camera clips its bounding geometry
I have a building grid effect that I decal onto my terrain using a cube that moves to follow the cursor.
You can see if the camera gets too close to the cube, it gets clipped by the camera's near ...
0
votes
2
answers
2k
views
Unity - Apply different Near/Far clip plane value for different layer
I am Lerping the Near value of my camera, from 0 to 38, and it gives this result:
change near clip plane effect
As you see, it gives a nice effect. But now I would like the effect to occur only for ...
1
vote
1
answer
70
views
Taking cube from camera space to clip space, error in my math?
watching Ken Joy's Computer Graphics lectures on youtube. One thing I'm confused about is after he gets the cube from the camera space to clip space, from my calculations the cube doesn't look like ...
0
votes
1
answer
99
views
Prevent Wall Clipping with Bouncing Shape
I'm currently working on a demo-type program involving bouncing objects. Currently, I have a rectangle that can bounce around the screen.
When the rectangle bounces against one of the walls ...
0
votes
1
answer
506
views
How do i prevent my player from walking through mesh collider
I have a character being moved using rigidbody.moveposition and I have an floating lowpoly island with a mesh collider. When my player walks into a steep slope or a wall, it passes right through. I ...
0
votes
0
answers
202
views
Perspective projection matrix with a non-orthogonal near plane
I'm trying to figure out a way to provide such a perspective projection matrix to a shader that the "near" plane wouldn't necessarily be orthogonal to the camera vector. More specifically, I'm ...
0
votes
0
answers
129
views
Why does this work in the fragment shader but not in the vertex shader?
I'm doing some model view and projection transforms in the vertex shader and I want to determine whether the current vertex will end up on the viewport or not.
After searching a bit I found that ...
0
votes
1
answer
261
views
Unity - Adding a sphere volume to this shader
I'm trying to create a spherical effect around my player that when they walk into range of hidden object, it gradually renders the object.
I found a shader that would work pretty well for this. When ...
0
votes
1
answer
104
views
What is the relationship between clipping and the fog of war concept?
I'm currently developing a 2D top down game and recently implemented clipping.
I understand clipping in a 2D top down game as rectangle or any other geometrical form which defines a viewport for the ...
0
votes
1
answer
819
views
How to clip what is outside scroll view when using a custom UI element?
I have created a custom UI element (that use CanvasRenderer).
Here is code :
...
3
votes
2
answers
5k
views
How to completely stop the camera from clipping into the ground
Hi I'm trying to do a basic Camera Collision in unity, for convenience, here's the entire script (I actually got most of it from someone else who wrote the comments, if that's necessary to know):
///...
4
votes
2
answers
2k
views
Is clipping done before or after projection?
Is clipping applied after projection or before?
How can it be applied after projection when a vertex is behind the camera and projected therefore mirrored?
At this time I clip the triangle before ...
0
votes
1
answer
570
views
Clipping Effect in Toon Boom Harmony 15.0
I want to do similar effect like this tutorial Masking Effect. The tutorial using Toon Boom Studio 8, I'm using Toon Boom Harmony 15 and can't seem to find the Cliiping Effect they use in tutorial. ...
1
vote
2
answers
166
views
How to clip 3D object in projection (octants)?
In example we've wrote some code in Pascal (graph unit) which rotates 3D object in oblique frontal (dimetric) projection in all octants positioned in center of them.
The projection's type:
The code ...
1
vote
0
answers
51
views
Algorithm for clipping convex quadrilaterals
I'm dealing with hardware that uses quads as its polygonal primitive. Not triangles. A triangle can be expressed by setting 2 of the 4 equal to each other for a degenerate quad.
For the 3D engine, I'...
0
votes
1
answer
250
views
MonoGame - render target drawn below other sprites and in the wrong location
This seems like a simple thing but still doesn't work. So I'm trying to draw a scrollable log window (not scrolling yet) by using a RenderTarget2D.
There are several bugs:
The text should be drawn ...
1
vote
0
answers
650
views
How to do Decal Clipping with OpenGL using Depth Buffer comparison?
Basically I'm already drawing decals on top of various flat surfaces and that works great.
As soon as the decal approaches the edge of a surface, naturally it doesn't get clipped.
Is there a way to ...
2
votes
1
answer
2k
views
Finding if 2 polygons intersect using clipper library
After realising my code was pretty inefficient at checking for polygon overlaps, I've turned to a mentioned library Clipper but finding it difficult to know hot to use it for this operation.
I am ...
1
vote
1
answer
634
views
Should I use the X-Y-plane when using an orthographic projection in OpenGL?
I'm currently at a loss rendering a tile-based 3D map with an orthographic projection in OpenGL. Imagine any isometric 3D game (using actual geometry instead of sprites).
Internally, the tiles of my ...
12
votes
2
answers
1k
views
Details of what GPU actually do when clipping in 4D homogeneous space?
I am learning programmable rendering pipeline by implementing a tiny software renderer. I try to implement it in a 'hardware' style. However, I am not familiar with the GPU pipeline and got some ...
2
votes
0
answers
229
views
GL.Scissor not working as expected
I have some code for rendering a button in an application and I want to clip the text if it's wider than the button itself. Here a bit of code to describe what I'm doing:
...
0
votes
1
answer
765
views
Liang-Barsky Line Clipping Algorithm
Is it possible to generalize Liang-Barsky Line Clipping Algorithm for n-dimensional space ?
2
votes
0
answers
230
views
Custom 3D Renderer: Frustum clipping
I have recently been toying with the idea of creating a 3D-renderer from scratch and, after looking into it, doesn't seem like such a behemoth of a task as it sounds. Last night, I was tossing and ...
6
votes
4
answers
5k
views
How to clip game objects to a rectangular area
I'm trying to figure out how to do this but am coming up short. I'm making a slot machine in unity 2d and would like to clip the tile prefabs when they leave a given rectangular area.
I can't seem to ...
4
votes
1
answer
511
views
OpenGL: How to map point inside frustrum to normal device coordinates (NDC)?
I read this article http://www.songho.ca/opengl/gl_projectionmatrix.html.
It's explain how calculate projection matrix coefficients.
But I completely can't understand how author perform mapping from ...
1
vote
1
answer
373
views
Does projection take place before clipping in the rendering pipeline?
At first I thought clipping happens before projection since new vertices may be added and the output of projection is in NDC which is 2D.
However after a lot of googling, I found that some articles/...
7
votes
2
answers
2k
views
LibGDX - Show a minimap
I've started to develop a small roguelike game in LibGDX. I've also made a minimap class, which creates and updates the minimap as the player explores the dungeon, by using a ...
2
votes
1
answer
950
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?
1
vote
1
answer
490
views
How to only render fragments with Z from 0 to 1 in OpenGL?
I have been using OpenGL for a year now, but I just recently found out that OpenGL only clips vertices when the absolute value of the x,y or z coordinate is less than the absolute value of w ...
0
votes
1
answer
3k
views
Discarding triangles in Unity
I have about 2+ years of experience in computer gaming development and I just started writing my own shaders to help me utilize performance. I have this problem that I'm trying to work around but ...
3
votes
1
answer
256
views
How can I use CCClippingNode to trim the top and bottom from a CCTableView?
I'm fairly new to Cocos2d and struggling with sizing a CCTableView. How can its height be controlled so that I have space at the top and the bottom?
I'm trying to ...
1
vote
0
answers
253
views
Cubic bezier polygon clipping
I have a large cubic bezier defined 2D polygon area which I need to render in DX11 real-time to create as many 4096x4096 textures as needed.
An average control point count would be around the 12k and ...
1
vote
0
answers
794
views
libgdx ScissorStack problem
Im making a user interface using libgdx
I created a Window class & a Textfield class, that both use clipping.
I use the ScissorStack class of libgdx for clipping.
The Textfield is drawn inside ...
0
votes
1
answer
2k
views
Can I use clipping with Unity Sprite in NGUI?
I used NGUI free version (2.7) with Unity 4.3. I have tried to use clipping to restrict the area of viewer by using clipping to hide some content of Unity Sprite. However, it did not work. If it's ...
2
votes
1
answer
1k
views
Performing manual clipping in OpenGL
I'm learning OpenGL and I understand that OpenGL performs clipping as part of the pipeline, but is it a good idea to also perform manual clipping? By manual clipping, I mean not asking the GPU to draw ...
0
votes
1
answer
672
views
How do I detect how much of an object has been "cleaned" by the player?
I want to let the player wipe some dust off of a book, then start a short animation.
Here's what it looks like:
I'm using a clipping region on the "dusty" book bitmap image to progressively hide the ...
14
votes
2
answers
2k
views
How do I create a World Healing Wave effect?
I want to change my dark and depressing background to a happy grassy background, in real-time, such that the happy background is shown in a radius around a game character.
A forcefield of happiness, ...
1
vote
2
answers
234
views
Moai: Clipping an image to a polygon
I'm using Moai SDK. I have an image and some random convex 2D polygons. I want to show only the parts of the image inside these polygons.
Here's an example image:
The same, shown only where the ...
0
votes
1
answer
270
views
XNA DepthBias increases performance even when EarlyZ is turned off. Why?
My 3d scene consists of three main polygons:
The first and the second polygons overlap each other (have the same World matrix and use the same geometry), the third one is perpendicular to the first ...
3
votes
1
answer
314
views
How Do Objects Not Clip Out the Back of Thin Walls When Put Through a Portal?
In Portal or Portal 2, let's say you pick up a cube and put it most of the way through a portal on a very thin wall. The cube should clip outside the backside of the wall. How does Portal do this, or ...