Without doubt, the most important new feature in AccuRender version 3 is the inclusion of the radiosity engine. This innovation alone makes the basic rendering power of the program more powerful, and more realistic, than most of the competition. At first, for those more familiar with standard raytracing software, the process can seem confusing and time consuming and often seems wind up with the user abandoning it altogether. With patience, however, it can yield stunningly lifelike results with very little extra effort, and often with a significant payback in rendering times.
AccuRender’s help and manual make the situation worse by explaining that you may "require non-intuitive changes to the model." It is vague on what these "non-intuitive changes" actually are, however, and given that they are "non-intuitive", it is difficult to imagine how the beginner could actually work them out. This article describes how best to model for the use of radiosity.
One of the most popular misunderstandings among beginners to AccuRender is that radiosity is not (usually) the final product. Radiosity is a pre-process that is used to build a general lighting model based on your original AutoCAD model. This new model is then raytraced as usual to add effects such as sharp shadows, reflection, materials, and so on.
Normal rendering programs, like the raytracer that comes in the box with AutoCAD use the concept of "ambient light" to approximate what the radiosity process tries to calculate. In our environment, light is continually bouncing around, lighting all surfaces with a certain amount of diffuse "ambient" light. If we have a room with one window, the wall with the window in it is not black because the light bounces back from all of the surfaces in the room, lighting the window wall. "Ambient" light in a raytracer attempts to compensate for this by assigning a certain amount of light to all surfaces from the start. This can make interior views look flat and lifeless; In reality, some areas get more "ambient" light than others, corners of rooms are darker than the middles of the walls.
Radiosity use can dramatically improve the reality level of interior renderings, and can speed up the ray-tracing process up to 1000% into the bargain. It all seems too good to be true! There are, though, as the manual explains, advantages and disadvantages and it sometimes more effective to leave the process out altogether. To understand this, it is important to understand the basics of how the radiosity process actually works, and what it does.
The Radiosity pre-process, a basic description.
The idea behind radiosity is quite simple. Instead of calculating the lighting for the model each time a new rendering is made, a "global lighting model" which each raytracing can refer to is made. Many renderings can be made from this "view independent" source, saving a lot of work on the part of the raytracing engine.
For the sake of simplicity, we can say that each surface in your model is divided up into a number of triangles. Effectively, for the rest of the process, including the subsequent raytracing, this "radiosity mesh" is your new model, each of the triangles forming a new surface. Storing this new "model" is part of what makes the radiosity process so memory-intensive. For the purposes of the radiosity calculation, each of these new surfaces is assumed to have a matte finish and so will reflect light diffusely, or evenly, in all directions.
Each "step" in the process is the calculation of one light source, either a light fitting, an idealised source, a daylight-source, the sun, or a bright surface. Step 1 is the calculation for the brightest light in the model, normally the sun but in certain cases (at night for instance), other lights. During the "step" the amount of light received by each surface in the model from the light source is calculated. Distance, whether the light is obscured by another non-transparent object, and the characteristics of the source itself (beam angle and so on) are all taken into account. AccuRender will ignore sharp reflections as it treats everything as diffuse reflector.
The process continues with the next brightest source until all of the light sources are done. This means that you must have at least the same number of steps in your radiosity solution as lights in your model, and AccuRender will not stop automatically until this has finished. If you have 150 light sources, and you choose 100 steps (the default) AccuRender will carry on until step 150 unless you stop it.
If the radiosity calculation stopped there, there would be little visual in the calculation at all because Raytracing does essentially the same thing. The secondary reflections make radiosity what it is. After AccuRender has finished the "primary light sources", it will move on to the brightest surfaces and treat them as diffuse light sources, lighting the surfaces around them. After enough secondary reflections have been done, each surface will have a value assigned to it which approximates to the total amount a light is reaching it.
This is where the "residual" readout comes in useful. At the start of the process, AccuRender calculates how much light is in your model. Throughout the radiosity process, it tries to keep track of the amount of light it has not accounted for and shows this figure as the residual. Put simply, if the residual shows 20%, it means that the radiosity engine doesn’t yet know where 20% of the light should be allocated.
Normally, for final rendering, one should try to get the residual below 10%. Sometimes this can take up to 500 steps, sometimes after the first 100 steps you are already there. Occasionally it never even gets close. The best advice is simply to do as many steps as you can in a reasonable amount of time. If you follow the advice in this article, you should be able to complete a radiosity calculation, for virtually any model, in under an hour. For most models, you should even get the time under ten minutes.
AccuRender still supports ambient lighting. You will notice that there are different settings for raytracing and radiosity, and there is good reason for this. Most rendering artists advise that for raytracing you should turn off ambient light altogether. Spaces will look flat and lifeless with such an evenly spread light present. For raytracing without radiosity, it is usually best to fake the lighting by inserting invisible point lights in the spaces with no shadow casting. This makes the corners darker and the middles of the walls lighter. You must carefully work out the best placing of the light and the brightness, however, and even then, it is not perfect. Radiosity takes away the guesswork, but still leaves you with the tools to make an even better job if you need to.
For radiosity, the ambient figure works slightly differently. If you have a residual of 10% and an ambient setting of 1.000, AccuRender will apply all of the remaining light in the scene (10% of the total) evenly on all of the surfaces. If the ambient setting is 0.500, half of the remaining light will be applied as ambient light (5%). The lower the residual, the less ambient light is projected. There is no ideal figure but it would seem that leaving the ambient setting at between 0.800 and 1.000 can do little harm if the residual is low enough. There will be disagreement on these settings, so it is suggested that you experiment yourself to see what is best for you.
Impact on raytracing performance.
When the radiosity calculation has reached an acceptable conclusion, a good proportion of the raytracer’s work is already done. The raytracing engine will still have to add the reflections, materials, plants, sharp shadows, background, sky, and so on, but it will not again have to calculate the surface lighting. The raytracing will therefore be faster- sometimes 10 times the raytracing only speed (in my experience) making radiosity especially suitable for situations where more than one image is required with the same lighting conditions. For animations, it is virtually indispensable.
Radiosity has many nuances that are not within the scope of this piece. You will notice, for instance, when you run the radiosity calculation, that each grid surface is not evenly lit but is gradient shaded. AccuRender interpolates the lighting of each surface from the grid nodes, providing a smoother lighting model. The grid is also not even, but adapted to the lighting conditions in your model.
Dealing with Radiosity "artefacts"
It was clearly someone with a warped sense of humour who coined the term "artefacts" in this context. The dictionary definition of an artefact is clearly not valid here, as there are perhaps no more irksome problems in radiosity modelling than dealing with these light or dark streaks. However, if you follow a few simple guidelines, and learn a few tricks-of-the-trade, it needn’t be so difficult.
Artefacts are "errors" in the radiosity meshing due to the program’s inability to understand the relationships between different, but intersecting or touching objects. This is a fundamental problem with the radiosity process and will not be addressed until an intelligent method of identifying the interrelationships between objects has been invented. As an example, take the two solids seen in figures 1-4. Placed perpendicularly to each other they are touching perfectly, the end of one at approximately the middle of the other, creating two separate spaces on either side. In one of the spaces is a very bright spotlight focused on the point where the two surfaces touch. This scene serves to demonstrate the two basic radiosity "artefacts" and how best to deal with them.
Figures 1 and 2: A shadow leak. On the left is the radiosity mesh after 100 steps, while the
right hand image shows the result after raytracing.
Although this is a simple scene, it has been constructed to put the radiosity meshing under the most scrutiny. Most radiosity situations will not be as extreme as this, so you should only worry about these problems when there are visible errors. By keeping the example simple, you should understand more easily the problems.
Is you can see, the radiosity meshes for the two objects are separate and do not take into account their intersection. In figure 1, the separating wall is on top of the grid line placing it in shadow. AccuRender interpolates, or guesses, the light between the covered grid line and the one to the right that the spotlight lights. As you can see, this process leads to an error, or "shadow leak", on the light side of the bottom surface.
Figures 3 and 4. A light leak shown with the radiosity mesh. Figure 4 shows the only complete
resolution of the problem.
Figure 3 shows a classic "light leak". In this example, the vertical solid moves so that it is between two grid lines. The same process of interpolation between the grid lines leads to a lighter section on the horizontal solid where there should be shadow.
As you can see, the problems occur because of the reliance on guessing the lighting on surfaces between the grid lines of the radiosity mesh. There are a few ways to deal with this, some solve the problem outright but are more difficult to model, some simply deal with some of the symptoms but are easier to implement.
Solving the problem outright.
The basic problem is that the meshing of the bottom surface is wrong. What should happen is that the grid takes into account the vertical solid and creates nodes along the intersection. We can force this behaviour but only in ways that are either not very flexible or time consuming to make.
Figures 5 and 6. Joining the two solids together with the union command solves the problem
but creates new ones in other areas.
The first method is simple. Joining the two solids into one, the junction resolves correctly when the AccuRender builds the radiosity mesh. This will solve the problem in many cases, but unfortunately means that we cannot assign different materials to each part. At the junctions between floor and wall or wall and ceiling, this will not be possible.
We could also create a break in the bottom solid, and fill it with a small piece to make up the hole. This works perfectly but has many disadvantages, meaning that you should only use it as a last resort. It is difficult and time-consuming to make; it creates more surfaces and so on.
Fixing the symptoms.
In many cases, we will only see the solids from one side. In this situation, it is easy to fix just the most important surfaces, leaving the problem on the other side.
The first fix involves the "molding and trim" setting from the "object properties" dialog. This setting stops an object from casting shadows in radiosity and can be very useful in solving shadow leaks. Figure 3 shows the same situation as figure 1 with the vertical surface tagged "molding and trim". As you can see the "leak" has gone, but so has the shadow from the other side of the solid. Unfortunately, this method cannot solve light leaks.
Figures 7 and 8. On the left, we tagged the vertical surface as "molding and trim" This causes
the shadow leak to disappear but causes a new light leak on the other side. On the right is a single
split solution showing the desired result on the right but a new light leak on the left.
The same effect can be produced by splitting the bottom surface at the point where the vertical plane joins it. This causes the bottom surface to place a grid line exactly at the correct point on one side solving either light or shadow leaks. The split must be at exactly at the correct place or the technique will not work properly.
Identifying radiosity artefacts.
Radiosity artefacts are just one visual error common in rendering software. Other causes can look for all the world like a shadow or light leak. In particular where surfaces are not perfectly aligned, common with curved objects, small light or dark areas can appear in the junction. Smooth shading can also cause darker areas in certain situations. However, with experience it is possible to spot the radiosity artefacts and put them right.
Optimising your model for radiosity.
For very simple models, using radiosity is quite easy. For exterior views, or renderings with no sun, simply check the radiosity box under "Setup", "Lighting" and press "Start" on the radiosity tab. Interior views require the addition of "daylight sources" (Setup, Lighting) on the places where sunlight enters the space.
Things start to get more difficult when the model becomes more complex. The main problems appear below along with suggested solutions.
AccuRender is unpredictable when dealing with curved solids because it relies on AutoCAD’s tessellation variables, FACETRES and VIEWRES, to resolve curved solids into faceted objects. The zoom-level in the drawing and whether the view is perspective or not also affect the translation. To avoid this lucky-dip situation it is best to remodel as many curved objects as possible, and especially objects that are curved in more than one plane, to faceted solids or meshes. Naturally, in certain models, this could be a lot of work and may not even seem possible. Remember that the curves will be broken up into straight-line segments anyway, so you are not losing any "realism". Avoid splines and smoothed polylines in particular, as these tend to tessellate extremely finely.
Professional renderers or animators are usually very concerned about the polygon count, or the number of flat surfaces, in their models. The higher the polygon count, the longer the model is going to take to render and in AccuRender, this also applies to the radiosity calculation. Most other packages give more control over curve tessellation and it is to AccuRender’s detriment that this is badly handled. However, there are ways to take control of the situation.
If you use many similar blocks in your models, make them from the start with faceted solids rather than curves. This will save you from remodelling every time. A neat trick is to export your blocks, or even whole model to 3ds (3D Studio) format and then re-insert it into the drawing. This will convert all of the solids into meshes. Lastly, keep your VIEWRES and FACETRES settings as McNeel recommends (below), zoom out, and regenerate your drawing until the curves tessellate less finely.
You should experiment with these figures to find what is right for you. The balance between rendering speed and curve realism is different from person to person. At least one other user of AccuRender uses a value of 10 for FACETRES for every model. Also, notice that there is a way of controlling the tessellation of certain objects from the object properties dialog, however this does not apply to solids.
Finally, if you must have curved solids, use the "Raytrace only" technique below if possible.
Excluding objects from the calculation.
While this may seem at first like cheating, it is very sensible to only run the radiosity calculation on significantly affected objects. You can safely exclude many objects by tagging them with different options. After these objects are tagged, they will no longer appear in the walkabout window during the radiosity calculation, although they will render during the raytracing phase. Excluded objects are allocated ambient light according to the ambient light setting for raytracing. Confusingly, this setting can be found in the "Ambient light" dialog through the "Lighting" the under the main "Settings" tab (but not under the "Raytrace" nor the "Radiosity" tab).
Figures 5 & 6. "Raytrace only" and "molding and trim" settings. The box on the left is tagged "molding and trim" and the box on the right is tagged "Raytrace only". Figure 5 shows the walkabout window while figure 6 shows the fully raytraced image. Notice how the "Raytrace only" box only shows up in raytracing, but still casts a shadow in the walkabout radiosity calculation. The "Molding and trim" box casts no shadow in either image, so appears to be floating.
Tagging objects as "Raytrace only" (using "Setup, Object Properties")
The "raytrace only" switch in object properties has the effect that the surfaces of that object do not collect light from the light sources. The object does however appear as non-transparent to the radiosity engine and so will cast "shadows." "Raytrace only" differs from "Non-receiver" in that the latter does not appear to receive light at all, even during the raytracing process (rendering it virtually useless as far as I can see)
Tagging complex objects, like furniture blocks, small, dense meshes or curved solids can have a dramatic effect on the time taken to finish a radiosity calculation. Clearly, the fewer surfaces AccuRender has to calculate the light for the better, and you should always be on the lookout for an object that can be excluded. Other objects for which there is little point in calculating the lighting for are transparent surfaces and highly reflective surfaces because their characteristics are determined more buy other objects than themselves. Certain complex reflections on glass can be lost through this kind of use, so experiment to find out if this suits you.
Tagging objects as "Molding and Trim"
This check box causes the object to be treated as entirely transparent by the radiosity engine. The object will receive light normally but cast no radiosity shadows. This setting can be useful for objects which are transparent anyway, or which have complex transparencies (fine grids) which are not properly represented by the radiosity engine. This setting will also reduce radiosity time for complex objects, however it will not cast realistic shadows without "re-calculating lights" at raytrace time, making the object appear to float. In certain situations however this is not a problem (when the object is floating for instance) but it is not recommend to for use as often as the "raytrace only" setting.
Figures 7 & 8. The box on the left is tagged as non-receiver while the box on the right is tagged as both "molding and trim" and "radiosity only". Figure 7 is the walkabout view and figure 8 is the raytraced version.
Completely omitting objects.
One question that has come up a few times on the AccuRender group during its existence is "how do I completely omit an object from the radiosity calculation." There are three methods, and they all rather too obvious and a little too drastic: Turning off or freezing the layer that the objects are on, erasing them from the drawing or tagging them as "workplane". All of these remove the objects from the raytracing as well.
The reason is quite simple; when AccuRender builds the radiosity mesh at "Load Model" time, the program meshes the object or it doesn’t. If it does, then it takes up memory and still adds some time to the calculation. If it doesn’t then it isn’t in the model that the raytracer renders. The nearest that you can come is to tag the object as "raytrace only" and "molding and trim", however with very complex models, this may still slow down the system too much.
Omitting the objects by turning off their layer can still serve a very useful purpose however. AccuRender has trouble with certain models where there is a very dense, small, central part in an expansive surrounding area. A good example of this is a detailed model of a house with very much of the surrounding landscaping included. McNeel are conducting some research in this area but not all models of this type bring AccuRender to its knees. Some models just like this have worked very well, with a 500-step interior radiosity calculation completed in under an hour.
However, sometimes it may be necessary to exclude unnecessary detail from the model in order to achieve reasonable radiosity times. In many cases, removing the elements from outside a building while doing an interior rendering will dramatically improve your rendering times although views through windows will be lost of course. This is not as much of a problem as it seems because AccuRender currently has problems with this type of view as explained in the manual. Further coverage of this issue will appear in a future article.
This is perhaps the most important issue with complex models, and one that is quite easy to fix. Unfortunately, it’s also the only solution that isn’t completely free! The radiosity mesh can become very demanding on memory, often requiring 200Mb of free RAM (after kernel use). The telltale signs are the hard drive buzzing almost continuously during the calculation or, if you are using NT, the talk manager showing a total commit charge over about 50Mb of your total physical RAM.
For complex modelling, your machine should have at least 256Mb of physical RAM. 128Mb is real minimum, but you should be aware that you will get "paging" at times, bringing your system to an almost complete standstill. There is no question that if you are experiencing paging, then RAM is a far better investment than SCSI hard drives (which just make the paging a little faster) or faster processors (which have no effect).
Before you go out and buy your DIMMs though, be sure to read the previous points that will help you to reduce the complexity of your model without affecting the final output.
Radiosity is a very powerful tool which can both make your renderings more realistic and faster to produce. Until you understand the basic concepts and establish a good working practice, long calculation times and ugly artefacting may occur. These problems though are easy to iron out and with patience will increase your productivity and image quality enormously.
rev6.23.99 :: For more information visit www.accustudio.com