Showing posts with label Dissertation. Show all posts
Showing posts with label Dissertation. Show all posts

Tuesday, 22 July 2008

Painting on a 3D model

Well today i got the disseration in such a state that I can start thinking about painting on a 3D model with a soft brush.
Here is a screenshot of the hard brush i am using currently for painting on a 3D model, and the generated rendertarget:

The rendering is done by moving a brush over a 3D model and drawing a circle at the texture coordinates under that point in a shader.
It's not yet anything advanced but the next one is going to either use joint springs or particle systems to achieve a brush like effect.

Wednesday, 16 July 2008

Dissertation Shaders

Ok I found out what went wrong yesterday.
First of all the circle radius is so big that it encompasses the complete model so we won't see a nice circle, that has no been fixed.
Second was that the origin most likely was passed wrong which is now fixed as well. To do here is to get the actual collision point to be circle origin but that isn't a big problem.
The actual thing now looks something like this:

It's input is still all slider based but at least the shader works as I had expected it to work. And the color passing is a bit off but that is an error in bit shifting I think I made.

Tuesday, 15 July 2008

Effect rendering

Today i fixed the effect and shader rendering part of my dissertation it now should look like this:

The fx file adds a circle arround a certain point in the texture passed on parameters like:
  • Circle origen in texture coordinates
  • Circle Radius
  • Circle Color
But the actual end result more look like this, circle color is turqoise in this version:


So my next step is too see what the hell is going wrong in the shader that isn't going wrong in RenderMonkey. :(

Friday, 11 July 2008

Dissertation

As far as the dissertation is going I am now trying to implement shaders through DX effect files. I am doing this as the paint brush is much easier to create inside a shader. After talking to my supervisor we both agreed that the pipeline approach which I was using before wasn't a good idea.
It isn't a good idea mostly because it's slow to develop, when using shaders you can use packages like rendermonkey and fx composer.
Besides the goal was to create the virtual brush using shaders anyway in the end.

Saturday, 14 June 2008

Dissertation progress update

After another ten days the dissertation is finally looking like the end product should. The application now loads an .x file on command and we can change the mesh at run time. The collision detection for the mesh is implemented and the vertex color is changed when the mouse moves over the mesh.
The next tasks to do is to actually render the pen color in to a texture and display that instead of using vertex colors.
Here is a screenshot:

Thursday, 5 June 2008

Projection errors

OK the error I had in the previous post has a very easy solution the projection matrix was setup wrong.
Instead of setting it in "OnD3D9CreateDevice" part of DXUT it needs to be set in "OnD3D9ResetDevice".
It now looks as following:

X files rendering

After a week wrestling with DX 9 again I got an x file to render. When I tried this last Christmas it wouldn't render for the world of me. Apparently the tutorial in the DX sdk are a bit out of date. When I started looking at the function calls involved I found that I wasn't supplying everything. It now renders although I have minor camera problem with the rendering so thats the next step to figure out.
Remeber in the following screenshot light is on in the first and off in the second to show that textures are also working: