Halloween Costume ideas 2015
Articles by "material"
@dorothiar #arttips #interview 101 2 Column Template 2012 mentee 2013 2013 mentee 2014 2014 mentee 2014 Portfolio Winner 2014 SCBWI Portfolio Mentorship Winner 2015 mentee 3 Column Template 360 3d 3d print 3d printing 3delight 8bit Abbey McCulloch abstract acryla gouache acrylic action addon adobe Adobe Flash CS3 Adobe Illustrator Advanced Tutorials advection Advertising advice Agata Wierzbicka agents airplane Al Wiseman ALA Alan E. Cober Alan Lee Alex Ross Alexandra Compain-Tissier Alexandra Lekias Alexandra Levasseur Alexandre Korobov Alexis Winter algorithm alien ALT Amelie Hegardt Amit Shimoni amusement an Ana Aranda analog Andrea Hrjnak Andrea Hrnjak andrea offermann andreaoffermann andreazuill Andy Musser Angela DiTerlizzi Angelika Peißker animal logic animals animation animation nodes anime anisculpt Anja Kroencke Anna Higgie Anna Jensen Anna McKay Annabel Briens AnneBerry Anneke Krull Annu Kilpeläinen anstudy anthology António Soares ar arduino area armature arrange array array modifier arrow art art director art directors Art is fun! art reps art tools Artaksiniya arthictecture arthur rackham artists artwork ase Ashlyn Anstee Asian aspiring asset atom attribute attribute transfer audio Audrey Kawasaki augmented reality aurasma Aurelius Battaglia author illustrator automatic automation Autumn Whitehurst avatar Avrom Yanovsky AW14/15 award awards Babeth Lafon Babies baboon Baby Love Background background color bacteria bake baking ball Bamboo banner Banner images banner making Barbara Dziadosz barcode basic bbox beads beats Bec Winnel beginner Bel Johnstone Ben Denison Bernie Fuchs Berto Martinez Beth Krush better photos bge Bijou Karman Bike biscuit bishop black and white black and white art Blair Breitenstein blam blender blender game engine blender3d blending Blinkie Blinky blob blocks Blog Tips blogger Blogging Friends blogs Blonde blur effect in pixlr and photoshop blur images and pictures bmesh bmesh viewer bolognaragazziaward bombing bone bone modeling bones book book launch books boomerang bottle bounding box bowl bpy brian eno brian ormiston Brian Sanders brian won brick bridge Bridget Davies bright Brooke Boynton Hughes build modifier building burns business Buttons bvh cage Caitlin Shearer caldecott calibration camera camera settings camera tips Candle capcom card career Carole Wilmet cartoony Cassandra Rhodin cast Catherine Campbell Cecilia Carlstedt cell center pivot centipede cg cg photography chair challenge Chanel changin color in pixlr changing color chaos character Character Bible character development charcoal charles Charlie Dot Charlie Hebdo Children children's book illustration chocolate Christina Drejenstam christina forshay Christina K christinaforshay Christmas Cindy Derby circle circle dance city cityengine clock clones cloning cloth Cloud based clover CMYK Coco Chanel Cody and the Fountain of Happiness coffee collect collection Collections collision color color balance color cast color correction color mode color study colorful Commercial Use complexity component compositing composition computational thinking computer concept art Condensed Posts conference connect connect the dot connection Connie Lim Conrad Roset constrain constrast contagion content Contest contracts control converter copy copyright Corinna Luyken count Courtney Brims crack Craft craftsmanship Craig & Karl creative creativity creature cricket Cristina Garcia Martin critic criticism critique Crop Crop Tool cross section crowd csv cubism curve curve modifier custom Custom Blog Design Custom Blog Design Tutorial Custom Blog Designers Custom Illustration custom properties Custom Signature custom xml cut cutting plane cycle cycles dae Damien Florébert Cuypers Dan Hillier dance Daniel Egnéus Daniel Segrove Danny Roberts Daren Newman Dasha Tolstikova data data path David Blossom david diaz David Shrigley David Stone Martin Dean Hardscrabble Debbie debbie ohi debbieohi deform deformer degrees deleting background in pixler demo demoscene desaturation of images design design by numbers design process Design Tips dictionaries dictionary Different Text Writing in Pixlr digital digital paint Digital Scrapbook Freebies Digital Scrapbooking disk distance distractions distribute diversion DIY DIY Contest Dolf Veenvliet Doll Doll Bones dolls domino domino effect doodle Doodles door doraemon Doris Jackson Dorothia Rohner dots dpi draw drawing drill driven driver drivers dual versions dummy duplicate duplicates duplication dupliframe dvd dynamic dynamic paint dynamic text E Simms Campbell Easy easy pixlr Easy Tutorials Ed Graham Ed Vebell editing editing photos editors education effect effects ego Eleanor Dalton electric Elia Fernández eliza wheeler Elizabeth Mayville elizawheeler Emily Forgot Emma Zanelli emoticon happy-face Emotional storytelling empathetic characters empty entoforms envy epicycloid EPS Illustration Epson scanner erasers Erin Armstrong Erin Petson erinoshea ernest shepard Esra Roise euler evaluate line Eveline Tarunadjaja evenly spacing vertex event everywhere door exhibition Expandable Posts experiments explode exploded view export expression extrude eye eye color in pixlr eye trick eyeball face rig facial expressions facial setup factory Faiyaz Jafri Families fashion illustration fashion week fcurve feature Featured Fee Harding Feedback fence Fernanda Guedes fibonacci Fifi Lapin file File Types Finalists Finding Nemo fire fix photos Flash Tutorials flicker flip flip flop floor flop flow flower Flowers fnmatch focal point follow up font Fontaine Anderson Fonts food footage For Sale force form formula fractal fracture frame Frames Francois Berthoud Frank Bellamy Frank Furlong Franklin McMahon freckles Fred Steffen FrederiqueBertrand Free for Commercial Use Free for Personal Use Free Stock Photography Free transform tool Freebies Frenchillustration Fritz Siebel frosted mylar fruit ninja Fumi Mini Nakamura Fun function futurism FW2017 fx Gabriel Moreno Gabriella Ibarra game game animation gameart gamma gangnam style Garance Doré Gary Fernandéz gel medium generate generative generator geometric geometry Gerald Lazare Géraldine Georges GIF Gildo Medina Girl Giuseppe Castellano Giveaway glorar goals golden ratio google google docs Google Tools Grant Young graph graphite graphite transfer grease pencil grid group group node growth Gucci Guest Guil Godier gustave dore hair handbook Harper's Bazaar harpercollins Harvey Schmidt Haute Couture head Headers heat map Helena Hauss hexagon hexagonal grid Hiroshi Mizuno Hiroshi Tanabe Holiday Holly Black homology honeycomb hook horror houdini how to how to blur a face or an object in pixlr How to change eye color how to delete an object how to desaturate an image how to edit a image in pixlr how to erase an object how to fix red eye problem how to fix red eyes in pixlt How to fix the parts in pixlr in photoshop How to make a banner in pixlr How to overlap the nevus how to remove a object How to remove an object in pixlr how to remove red eyes How to Remove the Background of an Image in Pixlr How to remove the parts that you don't want in pixlr and photoshop how to replace color How to write a Patterned Text in Pixlr how-to Hsiao-Ron Cheng hsv hue humor Hyshil I love illustration magazine idea ideas Igor+André illusion illustrating illustration illustration board Illustration Books Illustration Intensive Illustration Now! Fashion illustration process Illustrations Illustrative Berlin illustrator Illustrator Intensive Illustrator Tutorials iloveillustration magazine image ediditing lessons Image Ready image sequences image theft imaginative import import text import vertex color improving photos inbetween index visualizer Info Ingrid Bockting ink inktober input Inspiration inspirational quotes install instance instance switching intensive interaction Intermediate Tutorials internet interoperability interpolation intersect intersect edges intersecting intersection interview introduction invoke subprogram io ipad Irana Doucer Isabella Hemmersbach islam islamic iteration Izzie Klingels Jack Hearne Jack Tremblay James Dignan James Gurney japanese Jason Brooks Jean Kim Jeanne Detallante Jen and Chris Creed Photography jen betton Jen Rofé Jenny Mörtsell Jeremy Combot Jeslyn Kate Jesse Auersalo Jessica Jessica Lanan jessicalanan jewellery jewelry jiggle Jim Schaeffing Joe Bowler Joe Cleary Joe Isom Joe Krush Johanna Goodman john maeda John Vernon Lord joint Jordan Sondler JPEG JPG jpop juana martinez-neal juanamartinezneal Judge Judit Garcia Talavera Judith van den Hoek Judy Byron Schachner Jules Julien Julian Beever Julie Verhoeven Jump Break Tool JW Anderson K-Fai Steele Kaethe Butcher Kareem Iliya karel zeman Kate van Harreveld Kathrin Kuhn Kathryn Ault Noble Kathryn Noble Katie Kath kdtree Kei Meguro Kelly Beeman Kelly Light Kelly Smith kelly sonnack Kelly Thompson keyframe keyframing kidlit kidlitartists kimberlygee Kirkus Review Kisoo Chai Kodak Konstantin Kakanias Korean illustration Kotaro Chiba Kozue Himi Kremos Ksenia Finogeeva KT Smail kuler Kustaa Saksi Lanan Laptop larry gritz lasso tool latte lattice Laura Callaghan Laura Laine Lauren Rille layer layering Layla Holzer layout leaf learning learning blender LED Leendert meets Ingrid lego length Leonard Starr lessons levels LFW A/W 14 liangzhu liero lightbox lighting lightning Lina Bodén Lina Ekstrand Linda Dorn line line connect line drawing lines Links Linky Love Linn Olofsdotter Lionel Gilbert Lisa Anchin Lisa Billvik Lisa Krannichfeld lisaanchin lisbeth zwerger Liselotte Watkins list list comprehension List First Last listing locator lofting logo Logo Design Lola Dupré London Fashion Week loop looping loops looptools Lorraine Fox lossless lossy lost weekend lostweekend lotte reininger Louis Glanzman louis vuitton Luciana Rondolini luciograph LULU* lv Lynnie Zulu Mac macgyver macouno maeda Magda Antoniuk magic Magnus Voll Mathiassen mailing mailings maker Makiko Sugawa making banners Malika Favre MAMP mandala manga map map range maplelam mapping Marcel George Maren Esdar Margot Macé Margot van Huijkelom Maribeth Olson Marie El-Ahmar Marilyn Conover Marina Esmeraldo Marine Marbleindex mario Marlies Niemeijer Marsha Riti Martha Rago Martin Krusche Martine Johanna mask masking material materials math matrix matrix apply matryoshka Matt Baker matte medium Matthew Woodson maya maze mdd Meagan Morrison measure megaman Megan Hess Meizhen Xu Mel Crawford memory mentee mentees mentors mentorship program Mercer Mayer Meridth McKean Gimbel mesh mesh cutter meshlab Meta Tags metal gear rising Meyoko Mia Overgaard Micca mice Michael Sanderson Michela Picchi middle grade midi miku Milan milipede minidom Minima Mio Matsumoto mirror cut Misc Miss Blackbirdy miss maple's seeds Miss Take Mitchell Hooks mixamo mixing Mobile Apps mocap mod model modeling modifier modular modulation modulus mold molecule molly idle Molly Ruttan Molly Ruttan Illustration money monitors monkey mono-zero monster monster university morph morpher mosaic mosquito motion motion capture motion capture mouse motion trail moto360 mountain muji Muriel Wood Murray Tinkelman mushroom Music and Podcasts My dead pony Nadia Flower Naiad Einsel Naja Conrad-Hansen Natalie Brockett Natalie Foss nathan vegdahl nautilus Nav Bar navigation needle-felting negotiating Neil Boyle neon nescbwi14 nested New Blogger Questions New Blogger Template Tutorials new user pixlr new year new york New York Fashion week Newbery nicholas nicholas bishop Nicholas Hong Niki Pilkington Niso Ramponi nla No Software node node-based nodebox noise non linear animation Non-Web Font normal Noumeda Carbone npr number NURBS NYFW object object color change object info octopus offset Ola Volo Olaf Hayek old formats opaque projector open movie open shading language open source openshadinglanguage opensoundcontrol optical organization origami original art show Ornaments osc Oscar Schlienger osipa osl outline outliner output Pages paint paint weight painting painting on illustration board painting on wood painting with movie painting with numbers Pair pandas panorama Paper paper lantern parabola parametric parent parenting particle particle info node particles pat david Pat Zietlow Miller pattern Patterned Text Paul Faassen Paul X. Johnson Paula Sanz Caballero PC pdb pebbles pencil Pencil Sketch pencils Penguin perfume perlin Peter Helck Photo CD.8B photo editing software Photo Reference Photobucket photographing art Photographs photography photomerge photoshop Photoshop Brushes Photoshop CS3 Photoshop elements photoshop pixlr desaturaion Photoshop tips Photoshop Tutorials Picture Book Builders picture books Pierre Louis Mascia Piet Paris Pietari Posti pingpong pinnochio pipes pixar pixel pixel art pixel generator pixlr Pixlr advanced Pixlr blog pixlr desaturate keep a colorful part pixlr editting pixlr express Pixlr forum Pixlr free transform Pixlr Lesson Pixlr lessons Pixlr mobile Pixlr resizing images pixlr shortcuts Pixlr tools pixlr tutorial pixlr tutorial with pictures Pixlr Tutorials pixlr white black pixlr.com plant plot plotting ply PNG PNG Illustration podcast point point color pointilism polka dots polyCut polygon Pomme Chan pop-overs portfolio Portfolio award portfolio showcase portfolio-advice portrait position Post Dividers postcard poster Posting pot powdered graphite powerhousemuseum Prada presentation print printmaking Prize procedular procedural process processing programming projection Promotion property prototype PSD psy publishing pulse puppet puppetry pydriver pydrivers pyhandler pyhandlers pyramide python quad quick select set quick tips qumarion Rabbit Moon Rachel Ryle radians radius ramp random random motion randomization randomize range float raspi Ray Houlihan reading reading XML READY-TO-WEAR realflow Rebecca Clarke rebecca dautremer Rebecka Skog rebuild recursive recursivedrawing red eye remove reducing glare reference referencing release remesh modifier remix removal remove remove red eyes remove unwanted objects Removing backgroung render rendering renderman repeat repeater repeating replace replacement replacing color representation rerouter resample resampling research Resizing image resolutions retopology retro review revolve rgb rib Ricardo Fumanal Richard Scarry rig rigging rigify Rikke Jorgensen ring ripple roadkill Robert Heindel Robert J. Lee Robert McCloskey Robert Shore Roberta Zeta Robin Rosenthal robot robotic rocks Rodolfo Montalvo Roller Coaster rotation Rousseau rsl Rubin Pfeffer ruler tool Russ Mills russian rut S/S14 S/S15 S/S16 Sabine Pieper sadako Saftey Pins Sainte Maria Sale Sam Weber Sanda Suy Sandy Kossin santoso Sara Andreasson Sara Singh Sarah Jacoby saturation artist tools scan scanners scanning scatter scbwi SCBWI 2015 mentee SCBWI conference scbwi germany SCBWI mentorship scbwi-la scratch scratchboards screensaver screw screw modifier script scrub sculpting seamless Seamless Patterns Search Engines select by material select by name select by type SEO sequence series set keyframe set keyframes shader shading shadow Shannon Stirnweis shape grammars shape key shapekeys shapes shards shatter Sheilah Beckett shell ship shipping shipwright Shoes SHOWstudio shuffle Sid Barron Sidebar Titles Signature Silja Goetz silkworm Simon and Schuster Simon Varela simple simplicity simulation sine Site Engine Optimization Sjoukje Bierma sketch Sketches sketching skin skin modifier skinning slice slicing slides sloth slow parent smoke smoothstep SN snake Sneek Peek snippet Snow Snow White Snowflakes soccerball social media Social Media Buttons Social Networking society of illustrators Society6 soft body softbody Sonia Menti sound sound wave space spaceship sparta special spider spiderman spiderweb spin spiral Spiros Halaris Spiros Halaris x Urban Decay spline Spot Healing Tool spreadsheet SS16 stack stacking stair stamp Stan Galli star starfish stencyl step Steven G. Dobson still Stina Persson stone stones storytelling strand strand info strands street art string stripes structure studies studio style stylistic summary Summary Posts Summer sun supplies surface Susan Farrington suzanne Suzanne Kaufman sverchok swatch switch sydney system table table of contents take out background Tal Drori tangent tangled Taschen teaching teapot Template Templates tentacle Tess Jacobson Tex Avery text text editor Text Formats Text Styles in Pixlr texture texturing The Cartorialist The Grudge Keeper The Purple Book thinker1 Thomas B. Sawyer thread TIFF tile tilecam tiling time time code Tina Berning Tina Kugler tips tips for artists Toby Neilan Tom Baxter Tom Bjarnason tombow tomie depaola tool tools topology tower Tracy Turnbull Train transfer drawing transferring sketch transform transformation transit travel triangle wave Tricia Springstubb trigger tris tristan lock tube tubes Tutorials twitter type tool typeface typography unbake unity3d universal unquad utah uv valentine Valentino Valerie Servais vanilla variable variation variety vase vector vectorized Velwyn Yossy venus Veronica Ballart Lilja vertex vertex color vertex group vertex paint vertex weight VFX Victoria Boysen video Videos viewer Vintage virtual virtual studio visualization vivid vividfestival VOGUE volumetric voronoi Vote voxel voxelated voxelation walking teapot Walter Einsel wand tool water soluble graphite watercolor wav wave we need diverse books web webbing Week Themes weight welcome Wendy magazine Wendy Plovmand what casues red eyes What is Pixlr Wherever You Go Wide Awake Bear wiggle Will Davies Winner Winnie Fitch Winnie Truong Winter wire wired wireframe wolfram Woman wood woodwork wool wooly wordpress work workflow World writing writing XML www.pixlr.com XML YA yayoi kusama Yelena Bryksenkova yoda Yoko Furusho Yuliya zaha hadid zen zsphere

I have a feeling that Blender Game Engine (BGE) is very under-utilized by many of Blender Artists. BGE can certainly do a lot that is not necessarily for game creation, but potentially useful and powerful.

I had looked at BGE some times ago while reading one of the available book on BGE and now decided to look further details.

In the past, I casually made these using BGE:
- Interactive 3D Portfolio
- 360 viewer

Hopefully, we can together come up with simple ideas that can be useful for general usages.

INTERACTIVE + REAL-TIME

Recently, I found some big interest in interactive applications and real-time Computer Graphics creations. Game productions make use of these "procedural" real-time stuffs. Animation (like dynamic), music/sound, shaders, etc. all working and can be controlled in real time.

The great thing about game or interactive applications is its immediacy. Unlike Film production where we need to worry about render time where the result is final, in Game production, we will end up with products and applications that is interactive and continuously being changed and rendered in real time. The users have control over the final product.

I mean, this is obvious, right? But very powerful if you think about it.

If we can connect the interactivity and real-time nature, we can create automation which relates to robotic. Customization is also possible.

UNITY 3D

By some chances, recently I had access to a game design workshop on Unity at Sydney's Powerhouse Museum. It is basic workshop for young brilliant kids (7+), however, I like the approach of going through a complete project from A to Z.

The teacher at Powerhouse Museum, James, said their method is to teach game hollistically. Meaning like going through whole production, not getting too much details with things, but giving enough general (yet complete) understanding of game production and design concepts, so that learners can then continue on their own.

I found that Unity 3D is a very "scripted" game authoring tool. You need to know or understand programming or coding if you want to go far. However, Unity is also very good and organized. I love the Unity interface and workflow.

Unity works well with Blender.

There is this great book on Unity by Penny de Byl:
http://holistic3d.com

The book is very balanced in Technical and Artistic contents.

SCRATCH AND STENCYL

If programming and coding feels scary, you can start with Scratch programming. Then you can move to Stencyl, which is like a more advanced version of Scratch, specially made for game programming.

These kind of tools are great for starting.

Blender BGE & its Python programming

BGE is interesting. Unlike other 3D packages, BGE inside Blender is quite solid. It is probably "limited", but it is sufficient for many applications or game creations, and can be expanded.

I am hoping that slowly, I can collect some informations about BGE and Python game programming and reshare it with you as I understand it.

These areas are what I interest the most

  • Animation and Procedural Animation
  • Procedural Shader (GLSL, CG language)
  • Some scripting trigger and action, such as creating control and automation

USING BGE AS MOSQUITO REPELLANT

Ok, this one is probably the weirdest subtitle you will ever read, that sounds like totally unrelated to Blender.

But read through, it will make sense very soon :]

We are going to create a super simple Colorful Motion Graphics "Mosquito Repellant" using BGE. How can that possible? Let me explain.

Do you often have Mosquito problem at home? Everyone must have experienced how annoying it is to have mosquito flying around before sleeping. You can turn on Air Conditioner, mosquitos are usually afraid of cold temperature. But for me, I don't like using A/C to repell them.

I figure out a strange theory that mosquitos are either attracted or totally distracted by a bright colorful light that keeps on changing. So, if you actually have a "computer screensaver" that keeps on changing color, mosquito will stop disturbing you (hopefully). Work best in a dark bedroom.

NOTE:
If you have iPad or iPhone, I recommend this app called "Flashlight" that allows you to create a changing color. Other smartphones probably can find similar apps.

ANYWAY, for the rest of people without iPad or iPhone, do not be afraid or feel disappointed, we have a computer (with monitor) and Blender, and definitely we can create that "Flashlight" program. Very easily and no programming or coding!

We just need to use this ability in BGE:
Changing Color (RGB) value and Alpha transparency of an Object in Blender and make it Looping.

When I am researching for "how to change Material color" in BGE, I found too many answers. Some answers are too old (older version of Blender) and some are not straight forward. However, luckily, there are few exceptional people that explain and answer the right problem, the right way.

Blender always needs more Blender evangelists and teachers who are developers and artists. Thanks to forum like Blender Artists and many blogs out there, everyone can continue advancing their Blender skills.

This one video tutorial helps me a lot.
http://www.youtube.com/watch?v=jodWo9ryb4E

Another one also really good demo showing the capability.:
http://www.blenderartist.org/forum/showthread.php?299708-Changing-opacity-of-objects
http://www.youtube.com/watch?v=N2jbxH3BTyQ

More useful links that is related to the topic:
http://blenderartists.org/forum/showthread.php?126051-BGE-materials-textures
http://blenderartists.org/forum/showthread.php?325609-How-set-object-s-material-and-texture-in-game-using-python-script-BGE-python
http://blenderartists.org/forum/showthread.php?202264-Changing-material-in-bge

So, apparently there are many ways you can setup "Object with changing color" using BGE:

  • Use Python scripting way to change color in realtime, this is more sophisticated and can make a more interesting application.
  • Use Blender Actions (Animation). Luckily, thgis method is actually quite simple. It can be made by anyone, even someone who use Blender for the first time.

Once you have the Material setup for object and simple animation of changing color, you then just need to LOOP the animation of changing color and then run the BGE creation as a Standalone application.

Enough talk, let's make it.

1. Startup BGE scene
What we are going to create is very, very simple. We just need an object that continuously changes color overtime. Since the final will be a BGE application, it will run in realtime.

ENVIRONMENT: Set Blender to "Blender Game" environment. You should find this option at the top bar.

CAMERA: Reset the default camera, zero the Position and Rotation in the properties and then slightly bring it up.
The final Game/Application should make use of this camera view.

For our application, we really only need a flat basic Plane Mesh with Material that changes color.

Just for reference (on how camera is facing the senece, I added Suzanne the Monkey object, I smooth her and add some divisions. The setup is like below. We can have 3D view on the left and another 3D view on the right layout.

Remember hitting P will activate the Game Engine and hitting ESC will escape that running BGE.


We can test our BGE application using Standalone Player. Which should result like below. You see how in Standalone app we are getting a view from camera. This is what we want.


We get just black looking render, because we have not applied shader yet. We will do that next.

You can set Standalone playback test to be Full Screen.

2. Apply GLSL Materials
Change BGE environment setup to use "GLSL" for rendering. --- CORRECTION: Use "MultiTexture" if you want below to work.

Add some Materials to the object. For my scene, I give Blue Material for the flat Plane and Red Material for the Monkey.

Test the game.


That is the default basic materials. Notice how the default light is shading the scene and the Materials look quite nice.

Look at this old BGE tutorial, I like the simpliticy of this tutorial and look at the result, it is so good looking even back then. Today, with GLSL render, we can get a lot better looking result:
http://otothecleaner.free.fr/tutorials/LevelDesign2/level4/level2-4.html

3. Get rid of jaggies/aliasing.
You may notice the jagginess of Suzanne. We do not really need Suzanne but anyway, increase the AA (anti-aliasing) Samples to higher than zero and now you have a nice smooth blending between Suzanne and the background.

No jagginess on the edge of the monkey.
I actually like BGE real-time renderers look. With proper texturing, nice GLSL shader, you can have a very nice 3D visualization. Definitely something to explore at later stage.

4. Make flat Material (WARNING: Blender Bug) --- Read below, but SKIP FOR LATER
For our purpose, we do not really need a light shading, we actually just make the Material = Shadeless.

HOWEVER, if you at this stage make the Material = Shadeless, there is a bug in BGE that will completely make the next step is not working.

So, I think it is best to make the Material shader flat later. Please skip this step for later.

I recommend you to create Color Animation first, then make Shadeless.

NOTE: Unfortunately BUG like this happens. It took me a while to figure it out. I need to report this to Blender Foundation.

I could be wrong about the bug, but I am using Mac, and I tested many times, if I change Material to Shadeless, I use the ability to animate material color overtime.

CORRECTION:

The reason animation didn't work is because I use "GLSL" mode for BGE. Use "Multi Texture" for BGE instead.

If you want GLSL mode to work, you need to use Object Color. You can animate Alpha (transparency) of object this way.

If you make Shadeless before animating, you will not get the animation as expected. Weird and very annoying bug.

5. Changing Material Color
To change material color overtime, we simply animate the Color RGB. Set keyframes on Material Color, and change the color for 100-150 frames. The animation range is up to you actually.

6. Loop the animation in BGE.
This step is the most important for Blender Game Engine. We will LOOP the animation using Action actuator.

SENSORS: Always (enable that button greyed below)
CONTROLLERS: And
ACTUATORS: Action (use Ping Pong, set the Start and End Frame).

Ensure you select the right action related and linked to the object.

Connect all three.


You are basically done and if you playback in realtime, you will create an app that will repel the mosquitos. Really.


It's very simple, but you just created an applications that will work on any operating systems.

You can export it as a packaged app on Mac or exe on PC. Just enable the export as Stand-Alone Running Game inside the Add-On menu.

OF COURSE:
- You probably should add some basic UI to quit the app, etc. Simple controls/interactivity to rotate the monkey for example.
- Add other beautiful looping things

You may think you do not learn much, but wait for the next post in the series. This simple LOOPS is enough for you to create many useful apps. Even interactive point and click games for kids.

This looping thing is an introduction. You can create multiple scenes and add some button interaction to jump to different scene quite easy in BGE.
  • INTRO SCENE
  • LEVEL SCENE
  • CREDIT SCENE

BGE Color Changing, the Python Way

Below is a quicky example:


EXAMPLE CODE:
import bge
import random

cont = bge.logic.getCurrentController()
own = cont.owner

# print(random.random())
myR = random.random()
myG = random.random()
myB = random.random()
myAlpha = 1.0

newColor = [myR, myG, myB, myAlpha]

own.color = newColor

So with above Python script, we can randomly update and change the "Object Color". Apparently it is rather simple to modify the "color" attribute of Game Object like above.

Related Links:

Below is a really good YouTube channel to learn about BGE and Python scripting:

I will talk more about this in the next post. Don't rush in into Python Game scripting if you are not familiar with Python scripting.

What better is to understand the BGE workflow first. Knowing what can be achieved without script (with node alone) and with script.

In few weeks to come, I will borrow Mike Pan's book on Blender Game Engine (BGE) from the library, by then hopefully I can understand BGE better.

REGARDING THE GLSL PREVIEW BUG...

GLSL should be the mode where our game just works and displaying properly, but as you may notice, in 3D view, if we tap the P, the GLSL mode does not work properly. But it works on Stand Alone Player!

I am asking this GLSL issue at the forum here:

There is somewhat this "inconsistency" of Multi Texture mode, GLSL mode in BGE that sometimes bug me. Such as having to enable "Object Color" in order for GLSL to obey the Action animation of Color. I believe Multi Texture is the older mode for BGE.

Hopefully we get the answer soon.

UPDATE 2014.02.18:

I figure out myself why I am getting a weird result when using GLSL. Viewport Shading: Texture Mode and Solid Mode. It needs to be in Texture Mode!

By default, it is set to Solid Mode. For users switching to GLSL on BGE, when they press P and getting something flat like below:


All you need to do is change Viewport Shading from Solid to Texture.



And you should be getting a more expected BGE realtime playback below:

It was a bit dumb, but anyway, at least if you encountered this, you know how to fix it. I really think it should not be the default result, or at least there is a notification or something.

Now, the GLSL mode will require you to use Actions from "Object Color" if you ever want to animate the Color RGBA (RGB and Alpha transparency). Material Diffuse will not work. I have to double check this again, but I think that's correct. 

FURTHER ON...

Think of different ideas that uses ANIMATION and LOOPING for BGE, you can create SCREENSAVER application this way!

This kind of simple apps is something you can make quite easily using BGE. Of course, from simple apps, we can start building a more complex interactive apps, then games.

GLSL inside BGE

I feel challenged to get into GLSL Programming. I know this is probably more complicated than the OSL, but worth looking into.
http://en.wikibooks.org/wiki/GLSL_Programming/Blender/Minimal_Shader

Looking at some examples of GLSL on WebGL like below is quite amazing:
https://www.shadertoy.com


ONE MORE THING... DEMOSCENE

I don't have much knowledge or experience about things called "demoscene", however, I have seen some DEMOSCENES back then when Internet was still slow. There are some really memorable demoscene, which was tiny in file size, however, it was captivating.

I didn't see "demoscenes" as much, however, I think the artform is still growing.
https://www.youtube.com/watch?v=iRkZcTg1JWU

Now, I am really wondering if Blender Game Engine could be used for DEMOSCENE of some sort. Why not? I think it is there. It's open source, the BGE is great, easy to use. Maybe not 100% DEMOSCENE pure algorithms, however, imagine something that is more interactive, less linear, has some kind of narrative, you got something that is kind of DEMOSCENE. It can be poetic, but most important, it needs to be REALTIME, not rendered. Maybe it also needs funky Machine Made tunes? Tell me what you think in the comments, if you have similar thought. Thanks!

UPDATE 20140216

Researching around the idea of using BGE more than just for game creation, I stumbled into this old post from Blender Nation. Mike's Pan examples. Will check if these examples still work, maybe can learn few tricks.
http://www.blendernation.com/2006/12/03/using-blenders-game-engine-for-more-than-just-games/



The next thing I am curious about is on how Blender Python does keyframing for animation.

We already know how to LIST, how to MODIFY VALUES, now we see how we can KEYFRAME VALUES using Python.

SIMPLE LOCATION KEYFRAME
Reference:
http://www.blender.org/forum/viewtopic.php?t=22602&sid=546436de57ad2f620b88ef9d8d8cfddb

From the forum post above, we have one cool code that we can observe. The code presented seems to work on currently selected object, it basically made 1000 keyframes (for Location) of currently selected object: These 2 BPY below does the keyframing job.


bpy.context.scene.frame_current = i 
bpy.ops.anim.keyframe_insert(type='Location')


I modified the script slightly, by changing the object positions using Random values.

USING WHILE LOOP FOR KEYFRAMING RANDOM POSITION

If we use While Loop and Random Positions:


import bpy
import random

i = 0

while(i <= 100): 
    bpy.context.scene.frame_current = i 
    bpy.ops.anim.keyframe_insert(type='Location')
    
    movx = random.uniform(-5,5)
    movy = random.uniform(-5,5)
    movz = random.uniform(-5,5)
     
    bpy.data.objects['Cube'].location = (movx, movy, movz)
    i += 1


Using While Loop like above for keyframing animation, we basically tell Blender to step one frame and create keyframes. The result is a dense keyframes like Motion Capture data.

Of course we can change that behaviour of keyframe stepping by changing that i += 1 expression at the bottom to a different value.


import bpy
import random

i = 0

while(i <= 100): 
    bpy.context.scene.frame_current = i 
    bpy.ops.anim.keyframe_insert(type='Location')
    
    movx = random.uniform(-5,5)
    movy = random.uniform(-5,5)
    movz = random.uniform(-5,5)
     
    bpy.data.objects['Cube'].location = (movx, movy, movz)
    i += 20



USING FOR LOOP FOR KEYFRAMING  RANDOM POSITION
If we use For Loop, range() function we can have different control on where Blender should create a keyframe. For this example code below, it is basically telling Blender to set keyframe every 5th of the frame between range of frames 0 - 100.


import bpy
import random

for i in range(0,100,5): 
    bpy.context.scene.frame_current = i 
    bpy.ops.anim.keyframe_insert(type='Location')
    
    movx = random.uniform(-5,5)
    movy = random.uniform(-5,5)
    movz = random.uniform(-5,5)
     
    bpy.data.objects['Cube'].location = (movx, movy, movz)



Next example below is the same code as above, but works on multiple objects (that are currently selected):



import bpy
import random

objects = bpy.context.selected_objects

for i in range(0,100,5):     
    for object in objects:    
        bpy.context.scene.frame_current = i 
        bpy.ops.anim.keyframe_insert(type='Location')
        
        movx = random.uniform(-5,5)
        movy = random.uniform(-5,5)
        movz = random.uniform(-5,5)
         
        object.location = (movx, movy, movz)




Nothing really special here, other than the fact we can tell Blender to move forward in timeline and set keyframe. Super simple, but you can already do quite a lot with this.

It is a good start of procedural creating animation in Python context.

ANOTHER WAY TO SET KEYFRAME
I just do a quick experiment, apparently you can also do keyframing by doing this:

bpy.data.objects[NAME].keyframe_insert(DATAPATH, frame=FRAMENUMBER)

For example:
bpy.data.objects['Cube'].keyframe_insert('location', frame=15)
>> Set kefyrame for object named Cube, for it's 'location' datapath, at frame 15.

Doing this seems to be more specific and directly targeting the object.

Let's give it a try.

To find DATA PATH, I usually check from the Channel or Property, by RMB (right mouse button) click and Copy Data Path:


Typical Data Path, as below:

  • 'location'
  • 'rotation_euler'
  • 'scale'
But Data Path can be anything, including custom attributes, could be the Material and its attributes.

RANDOM SCALE
Below example will randomize the Scale and set key every 5 frames and I am using this different method.

import bpy
import random

objects = bpy.context.selected_objects

for i in range(0,100,5):     
    for object in objects:    
        bpy.context.scene.frame_current = i 
        #print(i)
        #bpy.ops.anim.keyframe_insert(type='Location')
        
        scalex = random.uniform(1.0,4.0)
        scaley = random.uniform(1.0,4.0)
        scalez = random.uniform(1.0,4.0)
        
        object.scale = scalex, scaley, scalez
        
        object.keyframe_insert('scale')


Using the same pattern above, we can actually be specific on when we like to set keyframe. Let say, we want to specifically keyframe the Scale at frames: 50, 100, 150, 200, we simply change the loop like below:


import bpy
import random

objects = bpy.context.selected_objects

for i in [50,100,150,200]:     
    for object in objects:    
        bpy.context.scene.frame_current = i 
        #print(i)
        #bpy.ops.anim.keyframe_insert(type='Location')
        
        scalex = random.uniform(1.0,4.0)
        scaley = random.uniform(1.0,4.0)
        scalez = random.uniform(1.0,4.0)
        
        object.scale = scalex, scaley, scalez
        
        object.keyframe_insert('scale')



KEYFRAMING MATERIAL PROPERTY

Let's try applying random keyframes on Material 'diffuse_color' of selected object.

Now, with things like these, we need to be careful and ask ourselves:

  • Does our object already have material? Should we create one using Python if the object does not have material?
  • Do we want to just give random Diffuse Color to all Material in the scene? Maybe not. We want to specifically target the Material currently applied to our selected object.
RANDOM OBJECT COLOR
Before going to Material, we can actually do Object Color for simplicity. Any object in the scene will have Object Color attribute by default that we can color.

import bpy
import random

objects = bpy.context.selected_objects

for i in range(0,100,5):     
    for object in objects:    
        bpy.context.scene.frame_current = i 
        #print(i)
        #bpy.ops.anim.keyframe_insert(type='Location')
        
        colorR = random.uniform(0.0,1.0)
        colorG = random.uniform(0.0,1.0)
        colorB = random.uniform(0.0,1.0)
        alpha = 1.0
        
        object.color = colorR, colorG, colorB, alpha
        
        object.keyframe_insert('color')

They are animating and changing color.

Object Color is interesting and so easy to access, maybe we can use it to do Animated Pixel Art?


RANDOM MATERIAL DIFFUSE COLOR
bpy.data.objects['Cube'].data.materials[NAME].keyframe_insert('diffuse_color')

The above Blender Python will insert a keyframe at current frame in the timeline. As you can see, with this method you are very specific with everything.

Let's try a code that does the keyframing of this Material Diffuse Color, of currently selected object. Usually with my code, I always start by making a Loop over every object, in selected objects, and every materials that are applied to this object. If we need to skip on anything, the code can then modified further.


import bpy
import random

objects = bpy.context.selected_objects

for i in range(0,100,5):     
    for object in objects:
        # Get all materials of currently selected object (if any)
        myMaterials = object.data.materials

        for material in myMaterials:
                    
            bpy.context.scene.frame_current = i 
            
            colorR = random.uniform(0.0,1.0)
            colorG = random.uniform(0.0,1.0)
            colorB = random.uniform(0.0,1.0)

            
            material.diffuse_color = colorR, colorG, colorB    
            material.keyframe_insert('diffuse_color')




Maybe we can also target certain Object and Material by its name? Yes, I think we can do that using the FILTERING code that I have mentioned previously.

CONCLUSION
From above examples, we have learned how to do keyframing for common attributes, which values we also randomized overtime.

Adding "animation" really makes the difference to previously static randomness.

Of course, it is still pretty boring and linear, but you can play around with the timing of the keyframe for each loops by offsetting the FRAME slightly. You can get like Airport Flicker Board effect.

But even for such simple animation like Scale value, from A to B, you can get pretty interesting result by offsetting the animation of an array of objects.

For example, if we like to OFFSET keyframe for every selected object:

import bpy

selected_objects = bpy.context.selected_objects

bpy.context.scene.frame_current = 1

for object in selected_objects:
    bpy.context.scene.frame_current += 3
    object.scale = 1.0, 1.0, 1.0
    object.keyframe_insert('scale')


This is a kind of thing that you cannot easily achieve with manual keyframing. Easy to add complexity. But it is always better to plan things.

There is one more thing that I have not tried:
To be able to Offset via Blender Action. Probably something to check out next. Especially in relation to Armature to generate some kind of crowd simulations.

To be honest, I like to do this kind of thing in more procedural way using nodes. But I guess for now, we can try setting it up using Python and maybe Dynamic Paint and Drivers.

The procedure we applied so far is always the same:
1. MAKE CHANGES: Randomize the value of attributes of array of objects.
2. SET KEYFRAMES: Keyframes those particular attributes at particular frame in time --> this is the NEW thing we learned today.

APPLICATION: Pixel Art Animation

Alrightly, we can now revisit the Pixel Art script and modify it slightly for our purpose.

Instead of using Vertex Color, we will simplify this further to use Object Color. We will also keyframe the Object Color.

The process will be like this:
- Initial Setup, the import of the grid and colorize Object Color using Pixel Art image.
- Keyframe the Object Color at certain frame
- Import another Pixel Art image and Modify the current setup
- Keyframe the Object Color at certain frame

The scripts will be something like below:

1. Import a Pixel Art, setup initial Grid Matrix of Pixel Cube.

import bpy

D = bpy.data

# Specify your image here, open it inside Blender Image Editor panel
image_file = 'ryu_16_16.png'
img = D.images[image_file]
pixels = list(img.pixels)
grouped_list = [pixels[ipx:ipx+4] for ipx in range(0, len(pixels), 4)]

# Get width and height of image (in pixel)
w = width = img.size[0]
h = height = img.size[1]
print("------LENGTH------")
print( len(img.pixels)//4)
print("------PIXEL------")
print(pixels)
print("---GROUPED-PIXEL---")
print(len(grouped_list))

# Create LIST of GRID XY value
rowColList=[]
for i in range(height):
    for j in range(width):
      rowColList.append(i)
      rowColList.append(j)

# SPLIT the LIST of XY
origList = rowColList
splitList = [origList[i:i+2] for i in range(0,len(origList),2)]

# Create a single material that respect Object Color
mat = bpy.data.materials.new('PixelObjectColorMat')
mat.use_object_color = True

for number in range(len(grouped_list)):
    # Separate RGBA into each own variables
    r = grouped_list[number][0]
    g = grouped_list[number][1]
    b = grouped_list[number][2]
    a = grouped_list[number][3]
    
    # Separate XY coordinate
    x=splitList[number][0]
    y=splitList[number][1]
    
    # Create cube at location XY
    bpy.ops.mesh.primitive_cube_add(location=(x-width/2, y-width/2, 0))
    
    selectedObject = bpy.context.selected_objects
    mesh = selectedObject[0]
    mesh.name = 'pixelcube.%s' % number
    mesh.scale = 0.45, 0.45, 0.45
    
    # Keep list of our mesh for further processing, this is one big array
    #pixelCubeObjects.append(mesh)
    # bpy.data.objects[pixel'cube.1022']
    
    # Apply our special Material
    bpy.context.object.data.materials.append(mat)
    
    # Assign RGBA color to Object Color
    mesh.color = r,g,b,a
    
    # Print the chatter progress
    print ('PixelCube {number} created at:'.format(number=number), x, y, ', with RGB color', r, g, b)



2. Set keyframes on each Pixel Cube Object Color.


import bpy

D = bpy.data

# Specify your image here, open it inside Blender Image Editor panel
image_file = 'ryu_16_16.png'
img = D.images[image_file]
pixels = list(img.pixels)
grouped_list = [pixels[ipx:ipx+4] for ipx in range(0, len(pixels), 4)]

# Get width and height of image (in pixel)
w = width = img.size[0]
h = height = img.size[1]

current_frame = 1 # # SET YOUR KEYFRAME HERE

for number in range(len( grouped_list )):
    bpy.data.objects['pixelcube.{number}'.format(number=number)].keyframe_insert('color', frame = current_frame)


3. Modify the color of each Pixel Cube Object Color with the new Pixel Art.

import bpy

D = bpy.data

# Specify your image here, open it inside Blender Image Editor panel
image_file = 'ken_16_16.png'
img = D.images[image_file]
pixels = list(img.pixels)
grouped_list = [pixels[ipx:ipx+4] for ipx in range(0, len(pixels), 4)]


# Get width and height of image (in pixel)
w = width = img.size[0]
h = height = img.size[1]
print("------LENGTH------")
print( len(img.pixels)//4)
print("------PIXEL------")
print(pixels)
print("---GROUPED-PIXEL---")
print(len(grouped_list))

for number in range(len( grouped_list )):
    
    r = grouped_list[number][0]
    g = grouped_list[number][1]
    b = grouped_list[number][2]
    a = grouped_list[number][3]
     
    print('-'*50)
    print(number)
    print(r,g,b,a)
    
    bpy.data.objects['pixelcube.{number}'.format(number=number)].color = r,g,b,a
     
4. Set keyframes AGAIN on each Pixel Cube Object Color (now with new Pixel Art)

import bpy

D = bpy.data

# Specify your image here, open it inside Blender Image Editor panel
image_file = 'ken_16_16.png'
img = D.images[image_file]
pixels = list(img.pixels)
grouped_list = [pixels[ipx:ipx+4] for ipx in range(0, len(pixels), 4)]

# Get width and height of image (in pixel)
w = width = img.size[0]
h = height = img.size[1]

current_frame = 60 # SET YOUR KEYFRAME HERE

for number in range(len( grouped_list )):
    bpy.data.objects['pixelcube.{number}'.format(number=number)].keyframe_insert('color', frame = current_frame)

.... and so on.

SOMETHING TO THINK ABOUT
Now that I look at the code above, I started to think that I need to apply "Top Down Design".

The code above works okey, but in order to make it more useful and easier to use for user, I probably need to tidy them up.

Before even thinking for creating UI, I probably need to simplify the code:
1. IMPORT: Import Pixel Art Image, limit to 64x64? Any bigger will be user's risk.
2. CREATE: Create 3D Cube array matrix based on Pixel Art.
3. MODIFY: If we like to modify, we need to specify the exact same Pixel Art dimension. This is easy to do as long we can access the same array of 3D Cube.
4. KEYFRAME: Keyframe the Object Color at certain frame.
5. VARIATION: Things like Offset is something to think about for best implementation.



I was casually reading some blog postings from other Blender artists/developers, when I stumbled into this interesting post by Oscurart:
http://oscurart.blogspot.com.au/2012/12/script-generador-id-color-mask.html

That blog post is in Spanish, but thanks to Google Translate, I can understand that he is showing a way to quickly randomize object Color using ColorRamp node in Cycles.

He provided a simple Python script that basically automatically create ColorRamp node in the Node Editor and assigning 30 random different color into ColorRamp constant. Check it on his blog post above.

What even more interesting is looking at his diagram where he plugs in a node called Object Info node into the Factor (Fac) slot and it does the job of giving "random" color for every object assigned with that one material.
This is node network that is shown by Oscurart , what is that OBJECT INFO node?
NOTE: You see, I have not looked into all the new nodes in Cycles recently. I did see Blender video on Particle Info node. I supposed that one also very cool in relation to Particle. I am still waiting for Particle Node system in Blender to execute before getting deep. But I supposed all these are worth looking, today.


OBJECT INFO NODE, SINCE WHEN?
Object Info node is apparently has been there since version 2.64. I pointed to this cool video tutorial by David Miller and he is also mentioning "Object Info" node as an update method in getting material color to randomize:
https://vimeo.com/40389198

Documentation and examples is scarce, but there are probably some posts talking about this "Object Info" node:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Object_Info


Anyways, from Oscurart blog post, looks like he is using it as Color ID Generator for Compositing purpose. For us, we can actually use this for some fancy renders.


THE NODE NETWORK FOR OBJECT INFO NODE
From Oscurart example, we see the node network is really simple. The main useful nodes here are:
  • Object Info node (under Input)
  • ColorRamp node (under Convertor)
This is like dejavu all over again when I first wrote my posts on Particles and how we can randomize object colors by using a Group of bunch of objects. Except that we are doing this inside the Node Editor and directly on the material. Another procedural method you can do within Blender.

OBJECT INFO: RANDOM + LINEAR RAMP



OBJECT INFO: RANDOM + RAMP WITH MORE THAN TWO COLORS



OBJECT INFO: LOCATION + NOISE



OBJECT INFO:LOCATION + IMAGE TEXTURE
Out of curiosity, I inserted Image Texture node as the source of color, with the Factor coming from Object Info: Location. 

Apparently it works too! Very neat. You can probably create LED grid animation easily this way. All we need to take care is really the Location of each of those objects in the scene, this will be considered as the UV location to remap the color, I am guessing. It probably needs some proper Math node configuration to make sure that the Location value is between 0 to 1 (normalized), kind of what UV usually like. If object moves, the color will slide away. That is kind of the limitation of this, it is object space dependent. There must a work around it.


(The artwork above is an avatar of my friend that was created handmade by orphanage kids in Indonesia. Very neat looking avatar, don't you think?)

Now, I need to research regarding how to Normalize properly.

Looks like I am doing it wrong. Giving random color based on Color Pixel of Image Texture seems to work, but below "normalize" method is probably wrong.



The funny thing is if I change the SCALE it seems to kind of work. But I want a better solution.



Anyone knows how to do this more correctly? Please let me know.

PLUG IT INTO CELL FRACTURED OBJECT = INSTANT RANDOMIZED COLOR

Hope this one is useful for your works.

I will look around for Object Info related information at the forum, maybe I could find more and I will append more information here.

UPDATE 2012.12.24

Found this:
http://blenderartists.org/forum/showthread.php?216866-Cycles-tests-the-new-blender-CPU-GPU-renderer-of-awesomeness/page185

By Sanne:


I tested  the network above and use multiple Texture, multiple UV on the 5 objects. What would be even nicer is to find out a way to Randomize a bunch of Textures and UVs into a single Material network.


Then I found this blog post:

By Andreu Cabre:
http://www.andreucabre.com/2012/02/multiple-uvs-and-decals-in-cycles.html

Definitely worth a study there.

CONCLUSION
Blender Cycles and its node network are getting really quite interesting and advanced, I have to keep up!

Before I am digging too far, basically for now, happy to find out that we can easily:

  • Randomize Material Color using Object Info Node and ColorRamp
  • Apply Material Color based on File Texture.

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget