Jump to content

  • Log In with Google      Sign In   
  • Create Account

ddengster

Member Since 19 May 2008
Offline Last Active Mar 29 2014 08:38 AM

Topics I've Started

Different types of meshes and how to structure them in code

28 February 2012 - 01:03 PM

Hi, I'm trying to design a class hierarchy that different types of meshes will use.
They all will share a base class cMesh, and different types will derive from them.

So far, I've heard of these kinds of meshes that are different from the normal onces:
Skeleton-mesh
Skinned mesh
Rigged meshes (does this count?)

What other subsystems are needed to say, get a skeleton mesh working? (physics rigid body dynamics?)
In the case of a skinned mesh, I've been told it blends between vertex weights, and so need an animation system.

Also, is it wise to integrate animation components into my mesh classes? Or should they be seperate?
Plus, would appreciate it if you guys can bring up some other kinds of meshes that might matter.

Thanks!

'Mixing' Shaders and code to shader organization

25 February 2012 - 02:14 AM

I've been exposed to shaders for a short stint, and have been exposed to a number of lighting techniques.
I have a couple of questions regarding shaders:
1) What are some kinds of techniques that can be integrated into existing shader techniques?
Example: I have a basic Per-pixel lighting shader up. Can I integrate shadows into the lighting equation with minimal effort?
How about deferred shading, HDR lighting, etc? Can all these be combined into one shader that is used for objects that need to be
lit up? Or are there some kinds of techniques that if 'you choose technique A, you forgo technique B'? (Would love it if you can give an
example here)

2) How costly can setting uniform variables per frame be? I'm thinking of supplying some constant variables(example: WorldViewProjectionMatrix) to all shaders so there's no need to write extra code to constantly supply that uniform variable.

[DX9]Controlled runtime alpha texture blending with restrictions

05 July 2011 - 11:09 AM

Hi, I'm looking for ways to do controlled alpha blending with textures with DX9.
It has to work like this:
I specify an alpha value from 0 to 255, and the sprite will change its opacity accordingly.

I cannot use D3DXSprite, so please do not tell me about that.

From google/gamedev.net, the solutions I found are:
1) Shaders ( too complicated for now )
2) Have 1 Light source and a material for each sprite (leaning towards this one)
3) Texture Alpha blending - LockRect and set the alpha values (disgustingly slow)
Msdn article
4) Add a diffuse colour member into the FVF, then somehow set some blending render states to
achieve the alpha blending effect. To change the opacity, I'll have to lock the vertex buffer
and change the appropriate alpha values. I'm not very clear on this method(tried as many
combinations of renderstates/blending as I could), so it would be nice if someone linked a tutorial on this.

Thanks

Overloading new/delete for certain sections of code.

19 May 2008 - 02:53 AM

Hi, I have been told to overload my global new/delete operators such that my memory pool can use it. Problem is, when I overload them, the stl vectors etc. will give me runtime problems. Is there a way to overload new/delete operators such that my portion of code uses the overloaded operators while the stl portion still uses the normal new/delete? Or is this a classic case of why no one should ever overload the global new/delete operators? FYI: I already know that I can overload class-specific new/delete operators, but its not what I'm looking for.

PARTNERS