Recommended Aspects of 3D Programming for Light / Laser Show Simulator?

Hi guys, I would like to develop a light / laser show editor and simulator, and for that of course I am going to learn some graphics programs. I am thinking about using C # and XNA.

I'm just wondering what aspects of graphical programming should I explore or focus on on a project I'm working on. I'm new to graphical programming, so I don't know much about it, but for example, I'm guessing that something I could learn (perhaps?) Would be volumetric lighting.

For example, what would be a practical way to make a "laser" of different widths / colors? I read somewhere to just draw a cylinder and apply a shader to it, I would like to confirm that this is the case.

Given that this looks like a big project, I was thinking about starting by creating lights and giving them properties so I can manipulate them easily. I (mis) read that only a certain number of lights can be rendered at any given time, I believe eight. Does this only apply to ambient lights? Given this potential limitation and the fact that most of the bulbs I will use will be directional like headlights or lasers, what would be the other way? This is what is volumetric lighting?

I just would like to get some stuff before diving into it. Since I'm new to this, I probably haven't used the words in the best possible way, so if something doesn't make sense please let me know. Thanks and sorry for my ignorance.

+2


source to share


3 answers


The answer to this question depends on the level of difficulty you need in your display simulation. Computer graphics are ultimately simulations of light transport; that simulation can be as complex as calculating the fraction of laser radiation deflected by particles in the atmosphere to the viewer's point of view, or as simple as drawing a line. Try the cylinder effect and see if it works for your project. If you need something a little more complex, take a look at shader programming (with Nvidia Cg for example) and volumetric shading as you mentioned; post-processing glow effects can also be helpful. For OpenGL, I believe there is a limit of 8? lights in the scene, but you could work around this limit by doing your own shading logic.



+1


source


Okay, if it's just for backlit simulations, I would imagine you need a lot of custom lighting effects, so whether you decide to use XNA or Direct DirectX, your best place to start is by learning shader languages ​​and ways to program different lighting effects with their use. Once you are able to reproduce the type of laser light you want, you can experiment with the polygons you want to use to represent the lasers. (I've used the cylinder method in some of my work for personal purposes, but I'm not sure how well straight cylinders will suit your purpose.)



+1


source


Although it is faster, I find it best not to use hardware lighting due to its limitations. Pixel shaders can help with your task. Also you can opt for OpenGL due to portability and clarity in rendering methods. I worked on Direct3D for several years before switching to OpenGL. OpenGL features and states are easier to learn, and rendering techniques (such as multi-pass rendering) are very clear. If you like C # code (which I don't recommend for these tasks), you can use the CsGL library to access OpenGL functions.

0


source







All Articles