Jump to content

  • Log In with Google      Sign In   
  • Create Account

deftware

Member Since 19 Oct 2005
Offline Last Active Yesterday, 11:56 AM

Posts I've Made

In Topic: Low level serialisation strategies

24 August 2016 - 01:52 PM

I use a simple set of functions that I hand-wrote in C for writing all kinds of things to a buffer called a 'message'.

 

I have ones for writing 32-bit integers, floats.. Others for writing floats as a single byte, with a min/max range specified for the value. So if I have a float that's expected to be between -1 and 1 it will go ahead and pack it down into one byte, then on the other end a corresponding read function for re-constituting the original -1 to 1 float from the single byte.

 

I also have read/write functions for quaternions, angle-axis rotation velocities, of different bit counts so that in cases where I want to dispose of some accuracy for smaller amount of data, I can. A quat, for example, can be conveyed as either 24-bits, 32-bits or 64-bits. An angle-axis velocity can be conveyed in 40 bits or 64 bits. etc..

 

I can also read/write 3D vectors at varying bitdepths, specifying min/max values to map each vector component to all the bits allowed.

 

I don't think I will ever just read/write full on precision data structures, unless there's a case where that's absolutely necessary.


In Topic: Is it pathetic to never get actually helpful answers here?

15 August 2016 - 07:02 PM

The really tough problems I had to solve I asked about on this forum, but already knew pretty well that it was unlikely anybody had pursued anything similar that would see my question on this forum. Mostly I didn't receive any replies at all and ended up figuring things out on my own. I can attest to the fact that asking questions about complicated and highly specialized things probably won't bode well. I don't know what your questions have been or what sort of replies you've been receiving but I do know that a single forum should not be the compass you use to determine what it is that you enjoy doing.


In Topic: Theory Behind These Uncharted 4 Bullet Trails

08 August 2016 - 09:20 PM

I don't have any experience with Unity, I've always been a hardcore DIY type. I'm sure it can be pieced together pretty easily. The trick is treating the 'ribbon' (as it were) as just a line of points, ie: connect the dots, and generating the actual quad-strip vertices from those in screen-space. From there it's all about just how you animate the texture across that geometry, making it look like it's drifting down the strip and also drifting in the breeze by randomly pushing the points along the ribbon randomly and in accordance with an overall breeze velocity, I would imagine.


In Topic: Theory Behind These Uncharted 4 Bullet Trails

04 August 2016 - 09:16 PM

It appears that they are just using a quad strip particle effect and allowing the vertices to drift - this could be achieved by simply generating a single strip to submit to the GPU and then sending a time variable to the vertex shader which then randomly drifts the vertices while fading out the alpha. The goal here is to have the strip facing the camera, which is pretty simple to do, it's virtually the same as having a billboard face the camera. The texture coordinates of the smoke trail could also be allowed to drift lengthwise down the strip at a decelerating speed whilst also spreading out across the width of the strip to create a more vivid dispersal effect.


In Topic: 2.5D Movement Problem

27 July 2016 - 11:48 AM

The solution is very simple: divide the rendered X coordinate of the object by it's Z (or depth) coordinate, and offset to the center of the screen.

 

You may have to add a scaling and add a bias on there but it will work great. That's how 3D perspective is achieved to begin with.


PARTNERS