Stack Exchange Network

Stack Exchange network consists of 175 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 [clipping]

The tag has no usage guidance.

0
votes
1answer
37 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
0answers
36 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
0answers
35 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
1answer
41 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
1answer
75 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
1answer
44 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 : ...
1
vote
1answer
189 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): ///...
1
vote
2answers
135 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
0answers
11 views

UNITY Character Clipping through Enclosed Mesh [duplicate]

I have been figuring out how to use Unity over the past several months. So, recently I set up a very basic scene. It consists of a capsule collider for the player, a camera parented to the capsule, ...
0
votes
1answer
51 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
2answers
103 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
0answers
28 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
0answers
144 views

Rendering FBO with depth information

OpengGL 4.5 with LWJGL For my particle system, I have billboards that are rendered to an off screen texture. This FBO contains texture information, multiple render targets, a depth texture and a ...
0
votes
1answer
71 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
0answers
232 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 ...
1
vote
1answer
959 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
1answer
314 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 ...
10
votes
2answers
624 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
0answers
120 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
1answer
517 views

Liang-Barsky Line Clipping Algorithm

Is it possible to generalize Liang-Barsky Line Clipping Algorithm for n-dimensional space ?
2
votes
0answers
131 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 ...
5
votes
4answers
4k 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 ...
3
votes
1answer
410 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
1answer
258 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/...
6
votes
2answers
707 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
1answer
481 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
1answer
153 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
1answer
2k 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
1answer
238 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
0answers
200 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
0answers
633 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
1answer
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
1answer
678 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
1answer
272 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
2answers
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
2answers
224 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
1answer
197 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
1answer
230 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 ...
6
votes
1answer
350 views

How to prevent clipping when moving through a tunnel?

I'm developing for Android using OpenGL ES 2.0. It's going to be a game where you have to fly through a tunnel without hitting the walls. However, the tunnel wall gets clipped as the player ...
5
votes
3answers
734 views

Why does clipping take place after illumination?

Can you explain why clipping takes place after the illumination process in the rendering pipeline? Would it be not cheaper to clip first and do then the illumination?
3
votes
2answers
268 views

XNA Sprite Clipping Incorrectly During Rotation

I'm having a bit of trouble getting my sprites in XNA to draw when near the edge of the screen. Seemingly if you use SpriteBatch to draw then XNA will not draw it if for example (mPosition.X + ...
1
vote
1answer
472 views

Greiner-Hormann clipping problem

I have a set of planar polygons in 3D space defined by their vertices in counterclockwise order. Let's define the 'positive face' as being the face of the 3D polygon such as when observed, the ...
0
votes
1answer
180 views

What's the standard location of a 3D clipping box?

The way I understand 3D rendering, polygons are transformed using several matrices, and they are then clipped if they are not inside a certain box, before projecting the box onto the screen. Before ...
13
votes
4answers
8k views

Why the clip space in OpenGL has 4 dimensions?

I will use this as a generic reference, but the more i browser online docs and books, the less i understand about this. ...
7
votes
1answer
952 views

Puzzle game: clipping of non-convex polygons on the figures

I have an original figure in the SVG file. I need to break it randomly on parts, an example of which is specified below: I have an idea, to use for partitioning Voronoi diagram (Fortune's algorithm). ...
14
votes
5answers
7k views

How can I handle sprite sheets with nonuniform sprite dimensions?

For a spritesheet with non-uniform sprite dimensions, how can I get the bounding-rectangles for each individual sprite (i.e. the blue boxes in the following image / I only drew a few examples)? What ...
1
vote
0answers
1k views

Clipping polygons in XNA with stencil (not using spritebatch)

The problem... i'm drawing polygons, in this case boxes, and i want clip children polygons with its parent's client area. ...