Showing posts with label Artefacts - Rendering The Real World. Show all posts
Showing posts with label Artefacts - Rendering The Real World. Show all posts

Thursday, April 24, 2008

Artefact Six - Realistic Lighting in Shade(Part 2)

A quality that Shade possesses post rendering is its ability to merge a background into the scene much like how post composition worked using Photoshop in the previous artefacts. The benefit of this is that it cuts out the post production stage when amending the rendered image. However after the conclusions in previous it is always worth having the post production stage. The final image can be seen in Figure 6.

Figure 6

The model was tested with 3D Studio Max lighting. From previous artefact conclusion the best rendering solution should be Mental Ray with it’s in built capacity to access indirect illumination – like Shade does and therefore giving a result that would be similar to the render from Shade. After countless tweaking of specifications the render below in Figure 7 is the best production of lighting for the model. Notice the shadows are sharper and also are not as soft and present at the back of the model. As discussed above how Shade lighting works is by creating an imaginary sphere around the object allowing light to hit and reflect back allocating softer more realistic shadows.
Figure 7. Rendering time 4 seconds.

When asking peers which they thought had the most realistic looking shadows all answers were positive for the Shade render. Away that 3D Studio max can create this sort of imagery is by using an advanced plug-in called VRay. It works in a similar way to how lighting in Shade works by calculating algorithms such as ‘path tracing’. This is advancement from raytracing where it calculates extended rays from around the scene instead of specific object thus lighting from a larger area, such as the “sphere” surrounding the object in Shade. An example of Vray can be seen in Figure 8 Titled Stitch Guy. The results are positive as the lighting system can make a model have a positive realistic result.
Figure 8. ‘Stitch Guy’ by Andrei Cirdu

Evaluation
Lighting in 3D Studio Max has its limits until a user does pay for advanced plug-ins such as V ray. Shade however creates renders using lighting systems similar to how V ray works, using algorithms and calculating paths of light that not only hit a specific object but manage other objects in a scene to create realistic softer shadows. Thus enrolling certain realism to an object. As the Shade application creates an imaginary sphere around a model for lighting, a user can set up a scene ready for rendering quickly and easily. However using such an application to create realistic renders is time costly as well. Image based lighting in shade can also be beneficial to produce a mood to a scene and also project unusual coloured lighting with dramatic effects that may have not been thought of before he lighting process.
Conclusion
The rendered output created from the Shade application does give very good results in terms of realistic lighting and shading. It would however be partially unpractical to use when a lot of frames are needed to be rendered such as an animation unless a rendering farm were available. Due to the length of each render the quality does stand out from the mental ray renderer in 3D Studio Max and this advanced realistic approach would be beneficial. A user must then approach a project in a manner that will decide what format, how a scene will be viewed, what speed a scene may be walked through and also think about the time costs before choosing which method would be best to create output. As realism can be more beneficial and a viewer can perceive this in a positive way, photorealism however is not always needed.
References
Figure 8 - ‘Stitch Guy’ – Andrei Cirdu - http://www.conceptart.org/forums/showthread.php?t=114720 Accessed 24/4/08

Artefact Six - Realistic Lighting in Shade(Part 1)


The final artefact will be looking at a 3D Package called Shade 7 and also looking in depth at its Image based lighting procedures that allow for realistic rendering with little effort. The experiments will involve the same model(s) for the consistency element and then also look at how lights are created, and how they react with images to create imagery that is realistic. That is to say the highlights and shaded areas on a model look consistent enough to follow real world patterns.
For this experiment a model of a woman posing shall be use, the complex geometry will then allow a user to easily define where the shaded area can be seen on the rendered images. The model is one of many from the ‘Poser’ collection that can be purchased through the internet. Figure 1 below shows the initial render with the default shade lighting.

Figure 1. Rendering time 160 seconds.

After creating a point light in the scene the areas on the model that blocks the light have instantaneous shadows placed on the geometry. The point light in Shade works the same way as an omni light in 3D Studio Max, which is the light source is emitted from a certain area and is then spread equally in all directions. Attenuation is easier to control in shade as the light works on a cross hair and the range of lit area is equal to the end of the cross hair. Figure 1 below demonstrates the outcome of the light source on the model.

Figure 2. Rendering time 240 seconds.

The lighting system in Shade allows a user to adapt the light source in a manner that creates both varying and unusual coloured renders quickly and easily. The light colour can be affected by placing a map on top, much like how theatre performances use different lighting colours to suggest different moods and times of day. An addition to this is how a light can be set up to illuminate an object from different angles, fine tuning a light can allow a user to produce an effect where an image can be projected onto an imaginary sphere that surrounds an object. This allows a map to project onto an image alongside highlights and shadows to create various colours and moods in the scene. This can be altered in the background section seen in Figure 3.

Figure 3.

Not only can this spherical image create an overall projection but can also be split in two sections, upper and lower hemispheres. This method enables a user to have various coloured projections and intensities on a model creating various lighting results depending on the position of the light and distance to the object it is. However the colour of the projected light does influence the coloured surface/texture of a model. In Figure 4 below are two renders placed side by side

Figure 4.

The lower hemisphere has a projection of the map on the lower sections (shaded areas of the model due to the light source being high up) whilst the upper section is unaffected thus leaving the original texture of the model to be seen. The upper hemisphere can be seen clearer and is vast compared to the lower section. Due to the colour of the map being quite green in areas this affects the colour of the model however this can be bypassed by setting the upper and base colours to white (Pure light). However to generating different colours for both lower and upper hemispheres can allow a user to dramatically change the mood or colour of the model. This can be seen below in Figure 5.

Figure 5. Rendering time 226 seconds.



The colour of the hemispheres were set to yellow and orange and the combination of the two then created a skin/clay colour that can be seen. The renders have consistently been around three and a quarter minutes and the overall results have been positive.

Monday, April 21, 2008

Artefact Five - Advanced 3D Mapping & Post Production Composition (Part 4)

The second experiment for post production will be looking at how to create grass using the technique gained earlier by means of opacity mapping and comparing the results with a post production of Photoshop texturing. As the results seen earlier opacity mapping is extremely beneficial to the user for creating complex geometry without having to physically create the objects in 3DS Max. The best way to create grass in an advancing 3DS Max is to buy Plug-ins such as V-ray and Supergrass but the way that it has been created for this experiment is the way that various games use in their industry by using small duplicated planes and in this case the planes will be scattered thoroughly throughout the scene to create a field of grass. Below is the colour map that will give the grass various shades of green and will work well with the lights in the scene that will have shadows turned on. The opacity map that shall be used this will allow


Above is the rendered image is a grassy knoll with a tree on top, it is clear to see the grass has worked and the opacity mapping has done its job. The light in the scene has also created a rounded looking knoll as can be seen with the shaded area to the left and the lit area to the right suggesting the a slope this will be implemented in the post rendered version in the next stage.Again following the structure of the previous water experiment the scene had to be set up ready for a grass texture to be applied in Photoshop to the right is the newly rendered image.

The good thing about this sort of post production is that the grass that will be positioned onto the scene can be easily adapted from any image taken, a user would be able to easily choose what type of grass can be issued from a real world taken image that would in turn give the final image a realistic looks. For this event the image of the grass can be seen below.

When applying the grass texture had to be cloned to the area that needs to be selected before hand, in this case it was all of the green area and then just slightly higher (giving the individual blades space to be seen in front of the background sky). The secondary process was to change the brightness, contrast, hue and saturation to match the rest of the rendered image. Finally the shaded areas were created to give depth and also highlight the areas that were previously seen in the 3DS Max image.

The results of this experiment were quite positive and so too was the feedback given by the peers asked. Although many thought that the 3D rendered image was quite realistic the individual blades of grass could be seen quite well to give an overall depth that they felt worked well many thought that the new post production image worked just as well. Due to the nature of easily being able to adapt a new grass layer a scene can drastically be changed and output can be produced quickly. The way that the 3D render was set using vast amounts of polygons the render took nearly two minutes. The success of this experiment is that both images have a realistic look to them in their own ways and the feedback given was not biased either way.

Conclusion
The two procedures that were covered in the advanced 3D mapping section had positive results, the opacity and displacement mapping allows a user to create realistic and complex geometry with less effort and time but still be able to produce work to a high quality with ease. The advantage of using these type of maps permits a scene to include less polygons which will in turn decrease the rendering time. A benefit if a scene includes a significant amount of objects. The opacity mapping included the best results as the chairs surface had many areas where light passed through and the shadow that cast mimics how the shadow would react if the surface was made purely of geometry. The results given by the post production method have varied in outcome, as the grass experiment had a positive realistic result, it is how the viewer perceives the image in the first place. Even though realism is achievable it is not always necessary to go further and create photo or hyper-realistic imagery. For example even though the resulted feedback given was close, this is a success as people are undecided between the 3D render and the post production method which in turn gives the user the freedom to not only to have an incomplete scene created in Max but the freedom to experiment in Photoshop to create the final output.The way that post production can be used to amend or even enhance a render taken from 3D Studio max can be a benefit to a user in a positive fashion, the two experiments that deal with embracing the concept of altering an image after the render and the techniques used such as displacement mapping can save time and/or produce different results that were not intended in the initial stage of production which in itself can be encouraging.
Artefact Five - Advanced 3D Mapping & Post Production Composition (Part 3)

The first part of the post production composition will be looking at adding water to a scene, now 3D Studio Max comes with an in-built water material in its material libraries and this is what was used to create the water on the scene below. A displacement map was used just to lift the surface and create its uneven pattern. An opacity map has also been used but has been kept to a minimum, this can be seen to the right of the image where the water meets the land and a small darkened tint in the water can be seen which gives the water a shallow look here.


To allow a fair experiment to be issued the image had to be re rendered to not show the displaced water surface, instead the objects properties were stripped back to its original plane showing its original colour. This method will allow the post rendering Photoshop water to have the same colour properties and the only alteration will be the final output of the displaced water. Below is the render that is ready for use.

To create the distortions and reflection of the surrounding that will make the water look like liquid a displacement map must be created and this will coincide with the distortion setting on Photoshop. To the right is the displacement map created for this purpose.This map will ‘shift pixels’ in an image according to the brightness values of the map. For example the lighter areas will shift these pixels more than the darker areas causing a depth effect in the image.However in Photoshop the channels area is very important as the first two channels are used to calculate the horizontal and vertical shifts of displacement. This advantage can be had by stretching one of the channels and leaving the other as the normal to create a random uneven look to the water.

To create the water effect and the reflection of the islands the area above the blue plane that was not the water section was copied and then inverted vertically and a quick mask was issued on the same layer, this would allow the displacement map to filter through the layer and use the colour of the planethat was created in 3DS Max which in turn will have the same colour properties to allow for proper assessment.

The key factors when using displacement in Photoshop is that it the amount that is produced depends on the initial map – both the amount of brightness issued and also the amount of distance between the first and second channels. Another factor is that there is an addition height and width instruction that enables a user to force the displacement map to stretch the layer that it has been placed on.
The amount of displacement was double from the previous image and had an undesirable effect, the white parts of the displacement have been overwhelmed and the water now appears to have distinct areas that do not look effective or realistic. However the white areas does give the water area more depth much like how the water looks in the rendered image from 3DS Max.

Changing the amount of white light to filter through to the water was amended in the levels area of Photoshop, by selecting the white input levels and slowly moving them down the scale to the black levels the water can then be issued with the amount of light that falls onto the displacement map thus allowing the waves to have a various range and finally giving the water more depth.



After showing the images to a section of the population around twenty subjects, just over half of the votes leaned towards the initial rendered from Max and likewise I feel the same way, the waves look more realistic such as the waves you would see on the ocean or at a beach. The conclusion for this experiment is that the 3DS Max water material has the benefit of looking more realistic and the control of the amount of displacement is more beneficial and far quicker to a user than creating on Photoshop. The time taken to generate and render the water was far quicker than the post production method.
Artefact Five - Advanced 3D Mapping & Post Production Composition (Part 2)

The second area covered in the advanced mapping section will be looking at displacement mapping. This sort of mapping works similar to bump mapping which was covered in the first artefact, in the way it works of making a flat surface made to look like it has a uneven one. However displacement maps physically makes a flat surface indeed look irregular. The example below shows the initial plane with a metal like texture and also a black and white peace sign which will be the displacement map.
The black and white displacement map works in the same way as a bump map where the colour decides what section of a map will be displaced on an object. In this case the black area shall be unaffected whilst the white section will be altered. First of to see how the displacement alters an objects geometry a bump map will be placed onto the surface first and a comparison can be made.

The bump map effects are very subtle, the objects surface looks like it has been embossed with peace sign and the black outline that has been created shows the difference in height. Now comparing this to the displacement map (note both the bump and displacement map are both the same to remain consistent) the embossed area looks far definitive and the height of the object can be seen more clearly than previously with the bump map. A fine quality that displacement mapping possesses is that when the object has been embossed the polygon count will be unaffected. This can be highly beneficial in a complex scene where there are many objects.
At this point peers were asked if the displacement map looks more definitive than the previous bump map and all of them agreed, however a handful suggested if the scene had both displacement and bump maps present and this was done in the next step and the resulted render can be seen below.

The same peers were asked if the new image gives the impression of being more realistic than the previous displacement map rendered image. As the bump map gives a definitive shaded area around the peace sign the geometry looks uplifted and embossed with more quality. The peers gave a similar contribution to my thoughts and are much more positive with the final result. From this procedure the results have been constructive the use of displacement mapping can significantly alter the geometry of an object without using more polygons which is a benefit as it allows a user to create complex scene with less effort for the renderer.
Artefact Five - Advanced 3D Mapping & Post Production Composition (Part 1)

The fifth artefact will be dealing with the second part of the compositions research and also advanced mapping in 3D studio Max. The composition this time will be focusing on altering or adding to a render created in 3D Studio Max, unlike last time where the focus was on amending the lighting and shading to create a clearer more dominant outcome the scenes created in this artefact will focus on actual objects in the scene. An example would be to add grass to a rendered scene in Photoshop instead of creating and rendering it in 3D Studio Max. The first of the artefact will look at advanced mapping, mainly concentrating on displacement and opacity maps. These will be used to alter an object(s) that has been created in 3DS Max to make them look that they have been modelled thoroughly. In a sense the artefact will be experimenting how to ‘cheat’ an object into looking that more work has been put into it than it really has whilst still giving good results.The point of the artefact as a whole is to distinguish a method that can fasten together two different applications and reduce the amount of time to create the overall output (rendered images) but still enable the quality that is desired.

Advanced 3D Mapping

The first area covered of the advanced mapping section will be looking at opacity mapping. Opacity maps in 3D Studio max are used to create an illusion of geometry that isn’t there in the first place. A user can then create unusual or even fairly complex objects that can be visualised and made to look like the whole object has been painstakingly modelled. The scene that will be looked at for this procedure will be a simple chair. Below is the rendered chair in its original state and everything has been modelled and textured, the main problem with the chair is that the shadow underneath is blocky. As the chair itself will have holes that can be viewed, the light cast on the object must be able to pass through and create the new shaded areas.

Original chair with blocky shadow. Rendering time 2 seconds

The next item to change in the scene is to apply the opacity map that will allow the light to pass through the chair holes and also create the geometry to look like the model has been done with some time taken. How the opacity map works in 3d Studio max is that when it is placed onto an object it creates a transparent effect that follows the colour of the map, the example below shows an opacity map of black circles on a white background. Here these black circles will be 100% transparent and the white 0%.

Below is of the image with the effects taken into account and the transparency has been set to 100%. Setting it to the upper limit will totally craft the black areas into full transparency whilst anything less will show a slight greyish tint where the black is and create a glass look which is not wanted here.

Chair with Opacity Map and shadow. Rendering time 2 seconds. Polygon count 9,174.

Notice that the black areas can now not be seen at all on the chair seat and rest and also the bonus of opacity mapping is that it allows the light in the scene to pass through and create the shadow that can be seen on the floor below.The final stage of this experiment is to create a chair that is fully modelled with the detail in the previous render, however each hole will be physically modelled to create the geometry of the final chair. From here, an analysis can be made to distinguish if viewers will find the effect of the opacity map will give similar results or indeed better results than the fully modelled chair. Below is the image of the final rendered modelled subject.Chair with no opacity map and shadow. Rendering time 3 seconds. Polygon count 37,358.

There is not much difference in rendering time between the renders, however it is clear to see the difference in polygon count. Granted that the second subject has a few more holes than the previous, the concept that the modelling of each hole will create more polygons which will take longer to render.The feedbacks in results given by peers were quite positive the all of them reported back that they could see no difference between the two renders (besides the amount of holes). This in turn has made this experiment a success showing that opacity mapping can be as good as modelling geometry for a subject.The conclusion from this procedure has been a positive one, using opacity mapping can be used to reduce the amount of time taken to create objects and the secondary benefit is that light can pass through to create shadows as well as a model that was created with pure geometry. Rendering times are cut via the amount of polygons that are not there which in turn is excellent for larger more complex scenes.

Friday, February 29, 2008

Artefact Four - 3DS Max Renderings and Composition (Part 1)

The last two artefacts have been dealing with light in a space and how light reacts from objects, this forth artefact will bring the final step to these renders. Adobe Photoshop will be used to create a composition of a render to give further depth by giving the shaded/lit areas a more dominant outcome in the final image for a scene. The artefact will be investigating how this is done and also how it differs from a render from 3DS Max.

Why Composition?
This technique is used everywhere in media today from multi-million dollor films to simple weather reports, the technique is to use images stacked uppon each other to create a new image. In this case for the experiment rendered images from 3DS Max will be placed into Photoshop to adjust the elements of the image and create a improved level of realism to the final output. This is not to say this method is indefinately better than what 3DS Max can produce but simply a further step in production to assess if this method is worth while.

To create the composition in Photoshop the first step was to get the rendered images. A list of renders can be made from the same scene in one go by selecting Rendering>Render Elements tab.


From the Render Elements tab, clicking on add will allow a user to create multiple renders and these will change how the final composition will look. For the first experiment only a couple renders will be used. Only the diffuse render was selected this will give the colour needed for the scene and a seperate render that uses Occlusion will be used for the shaded areas described later.

Original render dark scene created in 3DS Max using Mental Ray. Mental ray was chosen as it has given better looking renders from the results of artefacts two and three.



Diffuse Render

Ambient Occlusion Render

The resulting effect that the Occlusion render will give to the final composition are softer looking shadows, this is calculated from the ambient light in the scene – independent from the original light source. This greyscale occlusion will allow the shaded areas of the initial render to have more depth from the original Mental Ray render.
To create this render and make this “Clay effect” all objects need to have the same map applied to them. Using a Mental Ray map the surface section on the Basic shaders area needs to use an Ambient/Reflective Occlusion sub map. To finally allow the render to give the clay look the ‘Global Ray Antialiaser’ needs to be on and the map created must be placed here. The resulted procedures can be seen below in the render.

At times the initial render for the Occlusion output creates a bad image where grain is can be seen creating an image where noise has been engineered. This must be discarded now before using the image later in the final composition.

To make the grain dissipate from view the sample per pixel quality needs to be increased. This basically increases the amount of information per pixel giving a smoother look to the render. However the larger the samples rate the longer the render time. The original setting is set at ¼ and after test renders the best output with minimal time consumed was setting both minimum and maximum ranges to 64 samples per pixel.

Below shows how the Photoshop layers have been setup and what has been attached to them e.g. the exposure for the living room dark layer. The ambient occlusion layer has been inverted to allow the image to become brighter in the final output.

The diffuse map will give colour to the scene whilst the initial Mental ray render will show all the reflections of the shiny surfaces such as the floor and the glass table top. The specular map was used to give added highlights and bring out the well lit areas of the scene however the rendering was too dark so it was discarded. Finally the ambient occlusion map was placed on top of the stack.
Below is the final composition, the image on the left was the initial render from 3DS Max and the image on the right is the newly created composition. I believe that the rendered image is still better, the shaded areas where the light struggles to reach is more dominant than the composition. Thus giving the image the depth that gives the room distance whilst looking at the composition image the whole thing looks a bit flatter.


The final outcome of the composition was slightly disappointing the main reason being that the specular map was too dark to use which is why the scene still looks too dark and the depth is not quite there. After browsing the Web (mainly 3D forums) I have gained the knowledge that in 3DS Max there is a problem with using Render Elements alongside the Mental Ray renderer. The Scanline renderer is the optimum partner for rendering elements. The scene lights will be recreated and a composition will be tested again with the new Scanline renders.

Artefact Four - 3DS Max Renderings and Composition (Part 2)

After re-lighting the scene the Scanline rendering system indeed worked on all of the render elements that will be used for composition in Photoshop. This time round adding to the amount of renders by including; shadow, lighting, a re-render of the scene using Mental Ray, and a specular render. Below is the resulted imagery.

Below are the images stacked in Photoshop, the easiest way to adjust the images is to turn half of them off and work with the second, then vice versa. Once the stack has been complete then any final adjustments can be made.

Below is a step by step account with jpg images to show what adjustments was used to create the final composition The shadow image was first set to multiply, thus making the image very dark to begin with. However once this is set the lighting in the scene can then be added and thus will bring out the colour so objects can be recognised.


The specular image was then included and was set to screen. This allowed the colour of the scene to be identified, note that this makes the shadows look quite dominant for the moment. In the real world shadows have gradients and not always pure black.


To soften the shadows to create this gradient look a linear burn was introduced to swap the initial multiply. Giving a nicer feel to the shadows. Notice that the couch and curtains now have also been brought out.


To enhance the shaded areas further (but not making them totally transparent) the lighting render was then issued a soft light blending mode. However this should be done carefully to simulate the distance of a light, for example it is not needed if a light is fairly close to an object as the shadow created would be quite dark. At this instance the other rendered layers were not need in this composition as they did not enhance any of the image when they were brought in so were rightfully not used. Below lays the final composition of the living room.

The final task of this artefact was to ask an audience of their opinions of which image like the best out of;
  • The composition
  • The Mental Ray Rendering
  • The Scanline Rendering.
Below is a reminder of the two initial renderings.

Initial Mental Ray Rendering
Initial Scanline Rendering

A pie chart to show the number of people that preferred which final image.


The results can be seen that an incredible 0 people preferred the Initial Scanline image whilst twice as many preferred the newly created composition. The comments made are also useful to have so this can be adapted in a future project. Many people who preferred the mental ray image liked the look of the rug and a lot said that the shaded areas are more realistic due to the softness of them. However this can be easily amended in the composition by reducing the shadow amount and altering the light to compose the shaded areas. Most of the people who preferred commented on the shadow cast by the table in the centre, due to the table surface having a glass material the light passes through this but does not with the wooden frame.

Evaluation
In the last two artefacts Mental Ray has been undoubtedly come across as the best output for renders. For this artefact pure mental ray renders did not perform as the software would not enable the output needed for making a composition in Adobe Photoshop. However combining Mental Ray and Scanline renders, one can create output that perhaps not outright better 3DS MAX renders but enables the user to create adjustments easily and quickly for specific output. Using the render elements area of Max a user can chose what renders to use for the composition. Whilst using the default Scanline Renderer the output takes far less time to be created than using Mental Ray. But once again the benefit of creating a composition of these renders is the fact that they can be easily amended. For example if a shaded area needs to be darker, or the diffuse colour needs to be higher in contrast they can be altered in Photoshop using the layers that were created with the 3DS Max renders.

Conclusion
Using software to create post rendered images can be a benefit to the outcome of a render, to take this further software’s such as Shader, Zbrush and Photoshop can be used not just to enable a more realistic outcome but can also be taken further to create imagery for film or games. For example something as simple as changing the lighting effect could dramatically alter a composition to create covers for DVD’s or posters for different Medias and genres.