Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Tasaq

Member Since 05 Nov 2011
Offline Last Active Today, 05:18 PM
-----

Topics I've Started

Decals with Texture Arrays

14 May 2013 - 01:24 PM

Hi,

 

I recently noticed that in demo from Microsoft sdk called DecalTessellation11 they iterate through every decal inside shader, and if it is within view, they perform displacement mapping. Is it ok do it that way?

 

The reason I ask this is because I want to do similar thing to my terrain, but in pixel shader (I don't want to do decal displacement mapping for now). My idea is to create two Texture Arrays, one for decals other for blend maps, so if I have 10 decals I got 3 textures with blend maps. I also would like to add decals that will be created during game, like burn marks or tire skids(so they don't need blend maps).

 

Would that be very expensive compared to other techniques? If yes what are other better techniques?


XNA terrain painting

09 May 2013 - 08:10 AM

Hi,

 

I have terrain code with fancy stuff done but everything is read from files (heightmaps, blendmaps etc.). I would like to make editing possible on runtime, like pushing the heightmap or painting with textures. My problem is I don't know how to get texture coordinates of place on map I picked with cursor. For example to paint a road on terrain with sand texture.

 

Also I am using tessellation + displacement mapping, so my vertex buffer cotains simple quad, which makes host side closest ray-triangle itersection test rather useless. Another thing is that I can use compute shader (I got access to dx11 features in my XNA project), so I have possibility to speed things up smile.png I am also using deffered shading so I got depth buffer stored in render target texture (maybe I can use that somehow?).

 

Any ideas how I can achieve what I want to do?


Mesh swap in XNA Animation

10 December 2012 - 04:43 AM

Hi,
I am learning how to skin meshes (never have I done it, so I think it's high time o.O), I am using ported XNA Animation Component Library to XNA 4.0. Everything works fine except one thing. I want to be able to swap meshes inside a model (for instance, say my character is a sword master, and I want to change his weapon in hand). I noticed that XNA animation requiers for all objects in my file to have weights (which I am not sure about). I am also using custom effects.
So do you have any ideas how to change mesh inside model with XNA animation (i.e. swap it with mesh from other model)?
I also want it to be animated so I need to create animation inside character model for my weapon Posted Image
EDIT:
Solved it, took me a lot time yesterday to search the internet and after posting a topic on gameDev i solved it in few minutes :)
For those who want to do same thing as I do and don't know how:
In my weapon file I created a bone named the same way as in my character model and I added skin modifier to the weapon and added that bone(I am not sure if it is required). then in XNA:
sword.World = character.modelAnimator.GetAbsoluteTransform(character.modelAnimator.BonePoses["weapon"].Index) * character.World;
(sword and character are objects of my class to store info that I use, like materials, animations etc.).
I also add a flag for proxy weapon in character model to not draw it :)

Assimp number of vertices

24 October 2012 - 11:08 AM

Hi everyone,

I am writing my own model class to use with openGL. When playing with assimp i noticed that there are always to many vertices. I created simple box in max (12 polys, 8 verts). When I load it with assimp it says it got 24 verts. When loading the model I added aiProcess_JoinIdenticalVertices. Without it mNumVertices says there are 36 verts (which seems more legit for me). I also tried different file formats but no luck. why it won't show 8? Am I missing/don't know something?

Occlusion queries for lens flare

21 September 2012 - 10:43 AM

Hi,
I want to make lens flare which soothly fades on the edges of 3d objects. Right now I am using OcclusionQuery, which works but not as I want. OcclusionQuery got a field PixelCount which tells me how many pixels are visible. I use a sphere for the test. But that makes a problem, because it's hard to say if sphere is fully visible that way.
The one solution I can think of is to find out how many pixels the whole sphere takes, then divide PixelCount by that number to get %.

Is there another easier or better way to check how much object is visible?

PARTNERS