Jump to content

  • Log In with Google      Sign In   
  • Create Account

PhillipHamlyn

Member Since 20 Jul 2012
Offline Last Active May 05 2016 02:26 PM

Posts I've Made

In Topic: Planting Map / Texture Selection Stencils - Best Format ?

21 February 2016 - 02:32 PM

I pretty much answered my own question. If I use a set of BC1_UNORM planting maps I can cram three "planting schemes" into each single textures and costs me only 4bpp. So for a set of 9 possible textures I use three BC1 textures which costs 12 bpp. I can interpolate freely between all three, and this seems quite efficient. If there are any other schemes out there I'd be interested in knowing still.


In Topic: Should I always use float4 ?

21 February 2016 - 01:35 PM

I recenty converted from XNA4 to SharpDX11 and had a nasty shock because of the need to byte-block align all my constant buffers. Its the only case where I think you need to pad your input to the shader to use space which is "larger than needed" by your application. Because your question is about VB specifically I realise this does not directly relate to your query, but worth pointing out.,


In Topic: Imposter Transitioning to Mesh

26 June 2015 - 12:45 AM

I created a simple demo on this using WebGL. The blog post detailing what is happening isn't finished but in the mean time you can look at the demo and see what I am doing in the ModelWarpVS shader. 

 

https://dl.dropboxusercontent.com/u/20691/AAImpostor.html

 

Looks great, I'm looking forward to your blog post.


In Topic: Imposter Transitioning to Mesh

03 June 2015 - 12:58 AM

@Crossbones

 

Thanks for your detailed reply. I guess my problem is that if I instance the trees (i.e. one tree mesh, displayed 'n' times using hardware instancing) then I need to flatten my mesh (all branches become seperate vertexes) and that pushes it to 5k vertexes. If I leave my model as an instanced mesh (800 vertexes) and use hardware instancing to generate the different branch + leaf transforms then I can't use hardware instancing to render each tree - unless I manually combine my "model" hardware instances with a "world" hardware instance array at runtime using a dynamic vertex buffer. Although that is possble, it does seem to me that I'd be getting my CPU to do a lot of work preparing a pretty large instance buffer.

 

LODding my model certainly seems to be the only proper way forwards to prevent popping.

 

Phillip


In Topic: Trying to understand internals of visual scripting.

31 May 2015 - 10:47 AM

Why not just allow the scripter to use C# and the built in .net C# compiler to do the heavy lifting for you ? No need to interpret anything then - just pass into the script node the current state (depending on what you are allowing them to script) using a proxy over the top of the game engine, and then let them manipulate the proxy - you can then decide which of those proxy changes you want to write back to the engine data at runtime. The proxy you pass in will be an engine you can extend when you want to, and would probably follow a factory pattern;

MyScriptClass : IGameScript
{
    void Execute(IGameState gameState)
    {
        IPlayerLocation playerLocation = gameState.GetPlayerLocation("Player1");
        playerLocation.Translate(10,0,0);
        gameState.CommitChanges();
    }
}

I've not used this approach in a game, but its a common plug-in paradigm. The only novel factor is compiling on-the-fly which is built into the .net framework anyhow. You certainly wouldnt get any performance issues out of the scripting engine then. I have to admit I'm not a game designer, but this wouldnt be an unusual solution to run-time modification of a "normal" business system.


PARTNERS