News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Plot 3D Pixel to 2D screen

Started by Farabi, January 04, 2013, 03:01:20 PM

Previous topic - Next topic

johnsa

Just for reference, I was working a software renderer some time back, On my core i7 I was doing 5 million points at 35fps. That was the for the entire pipeline, 4x4 transforms, rotation, treating each point as a vertex and calculating phong shading params at each one, texture look-ups and drawing them to screen just as single pixels. I was using it as a test bench for optimizing my transform stages with simd/swizzles and breaking transformation up into blocks for parallel processing.

In terms of putting together a 3d engine for yourself, I also wouldn't advise doing your projection in this standard equation form. It would be much better to have the whole engine use homogenous 4x4 matrices. That output of a a projection matrix will give you what you need for 3d clipping (homogenous clip space), w coordinate etc. It also makes it easier to scale up to device coordinate space.

Farabi

Quote from: johnsa on January 07, 2013, 08:25:00 AM
Just for reference, I was working a software renderer some time back, On my core i7 I was doing 5 million points at 35fps. That was the for the entire pipeline, 4x4 transforms, rotation, treating each point as a vertex and calculating phong shading params at each one, texture look-ups and drawing them to screen just as single pixels. I was using it as a test bench for optimizing my transform stages with simd/swizzles and breaking transformation up into blocks for parallel processing.

In terms of putting together a 3d engine for yourself, I also wouldn't advise doing your projection in this standard equation form. It would be much better to have the whole engine use homogenous 4x4 matrices. That output of a a projection matrix will give you what you need for 3d clipping (homogenous clip space), w coordinate etc. It also makes it easier to scale up to device coordinate space.

Thanks for the advice. I appreciate that.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

Farabi



Raytracing only good for a flat textured image. When the texture image is also shaded, or even worse raytraced. the final result is not really good.

http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

johnsa

I don't see any problem with your textured output there?
It looks like a traditional software texture mapper to me.

Some things to bear in mind however, GPUs are going to be doing a lot of processing to improve the texture quality.. IE:
Bi-linear filtering
Anisotropic filter (in favour of mip maps with tri-linear filtering)

Then of course there is your choice of texture size (the old days it was always 256x256 but I wouldn't use anything less than 512x512 or even 1024x1024).

Shading models will usually include a number of other parameters (good lighting improves texture quality indirectly).
So as a basic you'd want at least full phong. (Modern game engines now also make heavy use of parallax exclusion mapping / bump mapping etc).

There are also many other things to eventually consider, like doing all your shading in a higher bit colour space, so that you can create "HDR" and chop of the overshoot to create post-effects.
my software engine was keeping the color as floats (in theory 1.0 being 255) and any value > 1.0 was chopped off into a seperate buffer.

Farabi

Yeah, it was not a real time ray tracing, but the texture is a raytraced generated texture map. Bogdan was right doing the intersection on realtime is almost imposible. Using Open Dynamic Engine for calculating a ray only good to 100 ray for achieving 30 FPS. Above 1000, it would be really slow. Some raytracer need at least 100k ray.

I think I better wait until OpenCL is mature.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

johnsa

We're getting to the point where RT ray-tracing is possible even without hardware accel.
Have a look at some of Jaco Bikker's work (http://igad.nhtv.nl/~bikker/). He's using a combination of gpu/cpu to do real time path tracing now.
There are also many good papers by guys like Samuli Laine from Nvidia on some topics.


Farabi

Quote from: johnsa on January 11, 2013, 05:33:59 AM
We're getting to the point where RT ray-tracing is possible even without hardware accel.
Have a look at some of Jaco Bikker's work (http://igad.nhtv.nl/~bikker/). He's using a combination of gpu/cpu to do real time path tracing now.
There are also many good papers by guys like Samuli Laine from Nvidia on some topics.

Thanks for the link. It is impressive. Also Brigade done a good job on realtime raytracing. But it need a great hardware.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165