Twitter

Blender 3D – crystal toon with nodes.

Today I will show you how to make one crystal toon material using nodes under Blender 3D software.
First you need to have one object and then to select Cycles Render. This allow you to use nodes.
Add one material to your object. Open your Node Editor window and use this nodes:
material_crystal_001
Use Shift+A keys to find the nodes. For Maximum use Math keyword and change from Add to Maximum.

Blender 3D – unlink wood cycles material.

As you know Blender 3D let you to link parts of your scene to another scene.
If you want to change it then you need to make this local.
For example , today I will show you how to do one raw wood material with cycles node editor.
Use your object and add one material and named it: wood.
Using node editor make this material:
wood002
Press F12 key to see the result. The result will be like this:wood001
Save your scene and then open another scene and then using this keys Ctr+Alt+O to Link to Library your material wood.
You will see you have the material wood into new scene. If you want to change this material then you need to make it local.
To do that select your material and click to the arrow like into image bellow:
wood003

Shader x-ray effect with Three.js .

This source code running with Three.js javascript library.

I used just three.min.js, OBJLoader.js and ColladaLoader.js to make the x-ray effect.

I load one 3d object and using vertex and fragment shaders I rendered it.

The object is a castle and is named: cube2.dae.

This object is loaded with load function from OBJLoader.js.

Then all steps come to show this object using shaders.

<!DOCTYPE html>
<html>

<head>
<title>shaders x-ray effect</title>
<script src=”three.min.js”></script>
<script src=”OBJLoader.js”></script>
<script src=”ColladaLoader.js”></script>

<script id=”vertexShader” type=”x-shader/x-vertex”>
uniform float p;
varying float intensity;
void main()
{
vec3 vNormal = normalize( normalMatrix * normal );
intensity = pow(1.0 – abs(dot(vNormal, vec3(0, 0, 1))), p);
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script>

<script id=”fragmentShader” type=”x-shader/x-vertex”>
uniform vec3 glowColor;
varying float intensity;
void main()
{
vec3 glow = glowColor * intensity;
gl_FragColor = vec4( glow, 1.0 );
}
</script>
<style>
html, body {
height: 100%;
margin: 0;
overflow: hidden;
}
canvas {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<script>
window.addEventListener(‘load’, function () {
var human;

var $ = document.querySelector.bind(document);

var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(45, 1, 0.1, 30);
var renderer = new THREE.WebGLRenderer({antialias: true, alpha: true});

renderer.setClearColor(0x000000, 1.0);

lookAt = scene.position;
lookAt.y = 10;
camera.lookAt(lookAt);

document.body.appendChild(renderer.domElement);

var customMaterial = new THREE.ShaderMaterial({
uniforms: {
p: { type: “f”, value: 3 },
glowColor: { type: “c”, value: new THREE.Color(0x84ccff) },
},
vertexShader: $(‘#vertexShader’).text,
fragmentShader: $(‘#fragmentShader’).text,
side: THREE.DoubleSide,
blending: THREE.AdditiveBlending,
transparent: true,
depthWrite: false
});

var loader = new THREE.ColladaLoader();
loader.options.convertUpAxis = true;
loader.load(‘cube2.dae’, function (collada) {
dae = collada.scene;

dae.traverse( function ( child ) {

if (child instanceof THREE.Mesh) {
child.material = customMaterial;
}

} );

dae.position.y = 0;
dae.scale.x = 1;
dae.scale.y = 1;
dae.scale.z = 1;
human = dae;
scene.add(human);
});

function resize() {
var canvas = renderer.domElement;
var width  = canvas.clientWidth;
var height = canvas.clientHeight;
if (canvas.width !== width || canvas.height !== height) {
renderer.setSize(width, height, false);
camera.aspect = width / height;
camera.updateProjectionMatrix();
}
}

function render(time) {
time *= 0.001;

resize();

camera.position.x = -20 * (Math.cos(time));
camera.position.z = (20 * (Math.sin(time)));
camera.position.y = 20;

camera.lookAt(lookAt);

renderer.render(scene, camera);
requestAnimationFrame(render);
}
requestAnimationFrame(render);

});
</script>
</body>

</html>

The result is this:
x-ray_effect

Blender 3D – addon to export your model online.

After you make your model under Blender 3D you can share it with one great addon to this website.
This is my model share with this addon:

Split wood 001
by catafest
on Sketchfab

To add this addon go to File – User Preferences – Addons and search with this word: sketchfab. Check this addon and the presss Save User Settings.
Make your model with materials , UV maps, textures and normal textures to have a great model.
When your model is finished then press T key to see the left panel and you will see Upload tab (first is Tool tab and the last is Upload).
You need to have a account to the website. Fill with your email adress and then you need to press OK button to get one mail with the Api Key. Because you cannot put with copy paste from your mail to Blender 3D use this tips and tricks.
Copy your Api Key from your mail and open a text into Blender 3D – TextEditor and then use copy – paste to fill the input named Api Key.
With your 3d model then just press Upload and then after few seconds View Online Model button to open browser with your model under sketchfab website.
See this image for setup your Api Key with your token:
sketchfab_001

Mono editor – tips and tricks – part 001.

Today I started a new type of tutorials about Mono Editor.
You can be able to deal with huge programming parts.
Just start your Mono Editor and go to Tools – Options….
Under Text editor you need to check all for unfold your C# scripts.
Also you need to set: Leave line endings as is.
See image bellow:
Mono_editor_folding