Hot answers tagged

4

Actually every face of your mesh has UV coordinates through which UV mapping works. Let take an example of cube. Cube has 6 faces and every face has 4 coordinates. That means a Cube must have 24 coordinates for UV mapping. Now second part is to map coordinates with texture. Let's take an example of a square texture image having 6 different color boxes ( ...


3

One approach could be to start with a sphere, perhaps pick some random parameters to stretch it varying amounts so some rocks are roughly round, while others are roughly egg shaped, then use 3D perlin or simplex noise and it's fractal variants (see the fbm methods in the link) to push vertices in towards the center, or pull them out, by some multiple of the ...


2

You seem to just show the foliage at pre-determined distance. Why don't you lerp foliage opacity between transparent and opaque across some distance range? Could be the simplest most noticeable improvement.


2

What you want, is a rotation around the local y-axis when either A or D is pressed. With the standard assets, this can be achieved quite easily, with the Input manager. To alter the settings, go to Edit->Project Settings->Input. You should now see the settings for the Input in your Inspector window. You want to change the Horizontal movement, so expand ...


2

Open up the FPSInputController and CharacterMotor classes. Look at how FPSInputController reads keypresses and then sends a command to the CharacterMotor. You will want to create two new commands to pass (or possibly more, I've added "crouch" and "sprint" to mine, you're looking for "rotate right" and "rotate left"). You'll have to define new inputs as ...


2

The idea is that you extrude the object vertices along their normals. First render highlight: Render the object with disabled z write but enabled z test. Vertex shader: to each vertex add normal * highlight size before you pass it on Fragment shader: render only color, don't apply lighting Then render the object: Render with z write and z test ...


1

I would assume that most (popular) 3D model formats are basically just storing coordinate positions for all the vertices that make up the model. They probably also store texture/theming information about each polygon (that is formed by combining 3+ vertices) For games, we will almost exclusively use triangles for the final geometry (although for ...


1

When I create rocks in modelling softwares, I start from an icosaeder, fhen stretch it around, scale it a nit, then I just pick random vertices and I pull them a bit out. I suppose, the same can be made with code


1

If I understand you correctly you are having problems going left and right. First off currentFrontSpeed should never be negative since it's speed not velocity. Speed is a scalar and as such should not capture any direction and will always be positive. To move in different directions you should modify the angle instead where for example right is -90 from ...


1

A possible way to solve this problem is to draw your shapes on the table texture, and then apply that modified texture to the table geometry. This would allow you to keep the shapes at the exact same level as the table, and removes the need for extra geometry to handle them.


1

Picking is not generally performed by the GPU so the use of instancing shouldn't matter. Your CPU-side code presumably knew where the cubes where in order to put their transforms into the instance buffer. Hence it can do a ray-AABB test by transforming the picking ray into the space of the cube in the cube's local space. Happily, the local space for the ...


1

Collada (.dae) files seem to have support, according to 5-51 in the 1.4 specification: The <instance_geometry> element instantiates an object described by a <geometry> element. Collada is supported by most platforms.


1

Ok, so just of the top of my head your going to want to make a new circle(2d) and apply a texture to this then write something along these lines (and attach it to the object) Pseudo code: private gameobject player private float scale; update{ face the player (using transform.lookat(player)) float distance = ...


1

This question popped to the top because of Aeroson's answer (above/below/adjacent/falling in bits around this one) and thought I'd yoink my answer from this question in the event that it was useful to someone. What the below shader does: Downsides: not a mobile-friendly shader, due to using the stencil buffer and rendering the object twice (depending ...



Only top voted, non community-wiki answers of a minimum length are eligible