#define IOR_THRESHOLD 1.000000001
float Fresnel_Dielectric(vector i, normal n, float eta)
{
//see https://en.wikipedia.org/wiki/Fresnel_equations
float c = fabs(dot(i, n));
float g = eta * eta - 1 + c * c;
float result = 1.0;
if (g > 0) {
g = sqrt(g);
float a = (g - c) / (g + c);
float b = (c * (g + c) - 1) / (c * (g + c) + 1);
result = 0.5 * a * a * (1 + b * b);
}
return result;
}
shader glass(
color diffuse_col = 1.8,
float ior = 1.45,
output closure color bsdf = 0)
{
float real_ior = max(ior, IOR_THRESHOLD);
float eta = backfacing()? 1.0 / real_ior : real_ior;
float fr = Fresnel_Dielectric(I, N, eta);
bsdf = diffuse_col * (fr * reflection(N) + (1.0 - fr) * refraction(N, eta));
}
2D, 3D, game, games, online game, game development, game engine, programming, OpenGL, Open AI, math, graphics, design, graphic, graphics, game development, game engine, programming, web development, web art, web graphic, arts, tutorial, tutorials,
miercuri, 4 octombrie 2017
Blender 3D - Open Shading Language tutorial - part 001 .
Using this tutorial about Open Shading Language, you can try a glass shader.
The source code show a simple use for Fresnel equations.
The backfacing() and raytype() are two functions that provide the shader some information about the
state of the renderer and the scene at the time of evaluation.
I used just backfacing(), because is a raw example of this Fresnel equations.
As you can see the I, N, eta inputs from Fresnel_Dielectric() is used to get a result variable fr.
The all result of this shader is bsdf like a equation.
See the next code:
Posted by
Cătălin George Feștilă
Labels:
2017,
3D,
blender,
Blender 3D,
Open Shading Language,
open source,
OSL,
source code,
tutorial,
tutorials

luni, 2 octombrie 2017
The Skanect software tool for 3D .
The official website come with this intro:
With Skanect, capturing a full color 3D model of an object, a person or a room has never been so easy and affordable. Skanect transforms your Structure Sensor, Microsoft Kinect or Asus Xtion camera into a low cost 3D scanner able to create 3D meshes out of real scenes in a few minutes. Enter the world of 3D scanning now!
Come with free and paid solution, need a good 3D sensor ( see official features on web) and GPU with CUDA.
I install this software and has a good interface.
With Skanect, capturing a full color 3D model of an object, a person or a room has never been so easy and affordable. Skanect transforms your Structure Sensor, Microsoft Kinect or Asus Xtion camera into a low cost 3D scanner able to create 3D meshes out of real scenes in a few minutes. Enter the world of 3D scanning now!
Come with free and paid solution, need a good 3D sensor ( see official features on web) and GPU with CUDA.
I install this software and has a good interface.
duminică, 1 octombrie 2017
The Storyboarder free tool.
The development team tell us about this free tool named Storyboarder:
Storyboarder makes it easy to visualize a story as fast you can draw stick figures. Quickly draw to test if a story idea works. Create and show animatics to others. Express your story idea without making a movie.
...
Wonder Unit is a studio that makes movies. We spend a lot of time in creative development, building tools, and being smarter about creating the best stories.
This tool come with six simple drawing tools , boards (add a board, draw, duplicate, copy, paste) and metadata for a board (duration, dialogue, action and note).
How can be used this tool?
You can start with your script or an empty board.
Then just draw each board and add all settings like: duration, dialogue, action and note.
You can export your work to Premiere, Final Cut, Avid, PDF, or Animated GIF.
You can edit your board with Photoshop.
You can improve this software with your source code using github.com - storyboarder.
You can download it from official website.
Storyboarder makes it easy to visualize a story as fast you can draw stick figures. Quickly draw to test if a story idea works. Create and show animatics to others. Express your story idea without making a movie.
...
Wonder Unit is a studio that makes movies. We spend a lot of time in creative development, building tools, and being smarter about creating the best stories.
This tool come with six simple drawing tools , boards (add a board, draw, duplicate, copy, paste) and metadata for a board (duration, dialogue, action and note).
How can be used this tool?
You can start with your script or an empty board.
Then just draw each board and add all settings like: duration, dialogue, action and note.
You can export your work to Premiere, Final Cut, Avid, PDF, or Animated GIF.
You can edit your board with Photoshop.
You can improve this software with your source code using github.com - storyboarder.
You can download it from official website.

sâmbătă, 30 septembrie 2017
The EaselJS java script libraries.
The team development teel us:
A suite of modular libraries and tools which work together or independently to enable rich interactive content on open web technologies via HTML5.
To include the EaselJS libraries in your project by linking to the CreateJS CDN it is necessary to link them with script tag :
A suite of modular libraries and tools which work together or independently to enable rich interactive content on open web technologies via HTML5.
- EASELJS - working with the HTML5 Canvas;
- TWEENJS - for tweening and animating HTML5 and JavaScript properties;
- SOUNDJS - work with audio on the web;
- PRELOADJS - manage and co-ordinate the loading of assets and data;
To include the EaselJS libraries in your project by linking to the CreateJS CDN it is necessary to link them with script tag :
src="https://code.createjs.com/easeljs-0.8.2.min.js"
The official site offers readers only some modest demo about the capabilities of these libraries for creating web content.
Posted by
Cătălin George Feștilă
Labels:
2017,
2D,
3D,
createjs,
design,
graphics,
html5,
javascript,
web development

Abonați-vă la:
Postări (Atom)