Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Oct 2011
Offline Last Active Sep 30 2015 01:48 PM

Posts I've Made

In Topic: How to calculate Lumens?

21 May 2015 - 03:55 PM

@Hodgman: I have this vague feeling that it's not my place to correct you, but since you asked...



A candela is roughly the brightness of a candle, measured in watts per steradian (solid angle).

You're mixing photometric and radiometric terminology, here.

Candela (cd) is the unit of luminous intensity (photometric).

The equivalent radiometric quantity is radiant intensity and it's unit is watts per steradian.



A lumen is candelas per solid angle.


Candela is lumen per solid angle.



You use this unit of measurement for lumimance (or the equivelent radiometric unit for radiance).


The unit of luminance (photometric) is: cd/m²




If I'm not totally mistaken, you can just plug the photometric units into the rendering equation.

For some reason the (English) rendering literature often uses the radiometric names for the quantities (radiance, irradiance, ...), but is using photometric units (lumen, candela, ...), which is totally confusing.


The radiometric units are used in radiation physics. The photometric units are used whenever the human perception is concerned.

(They just differ in the way how they weight light of different wavelengths. If you're not working with spectral lighting effects, you don't really need to care.)


The dot product formula you posted earlier is the photometric way of mixing RGB values into some luminance value (the weighting is according to the spectral response curves of the "average" eye).

In Topic: Recommend a book for algorithmic 3D modelling theory

10 October 2014 - 03:35 PM

Hi axefrog,


I have some book references for you that cover at least the NURBS part.


"Fundamentals of Computer Aided Geometric Design" by Hoschek and Lasser is a standard reference for modeling with curves and surfaces. It also covers various methods for interpolation, intersections, blending and smoothing of surfaces.


In Farin's "Curves and Surfaces for Computer-Aided-Geometric-Design", there's a bit more background on continuity, splines, and different kinds of operations you can do with curves and surfaces. It also contains exercises.


Here are some applets that demonstrate a few of the algorithms discussed in those books.


Hope that helps a little. ;)


In Topic: Depth stencil state issue

05 October 2013 - 01:55 PM



The black depth channel is somewhat expected, due to the non-linear distribution of the z-values. Right beside the combobox where you selected the "depth" channel, you have a gray bar that allows you to filter the range displayed linearly. There are tiny triangles (top-left at the bar, and bottom-right). These are the lower and upper bounds. You can move them around, so that you have the lower bound around 0.95. That should show you something.


On the top left of the window is a small "save" icon. You could save the PIXrun and upload it, so that we might have a look.

Best, Tsus

In Topic: Depth stencil state issue

05 October 2013 - 12:07 PM

Ok. So, with all resources being successfully created and no errors in the output window during draw calls, it's time to use a graphics debugger like PIX.
PIX is contained in the DxSDK and allows you to capture the draw calls and states for a frame (every time you hit F12).
When clicking on a draw call in the list presented to you in PIX, the vertices of the triangles are shown before and after transformation.
If you do a right click on the rendering output you can debug individual pixels and see, why fragments were discarded.

Also, you can dig into the states bound at a draw call.
Hopefully, this sheds some light on the matter.

In Topic: Depth stencil state issue

05 October 2013 - 09:40 AM

Hi eltharynd,

Usually, CPU access flags are not required for the depth buffer.

Try to turn on the debug layer, as eppo suggested. D3D will most probably tell you what is wrong. The behavior you described sounds like invalid parameters. Pass the flag D3D11_CREATE_DEVICE_DEBUG into the Flags parameter of the D3D11CreateDevice call.

Could you check that all your mDevice->Create... methods return S_OK?
If not, the debug layer will tell you in the Output window of visual studio, why the Create-method failed.
(If you run in Debug mode with F5, not Ctrl+F5.)

Clearing structs with ZeroMemory is a good practice (in my eyes). Could you do it for the depth stencil desc, too? (Just to be safe.)

ZeroMemory (&dsDesc, sizeof(D3D11_DEPTH_STENCIL_DESC));

Also, you have some copy paste error when clearing the depth stencil view desc. It should go:

ZeroMemory (&depthStencilViewDesc, sizeof(D3D11_DEPTH_STENCIL_VIEW_DESC));

Just to be safe, set a rasterizer state. Whenever you move code around, you don't want to depend on states of some previous code block.

ZeroMemory(&rsDesc, sizeof(D3D11_RASTERIZER_DESC));
rsDesc.CullMode = D3D11_CULL_BACK;
rsDesc.DepthBias = 0;
rsDesc.DepthBiasClamp = 0;
rsDesc.FillMode = D3D11_FILL_SOLID;
rsDesc.AntialiasedLineEnable = false;
rsDesc.DepthClipEnable = true;
rsDesc.FrontCounterClockwise = true;
rsDesc.MultisampleEnable = true;
rsDesc.ScissorEnable = false;
rsDesc.SlopeScaledDepthBias = 0;
if (FAILED(mDevice->CreateRasterizerState(&rsDesc, &mRsBackfaceCulling))) return false;

Then, later:


And don't worry. You'll figure it out.

Best, Tsus