Wednesday 20 November 2013

Create Cloud in 3D Max

Our first step is creating an atmospheric gizmo containing volume effect, and to create a VRayPhysicalCamera, a VRaySun+Sky system and set LWF (Linear Work Flow), in a metric scale scene. The last step makes it easier to handle large scenes.
Then Create the gizmo with Create> Helpers> Atmospherics > Box Gizmo and setting volume for a cloud layer: 6000x6000x300 meters. Next step: VRayPhysicalCamera.
All default params used, eccept reducted focal lenght, to achieve a grandangular emphasizing sky effect. Put in scene as shown to increase perspective look.
Creating light system is quite easy. go to Create > Lights > VRay > VRaySun, dropping light in scene. check yes to popup question to get automatically VRaySky map in 3dsmax Environment.
Use default VRaySun params. Take a look at VRaySky map included in Environment map slot, and further selection in VEF.
Now in 3ds max "Environment and effects" module (press "8") we add VEF effect. Following default params:
1st rollout, General parameters, manages main effect params.
2nd modulates some features with maps. We're getting clouds adding map to density slot.
3rd rollout links VEF to the related gizmo, that can be shaded by user-defined lights. Step one: link VEF to gizmo.
Click Add to select gizmo from scene..
Resulting render. not our best!

We see gizmo is "full" of dark and dense fog, so light cannot penetrate it.
Adding texture to density channel we can modulate density areas. Use Noise map with following params:
Noise params used for clouds
Following final render parameters:
Params for VEF appearance and quality. Thanks to three slots, we meet great flexibility.

More than the other parameters, step size affects render times. Increasing this value decreases render times, trading off render quality.

The final render:


Leaf texturing in 3d Max

How to make leaf materials for 3d trees using the VRay2sidedMtl, in this case a sugar maple (in autumn). The tutorial uses Onyx Tree for the tree generation, but this material technique works just as well with other tree objects with low-poly opacity mapped leaves.
1.  Firstly, some observations on opacity mapped leaves vs. geometry leaves. As you can see in the image above, the images in this post were made using opacity mapped leaves.  Its true that in simple scenes trees with geometry leaves may render quicker as V-Ray doesnt have to calculate the opacity of thousands of leaves, but in dealing with complex scenes with millions of polygons the advantage in using (a lot) less RAM is huge.

2 . Exporting from Onyxtree. I went with 4 polygons per leaf so that the leaves aren't just flat. Remember to set the dimensions you want the individual leaves, and change the units when you export. You can also make it export 3 different leaf IDs with varying sizes. I normally export as a .obj file.
3 . Opacity mapping. It's important to make sure the opacity map is just pure black or white, with a sharp edge. You should also turn off filtering in the bitmap loader options.

4 . VRay2sidedMtl. V-Ray's 2 sided material works best with geometry that has no thickness, which is what onyxtree outputs. It is a very quick way of generating a SSS (sub-surface scattering, think candle wax, skin, milk etc) type look. The image below  is rendered using a VRay2sidedMtl on all leaves with grey submaterials and a hand drawn image for the vein skeleton.

5 . Front material. The front side material is a basic vraymaterial with a diffuse map and a reflection map. The color correction map is to produce slightly different hues of leaf for each of the 3 sub leaf types (you should have got a mult-subobject material when you imported the .obj file). I usually make the first leaf and then copy and paste it to the 2nd and 3rd and just change the hue value slightly. The reflection map is a b&w copy of the diffuse map with levels adjusted to make it more contrasty.

6 . Back material. The back material is a copy of the front material but with a different diffuse bitmap and no reflection. Note that I overlaid the veins skeleton jpg on top in photoshop as well. (without it, the veins looked too light when viewed from the underside as they took 100% of the lighter back material)

7 . Finished result Click image for 800px version. Rendered using VRaySky and VRaySun, and a VRayPhysicalCamera.

Image Opacity / Transparency in CSS

First we will show you how to create a transparent image with CSS.
Regular image:

The same image with transparency:
Look at the following CSS:
img
{

opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}

IE9, Firefox, Chrome, Opera, and Safari use the property opacity for transparency. The opacity property can take a value from 0.0 - 1.0. A lower value makes the element more transparent.
IE8 and earlier use filter:alpha(opacity=x). The x can take a value from 0 - 100. A lower value makes the element more transparent.

Example 2 - Image Transparency - Hover Effect

Mouse over the images:
pic
{

opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
pic:hover
{

opacity:1.0;
filter:alpha(opacity=100); /* For IE8 and earlier */
}

Friday 15 November 2013

Sunday 10 November 2013

CSS Layers

With CSS, it is possible to work with layers: pieces of HTML that are placed on top of the regular page with pixel precision.

The advantages of this are obvious - but once again Netscape has very limited support of CSS layers - and to top it off: the limited support it offers is quite often executed with failures.

So the real challenge when working with layers is to make them work on Netscape browsers as well.
First look at this example:


Second look at the code:

Float columns with clear

Then after the floating elements we can "clear" the floats to push down the rest of the content.

.div-1a {
 float:left;
 width:190px;
 height:200px;
 background:#F03; }
.div-1b {
 float:left;
 width:190px;
 height:200px;
 background:#0CF;
.div-1c {
 clear:both;
 color:#333;
 background:#FF9; }


div-1a
div-1b
div-1c

How to create input type password

You just copy and past this....
<input type="password" name="pass" placeholder="Enter your password" />