Jump to content

  • Log In with Google      Sign In   
  • Create Account

eppo

Member Since 14 Mar 2008
Offline Last Active Aug 27 2016 03:48 AM

#5125027 Same vertex, but different UV?

Posted by on 20 January 2014 - 06:17 AM

You can indeed bind multiple vertex buffers, but you can only bind a single index buffer. You'll always read from the vertex streams with a shared index.

 

Mesh resolutions have become higher and thus smoother, resulting in less duplication needed, so in a way it has been addressed/minimized.

Compared to a few duplicated vertices, having multiple index buffers would only have higher demands on memory, because then every vertex is guaranteed to carry extra information (a fixed set of indices).




#5111064 Texturing Custom Meshes/Terrain

Posted by on 21 November 2013 - 02:06 PM

Vertex splat-masks simply store their weight data at the vertex level (like vertex-normals, uvs etc.). They don't require uv-maps, but their drawback is the underlying vertex resolution needs to be high enough to be able to capture the desired amount of detail.

 

If the base-textures themselves tile, you won't have to assign each triangle its own texture space. This way more terrain doesn't linearly scale with more texture data.

 

splat.png




#5110954 Texturing Custom Meshes/Terrain

Posted by on 21 November 2013 - 04:32 AM

I would calculate all the vertex data before I'd cut the mesh into chunks, that makes it easier to generate continuous data (especially for the normals). I agree with Krohm, your chunks seem too small; I'd store at least some several thousand primitives per chunk.

 

Can you explain a bit more what kind of texture mapping you're trying to apply? If you use tileable textures there's no need to keep uvs in the 0 - 1 range. Since you have a uniform grid of vertices, you could also consider using vertex weight maps as splatting masks.




#5104758 How to create custom bitmap font?

Posted by on 27 October 2013 - 07:32 AM

This one (http://www.nubik.com/SpriteFont/), which is oddly enough also named SpriteFont, has more features than BmFont.




#5102835 3ds max smoothing problem on the same polygons

Posted by on 20 October 2013 - 07:23 AM

There should be a "normal angle" setting that lets you set the angle above which neighboring normals are unwelded.

Also make sure there are no invisible holes caused by duplicate vertices that share the same position, or degenerate faces on such vertices.




#5098993 extrusion and dir

Posted by on 05 October 2013 - 12:28 PM

Yes, correct. If you want more control over the roll of the orientation you can pre-multiply it with a rotation around the z-axis.
 
If you were to do the same in a 3D modeling app, you would likely first extrude the shape and then orient it, though it's possible to first rotate the 2D shape and then extrude it along the matrix' z-vector component.



#5098937 extrusion and dir

Posted by on 05 October 2013 - 08:03 AM

My understanding is that the z-axis transformed by the matrix becomes the extrusion vector.

 

If you want a matrix that is the result of a series of rotations around the z (roll), x (pitch) and y (yaw)-axes: http://www.flipcode.com/documents/matrfaq.html

This page also shows how to set up a matrix that rotates the extrusion from its original z-orientation towards a second vector on the plane formed by the two vectors.




#5098909 extrusion and dir

Posted by on 05 October 2013 - 04:43 AM

Not sure what you are trying to accomplish, but it seems to me you are extruding a shape along the z-axis and want to then orient it in the direction of some secondary vector? Does the image show a top-down view of what you are trying to do? If you want to rotate around the Y-axis on the XZ-plane, you can use the following matrix (with v being the normalized "extrusion direction"):

 

[v.z, 0, -v.x]

[0, 1, 0]

[v.x, 0, v.z]




#5098904 Depth stencil state issue

Posted by on 05 October 2013 - 04:14 AM

- dsDesc.DepthFunc needs to be D3D11_COMPARISON_LESS.

- make sure you have set the correct culling mode in the rasterizer state (seems alright).

- make sure you bind the depth-stencil surface with OMSetRenderTargets().

dsDesc.StencilEnable can be set to false, unless you have some reason to use stencil-ops.

- enable the debug-layer.




#5098700 How C# computes Recursion

Posted by on 04 October 2013 - 02:41 AM

This is what your code does:

 

Fac(4)

= 4 * Fac(3)

= 4 * (3 * Fac(2))

= 4 * (3 * (2 * Fac(1)))

= 4 * (3 * (2 * (1)))).

 

It helps if you look at it from the bottom up:

- the lowest argument for x is 1 which is simply returned as 1.

- the caller function (x = 2) takes that result, multiplies it with itself (2 * (1)) and returns it

- the caller of that function (x = 3) takes that result, multiplies it with itself (3 * (2)) and returns it

- the caller of that function (x = 4) takes that result, multiplies it with itself (4 * (6)) and returns it




#5096440 What program to use to add alpha

Posted by on 24 September 2013 - 11:38 AM

Most Image editors let you interpret an image's alpha-channel as a (paintable) greyscale image. I know Gimp, Photoshop and Photo-Paint allow you to do this.

 

Another method is to create a separate greyscale image that serves as an alpha-channel. You can use the DirectX Texture Tool to load the image into the alpha-channel of an RGBA image to combine the two.




#5095950 php session manager help

Posted by on 22 September 2013 - 09:30 AM

if (!session_id())
session_start();


If you've implemented your own handler-interface (the Session class) you shouldn't call session_start() outside of it (as you do in process_login.php), because this would circumvent your database handler and use the default serializer instead. It also would populate session_id which would cause the "if (!session_id())"-test to fail.

 

Make sure this is done for every request (a session start also implies a session-restart):

$session = new session();
 
$session->start_session('_s', $_SERVER["HTTPS"] != "on");



#5095919 php session manager help

Posted by on 22 September 2013 - 06:05 AM

I'm not sure session_regenerate_id() properly uses whatever you have registered with session_set_save_handler. You may have to manually update the database entries that refer to the old id (at the end of start_session()).

 

What happens if you remove the session_regenerate_id() line altogether?




#5093281 Instancing : Different textures for instances

Posted by on 11 September 2013 - 08:54 AM

- Pass uv-offsets for different cubes as instance-data and add them to the base-uvs in the shader.

- If all cells in the texture are of equal size you can load them into a texture array and pass an array-index as instance data.

 

The second method has the advantage that all the cutting can be done either offline or during load time and it avoids filtering artifacts around cell borders.




#5075732 Moving head bone with mouse, need to create a view matrix

Posted by on 06 July 2013 - 10:25 AM

You can use the inverse of the m_pHeadBone matrix as a view matrix. This matrix lets you transform a scene into the local space of the head(-camera), as you effectively always do when multiplying by a view matrix.






PARTNERS