text:
How to export into .3ds and keep materials?
I have a model that has all materials applied.
I use Blender export feature, click 3DS Max, save the file, but if I import that same file back into Blender, it loses all the materials -> they're converted on a white colour. Materials are based on an image texture. The file also loses the UV. What am I doing wrong?

Where are you trying to export to, what other software will you be using this in? 3Ds file format doesn't support exporting materials, beyond basic properties like colors and UV coordinates, as far as I know. In fact most exchange formats have very limited or basic material support, since materials are a inherent and specific property of the rendering system and very much tied to the engine they were created with, as far as I understand.

I'm actually selling this one on Turbosquid, thought more formats I have, the better, but I found out that those exported formats don't work properly so I have to keep on only .blend file for now.
So basically I'm trying to prepare as many formats as possible for using the model in any engine or software.

Well provide as many formats as possible, but other that OBJ (which from the top of my head creates .mlt files with some basic material properties I think) most other formats are geometry oriented, and don't try to provide material output. And for a good reason too, materials, are too tied to the render engine and there is no "universal" way of exporting them. Anyway I wouldn't bother too much with it, it's pobably a waste of time. Provide the necessary textures (like diffuse, specular, bump, normal, etc.) and UV coordinates for them and should suffice.

Oh, so you suggest to sell that geometry by itself and add texture files on top of that?

Yes, that is usually the way to go, from what I've seen. Provide the model in the basic standard formats like OBJ, 3Ds, FBX, Collada etc, and a bunch of reusable textures so people can leverage them as the see fit , like the standard diffuse + specular + bump + glossiness + normal + etc. or whichever ones you find relevant. Not all always are needed, the user will then use only the ones they need to create materials for the application they are using, it would be unfeasible to provide materials for all possible applications.

Additional regarding Fbx
3dsMax

Make sure your units match that of Blender (meters for this example) - Customize menu - units setup.
Import your Fbx file.
Although your lights and camera import they are not compatable with 3dsmax rendering.  You will need to discard your lights and camera and install most probably photometric lights and at least one of the system cameras in order to render.
2) - Your scale will be correct.

Maya

Change working units in Maya to meters or match your settings from blender.
Windows - Settings and Preferences - Preferences -- Click on Settings. Under working units change to meters or match blenders settings set before your project.
Import your Fbx file.
On importing you will have your lights and camera. However they are probably not compatable (untested as yet). You will probably have to set up new system of lights and cameras.
3) - Your scale will be correct.

Fbx Review

Opens correctly in Fbx review.

Lightwave 2015

Opens correctly in Lightwave 2015 Modeler. Scale is correct. No lights (modeler).
Imports correctly in Lightwave 2015 Scene. Scale unverified. Option to play with scale on import. Cameras and Lights available but compatability unverified.

Other systems as yet untested

Exporting to Collada from Blender
Phases 1, 2, 3, and 4. as above
Phase 5 Export your model to .Dae

Export to .Dae as below
In the properties panel -(Render Tab) set animation frame rate to match your target systems default. check defaults or settings on other systems.
Select File - external data - (check) Automatically pack data into .blend
Save your .blend file
Select File - Export - Collada
Leave all Collada export settings at their defaults. Change only if you are deviating from this recipe for good reason.
Export Collada
Open the file in an application that supports Collada. Autodesk FBX review is an excellent one for checking (make sure textures are switched on)

Additional regarding Collada
3dsMax

Make sure your units match that of Blender (meters for this example) - Customize menu - units setup
Import your .dae file
You will loose your lights and cameras. - Set up new lights and cameras.
Your scale will be correct

Maya

I don't have the version that supports .3ds import.

Fbx Review

Opens correctly in Fbx review.

Lightwave 2015

Opens in modeler. Geometry only. UV mapping unknown. Scale is correct. No lights (modeler).
Imports into Lightwave 2015 Scene. Lights lost camera displaced and probably inoperative. Scale unverified. Option to play with scale on import. Texture (will turn some lights on to verify)

Other systems untested

Exporting to 3ds from Blender

The methods above do not work for Autodesk Fbx reviewer and 3dsMax but 'Load object' does work for lightwave 2015 modeler. However the scale of the import is 10 times too large. There is no where to adjust scale on the exporter and lightwave is fixed in meters. My thinking is that you must model in blender at 1 tenth scale to achieve the expected result for lightwave. Further cameras and lights are not imported as it is Lightwave modeler only. Further Lightwave's rendering package does not support .3ds.
in Autodesk FBX review - scale is lost - proper geometry is lost - textures are maintained. UV mapping appears correct but the object is warped.
In 3dsMax I have proper looking Geometry although there seems to be a few additional verticies somewhere. Scale is correct but textures are lost. If you look in the textures 'slots' in the materials editor the correct name of the texture is there but the swatch is black. This is someting to do with paths I think. If the texture can be located in the correct place then perhaps it could become available. You would still have to manualy map the texture adjacent to the diffuse colour tab in the materials editor. The uv mapping may still be intact (untested) as the result from Fbx reviewer would suggest that the uv mapping does make it through the export at least.
Regarding Maya I don't have the version that supports .3ds import so I could not test.

Additional
Lightwave 2015

Does open in a lightwave 2015 modeler. (File load object). Uncheck Scale Object in the import dialogue for correct scale.
Does open in a lightwave 2015 scene. (File load object). Uncheck Scale Object in the import dialogue for correct scale. Load object means system cameras and lights.

Other systems untested

Exporting to obj from Blender
As above for Phases 1, 2, 3, and 4. as at top
Phase 5 Export your model to .Obj

Export to .Obj as below
The obj file format does not support animations natively so don't waorry about frame rates.
Select File - external data - (check) Automatically pack data into .blend
Save your .blend file
Select File - Export - wavefront (.obj)
In export settings export set scale to 1 if you are going to 3dsMax and 100 if you are going to fbx review. Only deviate from defaults for good reason.
Export OBJ
Open the file in an application that supports OBJ. Such as Autodesk FBX review (make sure textures are switched on)

Additional regarding obj
3dsMax

Make sure your units match that of Blender (meters for this example) - Customize menu - units setup
Import your .obj file
In the import dialogue of 3dsMax - Check - flipZY-axis.
You will loose your lights and cameras. - Set up new lights and cameras.
Your scale will be correct

Maya

Change working units in Maya to meters or match your settings from blender.
Windows - Settings and Preferences - Preferences -- Click on Settings. Under working units change to meters or match blenders settings set before your project.
Import your Obj file
You will not have any lights or camera. You will have to set up new lights and cameras.
Your scale will be correct.

Fbx Review

Opens correctly in Fbx review with the 100 x scale adjustment in the Blender Obj exporter settings.

lightwave 2015

On 'open object' the following error message occurs - Can't find file "Images\myTexture.jpg" select an alternate file?  Select Yes and locate your texture file manually.
The scale will be correct. (The Lightwave grid can cause some confusion regarding scale)

Other systems untested for .obj thus far

Read the first answer at the top before you read the second answer. The second answers attempts to address exporting with textures. It is by no means exhaustive and doesn't address all the issues regarding texturing, materials and exporting. Answer two is merely a basis for some experimentation.

Please have a look at the formatting changes I have made by clicking the 'edited x amount of time ago' link below your answer to see how to do formatting in future. The answer was quite unreadable, so please check that the section separations are correct.

@GavinKneale instead of adding more answers you can use the edit link at the bottom of your post and make single a comprehensive answer. Also please pay attention to the formatting to make your text more readable.

This is intended for newbies like myself and anyone who wants to export from Blender to Fbx with basic textures. It may or may not be usefull when exporting other formats. I apologise it is verbose and intended for beginners.
Phase 0
1) - For export at least to FBX Set your renderer to Blender Renderer an not Cycles Renderer.
2) - Set your units of your scene.
3) - Fbx defaults to meters. On the Scene tab on the properties panel find units and change length to metric. Change units to meters also for good measure.
Note: ( When you are complete and you have opened your Fbx up in another application such as Maya or 3dsMax the import dialogue will state that your file units are cm. This seems to be an abberation of sorts. This is also of no consequence as your imported Fbx will still be to scale. I suppose it comes in as 100cm instead of 1m. - Reason unknown)
Phase 1 Create your Model
-1) - Create or Import your model into Blender.
-2) - Clean up your model
Phase 2 Get a Material/texture assigned to your model
-1) - Get a material in the material slot in the properties panel - (materials tab)
-2) - Get your texture into a texture slot in the properties panel - (textures tab)
-3) - Set - mapping - coordinates - to UV and mapping - projection to flat (textures tab at bottom)
-4) - In edit mode with the relevant part/s of your model selected and from the materials tab assign your material to your selected part/s.
Phase 3 UV Map your model
-1) - Click and drag an new viewport open from the top right hand coner of your screen. Split your screen 50:50 left and right.
-2) - In your new viewport open the view port options menu and select UV/Image Editor.
-3) - Return to and select your default 3d viewport.
-4) - In edit mode (edges) - using shift select your intended seams for unwrapping.
-5) - Cntrl E to bring up the Edges menu and select mark seams.
-6) - Still in edit mode using the A key toggle to select all.
-7) - Still in edit mode now using the U Key bring up the uv mapping menu.
-8) - Select - unwrap.
-9) - Arrange your UV Islands (pack UV islands ect.)(Indepth uv mapping separate subject)
-10)- Switch to 'view materials' in the default 3d view port- (Precheck your model and textures)
Phase 4 Turn on some lights
-1) - Add some more lights so that you can properly see whats going on in your scene.
-2) - In object mode - Shift A - In your default 3d viewport.
-3) - Select Lamp - Point Light.
-4) - Drag the point light up in the Z direction from the origin 0,0,0. Drag X and Y directions to suit.
-5) - Repeat the above steps at least once more so that you have at least three point lights in your scene lighting all sides of your model.
-6) - These lights should be on when you create them if they are not figure out how to switch them on.
-7) - Make sure you are still set to 'view materials' in your default 3d view port.
-8) - Check your model
-9) - If you have any dark or black faces then flip normals for the effected faces as below.
-10)- In edit mode (faces) select the affected faces.
-11)- From the adjacent Mesh menu select - Normals - Flip normals.
-12)- Also try select - normals - recalculate - if you still having issues.
Phase 5 Export your model
-1) - Export to Fbx as below
-2) - In the properties panel -(Render Tab) set animation frame rate to match your target systems default. (30 for 3dsMax or Maya and perhaps others)
-3) - Select File - external data - (check) Automatically pack data into .blend
-4) - Save your .blend file
-5) - Select File - Export - Fbx
-6) - Leave all FBX export settings at their defaults.(FBX 7.4 Binary and all preset defaults). Change only if you are deviating from this flow for good reason.
-7) - Export FBX
-8) - Open the file in an application that supports Fbx. Your whole scene icluding lights and textures should be there.
Note - This basic setup could be the basis for some experimentation for Blender exports to other formats although different file formats address textures differently, both regarding texture file location and their implementation. Sticking to this basic recipe is probably not a bad idea especially if you are new to blender. - Thanks to the posters who have got me going with blender.

This is currently pretty unreadable. Please have a look at the formatting help and the formatting changes I made to your other answer.


text:
Transforming Objects Into Other Ones
How would you animate a cube in Blender Cycles Engine to transform it smoothly into a human model I already made?

If you mean exploding meshes and recombining them afterwards then this could be related - http://blender.stackexchange.com/questions/42349/mesh-breaking-apart-and-recombining-to-form-another-mesh. If morphing, i.e. smooth transition, then Cast modifier (probably along with Shrinkwrap) really can be your first option to consider.

Best bet is to use the Cast Modifier to morph the cylinder into a sphere shape.
The trick to get it to work well is:

Have a good number of evenly spaced edge loops along the cylinder length as well as concentric edge loops on both caps
Then set the mesh surface shading to Smooth and add a 1 level Subsurf Modifier before the Cast Modifier
Select Sphere as the cast type and then you can keyframe the Factor from 0 to 1
You may need to increase the Radius amount if the cylinder is longer than my example.

Thanks, is there a way to do more complicated mesh too like if you have a model of a human to transform them into a cube?

You might have to use a shape key animation on the human mesh to get it closer to the cube shape before using the cast modifier technique.

How would that be done? Wouldn't I have to remodel the whole human again starting out with a cube to use shape keys?

@AustinH. please [edit] your original question so that it reflects what you really want to do.

Okay, edited the question.

@AustinH. You wouldn't necessarily have to start with a cube and remodel your human. You could just turn the human you have into a cube ;-)

How would that be done?

Select your model and go to Properties->Data->Shape Keys. Click "add" 2 times. Select the second shape key and go into edit mode. Now transform your mesh until it looks like a cube. Do not remove any vertices. Leave edit mode. You can now animate the "value" slider to switch between both states. You most likely want to add more shape keys to make the animation smoother.
If you can't put your model into a perfect cube form, add a cube to the second shape key and scale your model down until it's completely hidden in the cube.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
The active textures don't get recognized as keyframes
I'm trying to animate a character's eyes using the F-Curve, I basically want to switch between textures in the animation. The problem is: whether I right click -> Insert Keyframe, or I use "i", or manually edit the curve, the changes I do to the active textures don't get stored in keyframes, if I toggle an active texture and press "i" it doesn't change anything. When I go back to a keyframe where I should have inserted a modify the state of the active textures stay the same. How can I fix this?

Did you press "i" on the checkbox, or the panel?

As suggested by @Gilderman, you have keyframed the Active Texture Index, hence the texture box being yellow, rather than the Use Textures checkbox.  Only add single keyframe otherwise you will end up with an fcurve for all texture slots, used or not.

The index on the fcurve, which is shown on fcurve editor,  "[1] Use Textures" indicates which slot, starting from zero, the texture is in.
The "Active Texture Index" is more of a UI thing as it indicates which texture details to display on the panel, by setting the active_texture_index of the material.
My suggestion would be to add a custom property for eyes open / closed and then drive the use_texture with this.

Oh, thanks man! Now it's all clearer! How do I create a custom property anyway?

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Adding Lots of Subdivisions to a Sphere Without it being rough
I am trying to sculpt on a sphere. But to sculpt you need a lot of subdivisions. The problem with that is it makes the sphere rough and not smooth even when I enable smooth shading and a subdivision surface modifier. How do I get a lot of subdivisions on the sphere without it being rough?

what do you mean by rough, do you have any images of it?

Generally for sculpting you don't use Subsurf, rather than Multires instead. And it still would be great to see some screenshots of your mesh to get idea of what does "makes the sphere rough and not smooth" mean.

Sorry I have been trying to upload an image but it keeps saying it failed

I mean rough as in it looks like the default non-smooth sphere

make sure the subdivision modifier is set to use catmull-clark and not simple.

If you can't upload any images, try uploading your .blend using blend-exchange.giantcowfilms.com. Thanks!


text:
How to transform an object into another
How would you make a lizard smoothly transform into a fish in the blender cycles engine? I have seen animators do similar transformations like this and I have always wondered how. Whenever I try to look up how it is done there are no tutorials on it.

I think they do it with shape keys,not sure though.

It's definitely shape keys, there are some good video tutorials out there.

Is this the same question as your previous post?

It is similar but different

The other post involved 2 separate shapekeys while this one involves joined shapekeys

Austin H. the correct answer to this would be using shape keys. Jonathan Williamson from CGCookie has made an excellent tutorial on that some years ago. Here is a direct link to it on vimeo.

Thanks, how would you give both meshes an equal amount of vertices? For example if I had text that said text and another text object that said hi and I wanted the text to turn into hi.

If I would do a morphing animation where a lizard would turn into a fish I would start with roughly the same base mesh and go from there. There's always a way to increase the vertex count on some areas. Another but somewhat "dirty" method would involve using a shrinkwrap modifier.
The whole text to another text morph is a totally different thing. Last time I checked nobody came up with a simple solution in form of simply applying a modifier and you're done. I would certainly welcome such an awesome solution.

authors: Владимир Ляпунов


text:
Equal Amount of Vertices?
How would you get the same amount of vertices on 2 different objects in blender cycles? I want to make my mesh text transform into a different word but to do so I need an equal amount of vertices on both different words.

Could you give a more specific description of how the morphing effect should look like? You see, morphing completely different solid objects without transition effects look quite weird.

To do a smooth morph of the mesh, I am using shape keys but I am linking those to two separate text objects, but I can't do it without both text objects having the same exact amount of vertices. For example, object 1 needs 120 vertices and object 2 needs 120 vertices.

I know about the same amount of vertices. What's more important is the effect you want to achieve. There is another way of transforming one text into another that involves particle systems and keyed physics where you don't need to have the same amount of vertices, just the same amount of particles in both objects

How is that done?

you could try dissolving the object with an excess of vertices with the decimate modifier until you are close enough to 120 vertices, and then fine tune the number of vertices with remove->dissolve_vertex or remove doubles->merge and increasing the merge distance. I don't know if there is an automated way.

having an equal amount of vertices wont work as it does not guaranty to have the good corresponding faces

Morphing smoothly between two totally different objects with different vertex counts that also contain submeshes like text or single words is done more easily and efficiently by using particle systems and keyed physics. You basically "fill" your objects (the meshes with its submeshes which in this case are our letters) with particles and then use keyed physics to do the transition.
I recommend the video tutorial from BlenderHQ which you can find here:
Morphing Particle Systems with keyed Physics in Blender

A "counter" answer :
Starting from two texts (and supposing you have triangulate both as the decimate modifier only gives a face count indication... see below), you can tune the decimate modifier so that you obtain the same amount of faces.

Convert both texts into meshes (Alt+C then mesh from curve/.../text)
Triangulate both (in edit mode, select all the vertices then Ctrl+T)
Add a decimate modifier on the text which has the bigger amount of faces
Then tune the ratio so that you obtain the same face count as the smaller text

The goal here is to obtain 171 faces :

Now apply the modifier
Select both meshes
Go to the shape key part (as below) and choose join as shapes

We now have shape keys... but... it does not work...

I wonder if a remesh modifier will fix it?

@AustinH, have a try. But I don't see any mean of how can Blender understand what is expected as final result. There is no information here to tell the faces correspondences. More than that, several faces have to be totally recomposed


text:
Exporting as obj.All at once (noob question)
So i wanted to ask you guys if you can select all the objects you want to export all as different files.Instead of exporting one at a time.

Google search yielded this
Export multiple objects to .obj
As expected it involves scripting, so not sure if it will work for you, but I don't think there's any way to do it natively through the GUI


text:
Creating Normal maps from a Texture?
Is it possible to create a Normal Map from a Texture, not a mesh? If so, how?
As I'm working on an Eye, and have already made the textures, I was wondering if it was possible to create Normal Maps out of those Textures.

Normal maps are pretty hard to make,But bump maps are not and it would achieve a similar result,Will that work for you?

Related - http://blender.stackexchange.com/questions/390/how-do-i-make-a-normal-displacement-map-when-all-i-have-is-a-photo

While normal maps from textures can also be created within blender, there is another FLOSS software called AwesomeBump. It's not quite as user friendly as CrazyBump but it gets the job done.
If you are on an AMD GPU system you will have to use the stable version 3.14 for now.

Theory
First thing normal map generators do is to converts the input image into a grayscale image, even if it is colored, that is because color information is practically useless in the generation process, the algorithm used to convert the RGB colors into single values varies from a generator to another, so it is recommended that you convert your input image into grayscale before using the normal map generator, the reason will become clear in the next section.
Imagine the image as a grid of vertices, each vertex represents a pixel, the z location (height) of each vertex is equal to its value (Which is just a scalar not an RGB vector; because it is a grayscale image, remember). So we realize that the image is just a 2D function that associates a value to each point in space, except it is not a continuous function, since it is only defined on some discrete points in space. This surface we just described has normals at each vertex (just like your mesh has normals), and those normals is what a normal map stores, so the generator's job is to simply compute the normals of the surface and encode it in an image. It can be proven that the normals' components relates to partial derivatives of the surface using the equation:
\begin{equation}
\vec{N_x} = \frac{-\frac{\partial F}{\partial x}}{\sqrt{{\frac{\partial F}{\partial x}}^2 + {\frac{\partial F}{\partial y}}^2 +1 }} \\
\vec{N_y} = \frac{-\frac{\partial F}{\partial y}}{\sqrt{{\frac{\partial F}{\partial x}}^2 + {\frac{\partial F}{\partial y}}^2 +1 }}\\
\vec{N_z} = \frac{1}{\sqrt{{\frac{\partial F}{\partial x}}^2 + {\frac{\partial F}{\partial y}}^2 +1 }
}
\end{equation}
Where $F$ is the function that represents the surface and $N$ is the unit normal vector. Partial derivatives describes the steepness and direction of the surface and they can be computed using what is know as Symmetric Derivatives which I explained in more details in my answer
here.
Assuming we have the partial derivatives, we can compute the normal vector components using the previous equation. A normal map stores the $x$, $y$ and $z$ components of the normal vector into the $R$, $G$ and $B$ channels of the image respectively. If we attempted to do that, we will encounter a problem, the image can only store positive values that are less than one (Assuming a standard image format is used), the normal vector components will always be smaller than one because it is a unit vector, however the vector components can be negative denoting directions opposite to the fundamental vectors of the space, so we have to find a way to encode these data which belongs to the interval $[-1, 1]$ to the interval $[0, 1]$ which is the possible values for a pixel. This is a simple remapping task that can be performed using the equation:
$$
\begin{equation} R = \frac{(\vec{N}_x+1)}{2}\\G = \frac{(\vec{N}_y+1)}{2}\\\label{1} \end{equation}
$$
Where $R$ and $G$ are the red and green channels respectively, notice that we didn't perform the same remapping to the $z$ component because it is always positive, think about the surface that represents the image again, its normals will always be facing the positive direction of the $z$ axis. By using the previous equation, we get the RGB values for the normal map, so we are ready to do the implementation.
Implementation
We can make a node group that computes both the $\frac{\partial F}{\partial x}$ and $\frac{\partial F}{\partial y}$ partial derivatives given an input image. The implementation is as simple as a translation and a subtraction:

Refer to the article for more information, the rest of the implementation is as easy as applying the two equations above and creating an image out of the individual channels.
An example result

Could you add a bit to your answer explaining how to use it. As it is now all you really have here is an ad.

@David Making the answer an ad. was truly not my intention. I wrote a detailed article on how to make the generator from scratch, will an answer containing the article link and a small summary be better? I know it will still be technically an ad. for my blog but the article is too long to post in an answer so that's my only option.

The link to the article doesn't work any more.

@RayMairlot Yes, I have since taken the site down. Thanks for notifying. I will try to add all the missing information to this answer for completeness.

Especially if you are already using Photoshop in your workflow, the Nvidia Texture Tools are simple to use and pack some good features.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
how to turn off x ray in particle edit mode?
I'm trying to Comb my subjects hair, but it seems as though as if a kind of x ray mode is turned on and I don't know how to turn it off.

As you can see, the hair particles are going right through the bear and whenever I comb, it also counts the movement on the back of the bear's fur too.

There is no xray mode in particle edit mode (at least that I know of) Are there any unapplied modifiers in your stack that could cause that?

I had the same problem. Just press the 'limit selection to visible' button.
In particle or edit mode, 3d view bottom left, next to the propotional editing mode.

Please explain where this option can be found.

In particle or edit mode, 3d view bottom left, next to the propotional editing mode.

You need to edit that into your question. I was asking so when other people see your answer they understand, not for me.

Ok, now it 's clearer...


text:
Blender Sine wave calculated incorrectly?
While working with Blender built in sine waves, I noticed that the sine waves do not perform a full round cycle every 90 frames.
Its offset by roughly 1.5 frames every 90° (Yes I checked the multiplier and everything. Its on the default setting: 1) Am I doing something wrong? I'm using Blender 2.76b

maybe this comes from the fact rthat it uses radians and not degrees ?

There is nothing wrong, your expectation and the parameters of the modifier just do not fit together. I guess this is caused by a unit mash-up of radians, degrees and frames.
I'll try to sum up the necessary math as short as possible to avoid further misunderstanding. Take a look at the XY plot with a circle given a radius of 1 (known as unit-cirle) and consider the marked triangle:

The sine is now the Y position of the black dot (green line) and depends on the position of the dot running counterclockwise around our circle. We can either measure the marked angle in degree or radians. Plotting this with reference to the angle measured in radians gives us this plot:

You can observe, that a full period is reached after 2 PI, which is approx. 6,28. Now compare this to a sine modifier applied to the x-location of some object:

Looks similar, right? Both plots are bounded by +1 and -1 and complete a full period after 6,28. But in the Blender case 6,28 is the number of FRAMES, after which the sine starts all over again.
Now it depends on your use case if you want such a fast oscillation. You can stretch and shift the sine with the four given parameters as you like. The equation seems to be this one (c=constans):

Hope this helps!

This answered my question, very statisfying so! Thank you very much.
I was hoping the sin function (to an extend) would work like on a regular calculator.
f(frame)=Amplitude*sin(FRAME+PhaseOffset)
I like math but don't have extended knowledge


text:
How do I import .nif files into blender 2.77?
There used to be an add-on in older versions but I do not see it in this new version.

Check this question http://blender.stackexchange.com/questions/51544/can-someone-make-a-plugin-for-nif-like-3ds-max-has

Short answer - you can't @DuarteFarrajotaRamos I wouldn't call this a duplicate, as that question was asking someone to make an addon, this one is merely asking if and how a certain import is possible.

There are two links in my answer there that point to two different nif import/export plugins

did you try to download an old version of blender that works with that addon, install the addon and import, save to blend or export to other format, then import that new file into current blender?


text:
Something wrong with my rig. All scrunched up and missing faces?
I tried to copy and paste an armature onto a saved model in an alternate .blend file, but my model became all messed up: faces missing and what not.
Here's the photo of what it looks like.

It also says Auto-run disabled. I'm not sure what that has to do with the rig itself, but I thought I'd add it.

Was your rig in multiple parts when you copied it? Perhaps it was in say 3 parts, and you only copied one.

I only copied the bone rig, the model, and that air tank behind him counts as its own separate object. I copied the entire model all together, the tank does't have any rigs so it doesn't have any problems.

If you are using Rigify, the addon uses some drivers to control the bones, and drivers use Python expressions to work. Auto run of Python scripts are disabled by default for security reasons, but you can allow blender to auto run scripts by changing your user preferences. To do this press Ctrl+Alt+U, then head over to File and enable Auto Run Python Scripts:


text:
Is there a way of updating blender with all of my files contained?
I want to update blender to the latest version, 2.77, I'm currently using 2.75, and I know you can update blender by reinstalling the program, but my only concern is that would my files be imported into the next version.
And if not, how would I do so?

Your .blend files will still be accessible. Blender is backwards compatible way past 2.75.

There's no risk of losing any of your files when you update or uninstall Blender. Blender is very nicely backwards and forwards compatible, lately I've used nearly all 2.7 releases to work on my files on many systems.
If you manually delete some directories for the old install location, make sure they don't contain some of your .blend files since for some setups Blender install directory is the default file saving location.


text:
How to rig a Wrist?
A problem I always have with my characters are their wrists. I can't figure out a way on how to rotate the hands withouth breaking the wrists and the arms. Here is what I mean:
Here is the Arm on it's normal pose:

And this is what happens when I rotate the hand:

See what happens? Everytime I try to rotate the hand a bit too much that happens, and I got no idea on how to fix that. Why does it even happen? And how can I fix it?
Here is the blend file:
https://mega.nz/#!wB9BjZSZ!1VC-AZtuYLzuZLBQXDR71iGe5-ccKG8MpKoFyxTJbXw

You should consider rotating the arm and not the wrist. If you look at your hand and try to rotate it, you will discover that it's not so much the wrist but the entire forearm that rotates.

It doesnt really work because of how I IK the arms of my characters. Is there a way of doing that while keeping the IK?

Rotate your own hand and you should see the answer ;-)
When the "wrist" rotates, the wrist joint itself doesn't actually do any rotation. When you turn your hand over, it's your forearm that does all the twisting, mostly at the elbow. The solution is usually to have a wrist bone that also influences a great deal of the forearm, as well as the hand. Depending on how detailed you want to be, you might even consider multiple forearm bones that each rotate only a little so that the whole arm can twist.
Think about the movement of the two bones in your forearm, and it's really quite a complex motion you're trying to recreate.
I'm really surprised that I couldn't find a tutorial on this topic. I may have to create some more detailed instructions when I get home.

I know. I first tried looking around for a tutorial, but there is nothing about it. I would really appreciate if you could make a tutorial.
And yes I have looked at my own Arm, and what really rotates is the Arm not really the hand. But I'm not sure how to apply that along with the IK. :\

You should add a copy rotation constraint on the hand and and make the target the ik handle. The hand will twist some, but then you can rotate the hand and move the arm with the ik handle.

+1 to counteract the -1.  The answer given is in good faith, does potentially help and also promises more at a later point.  Even if it isn't the answer you wanted, it didn't deserve a -1.  Also, for future reference, downvoting answers that don't help makes people far less likely to answer your questions.

I've already done that. And it's still the same. :\

I didn't gave it a -1 :\

I think the simplest solution would be to give the "ForeArm.R" bone a "copy rotation" constraint, make it follow the rotation of the wrist, but reduce the influence to maybe 50%
https://gfycat.com/TastyDampAlpineroadguidetigerbeetle

Another possible solution is to create a shape key that model the perfect shape you want when the hand is rotated 180 deg. Then you can add a driver so that when the hand bone rotates the shape key enters in action.


text:
Do Bones and custom bone shapes account for vertices/edges/ and faces?
By that I mean do bones or custom bone shapes take up vertex or mesh data?
Just a simple yes or no answer is all I want.

Custom bone shapes are linked with meshes, hence yes.

Bone data is stored within an armature and uses data that is unique to an armature, they use points to define each end of a bone but have no vertices, edges or faces.
Custom bone shapes are mesh objects that are assigned to be the visual representation of a bone. They normally only use vertex and edge data, it is data that is kept separate from your visible models.


text:
Every time I parent my eyes to a bone, the eye goes below the model
I'm trying to Parent my eye to my model's armature, but for some reason, every time I do the eye goes way below my model in the process.
I should also point out a few things:

My eyes are separate objects so that I can rig them later with the same armature.
I also can't seem to weight paint my object to the bone because overtime I rotate the object it doesn't seem to rotate to the head. (I know this because I tried placing the eyes back in the sockets of my model and rotated the bone to see how that could turn out).

Here's what it looks like:

The thing selected on the bottom is the eye and the other one has not been parented to the bone yet...

I should also point out a few things:                                                                   1. My eyes are separate objects so that I can rig them later with the same armature.                                                                                2. I also can't seem to weight paint my object to the bone because overtime I rotate the object it doesn't seem to rotate to the head. (I know this because I tried placing the eyes back in the sockets of my model and rotated the bone to see how that could turn out.)

Can you upload a .blend file?

It happens when either your armature is not at rest pose, or, more possibly, your eye balls have other parenting value prior to being parented to the armature. So either make sure your armature is at rest pose or, select your eye ball, press alt + p, and select "clear parent and apply visual transformation", and then parent it to the bone again.


text:
Shortcut to execute a Macro or Script
Is it possible to remap a key to call more than one operator at a time, or to execute a python script?
In my workflow I need to use two operators, one after the other:
Set the 3D cursor to selection, followed by set origin to 3D cursor.
I never use the 0 key to switch layers,so I thought it would be faster to make it "set origin to selection", but i don't know how to make it call those two in one go.
bpy.ops.view3d.snap_cursor_to_selected()
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
If this works it would save me exactly 6 key presses:
Shift+S ,4, tab to go to object mode,Shiftctrlaltc,3,tab to go back to edit mode.
Thanks for any input

Edit : This works when executed from a text editor, now i just need to figure out a way to execute it with the 0 key.
import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        context = bpy.context.copy()
        context['area'] = area
        context['region'] = area.regions[-1]
        bpy.ops.view3d.snap_cursor_to_selected(context)
        bpy.ops.object.editmode_toggle()
        bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
        bpy.ops.object.editmode_toggle()
        break

Here's a quick example adapted from the ObjectCursorArray tutorial in the API documentation.
You should be able to run this in the text editor, and then pressing Numpad 0 in Object view should result in the "do work here" text printing to the console window (in OSX/Linux you have to launch Blender from the terminal to see the console output).
Note: once you copy this script into blender, you may want to check that the tab structure is still correct for each line.
bl_info = {
    "name": "Work Macro",
    "category": "Object",
}

import bpy

class WorkMacro(bpy.types.Operator):
    """Work Macro"""
    bl_idname = "object.work_macro"
    bl_label = "Work Macro"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):

        print("do work here")

        return {'FINISHED'}

# store keymaps here to access after registration
addon_keymaps = []

def register():
    bpy.utils.register_class(WorkMacro)

    # handle the keymap
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
    kmi = km.keymap_items.new(WorkMacro.bl_idname, 'NUMPAD_0', 'PRESS', ctrl=False, shift=False)
    addon_keymaps.append(km)

def unregister():
    bpy.utils.unregister_class(WorkMacro)

    # handle the keymap
    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    # clear the list
    del addon_keymaps[:]

if __name__ == "__main__":
    register()

Thanks to @Todd McIntosh I finally made this work.
just in case someone needs this or wants to adapt it to their own workflow
script:
bl_info = {
    "name": "Origin to Selection",
    "category": "Object",
}

import bpy

class WorkMacro(bpy.types.Operator):
    """Origin to Selection"""
    bl_idname = "object.origin_to_selection"
    bl_label = "Origin To Selection"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):

        for area in bpy.context.screen.areas:
            if area.type == 'VIEW_3D':
                context = bpy.context.copy()
                context['area'] = area
                context['region'] = area.regions[-1]
                bpy.ops.view3d.snap_cursor_to_selected(context)
                # quickly switch to object mode to set the origin
                bpy.ops.object.editmode_toggle()
                bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
                # Switch back to edit mode
                bpy.ops.object.editmode_toggle()
                break

        return {'FINISHED'}

# store keymaps here to access after registration
addon_keymaps = []

def register():
    bpy.utils.register_class(WorkMacro)

    # handle the keymap
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
    kmi = km.keymap_items.new(WorkMacro.bl_idname, 'ZERO', 'PRESS', ctrl=False, shift=False)
    addon_keymaps.append(km)

def unregister():
    bpy.utils.unregister_class(WorkMacro)

    # handle the keymap
    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    # clear the list
    del addon_keymaps[:]

if __name__ == "__main__":
    register()

Since 0 was already assigned to the operator that changes layers I had to edit it to call the operator named "object.origin_to_selection" in bl_idname in the script.

It can also be accessed by pressing space and searching for origin to selection

I came looking on how to make macros for this exact reason! The add-on script above doesn't work as desired as the keyboard shortcut is mapped to "Object Mode" which is the opposite of editmode_toggle() as you want. If you correct the following line in the script it worked for me.
Change out this:
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')

For this:
km = wm.keyconfigs.addon.keymaps.new(name='Mesh', space_type='EMPTY')

Depending on your situation you may want a different area for it works in, eg. "3D View (Global)"


text:
How to undo or remove a keep offset on a bone?
I want to remove an offset I created for a bone but don't know how to remove it...

Select the child bone, Use shortcut Alt + P then pick the option that suits better your situation.


text:
My eye won't track to my bone armature
When I added an object constraint to my eye mesh, I selected my armature as my target and my bone as the one that I want my eye to track to, but it's not working.
Here's what it looks like:
And every time I move my bone, the eye doesn't track to it. There appears to be a red bar right next to the word Track To in the Constraints Panel, maybe there might be an error?

Your problem is that the "up" axis is set to Z and the "to" axis is set to Z. The constraint can't point Z up and track it to the armature at the same time. If you want to track to the Z axis use a different axis as "up".

red in the constraint stack means that the target is not recognized, maybe you've changed the name of the armature or the bone. Try reassign the right armature and the right bone directly in the costraint menu.

I checked and I'm pretty sure I assigned the right armature and the right bone to the model, since I looked and selected the armature in the outliner panel, and I also turn the names on as well just to make sure it "was" right.

Actually never mine, It's not that I have the wrong armature or bone, it's just that for whatever reason the selected axis that they're tracking to is not tracking the bone on the X-axis. sorry should've pointed that out.

Red doesn't mean the target is not recognized, but that the constraint is disabled. While this is one reason it may be red, it does not mean that it is why it is red every time.


text:
Edit mode of baked cloth
I am doing this interior tutorial of Blender Guru and at min 31:50 he is doing some changes at a curtain. This is my scene in object mode

When Blender Guru selects the curtain and goes to edit mode he gets this

but when I do that I get this

So he gets the edit mode of the baked object and I get the edit mode of the object before baking ??? What should I do to get the edit mode of the baked object ?

The explanation seems to be around 26:30 / 27:15. He applied the subsurf and the cloth simulation. So after that he just keeps the mesh shown in your second picture.

yes, you are right. I missed that. I did wonder why he copied the curtains and moved it to another layer. Now I understand, it was his backup for when he needed the object before applying the modifiers

yes, I understood it the same way : a backup

I still think I would prefer to do that apply at a later moment, maybe when finishing up the scene

well... my level is not good enough to say more about Blender Guru reasons for it... But yes you can do it later, surely, except if this is not compatible to the texture approach (many more time is needed to check that)

you can see the miracle happen in minute 27:00 of the tutorial, BlenderGuru applies both modifiers, which effectively removes the simulation and bakes the mesh at that condition into the object. As soon as modifiers are applied, no more changes are possible.

You forgot to click "Apply" on the modifier in the modifier stack at 27:00. Either that, or you applied the modifier as a shape key, and you need to "turn on" the shape key by setting it's influence to 1.0


text:
How to model a square (starting with one vertex)?
I have a simple question. What is the easiest way to model a perfect square starting with one vertex and just extruding that vertex around ?

Is that a "theorical" question ?

Thanks @Old Man... so simple question but with so many things to think about it : )

Or :
Presuming the first vertex is selected :
E
X
1 Extrude along X axis 1 unit
A
A Double A, to first deselect the extruded vertex, but A again to select them all
E
Y
1 Now extrude both two precedent vertices to make the square

while in edit mode:

With the vertex selected: "snap cursor to selected" using the menus or keyboard shortcuts Shift+S followed by U
add mesh (Shift+A) -> Plane -> Adjust properties using F6

by far the best. simply add a plane!

well i agree @X-27 and not... the question was about 'extruding' and about a quick way to make a square (few key strokes)

it seemed the obvious method was missing :)  who cares how a geometric shape is created, i didn't read ' extrude ' as being the important element of the question.

@zeffii agree with your comment

So... the shortest way may be to have add a short cut on the add plane menu, so that you can add a plane in one unique key.

@lemon then I would point to a Question that covers adding shortcuts, like this one

Presuming the first vertex is selected (in edit mode) :
Alt+R Spins the selected vertices around the 3D cursor
Set : steps = 3, angle = 270
These parameters set the amount of spined vertices (3) and the angle we want = 3 * (360 / 4)... 3 because 3 = 4 minus 1
A A F Deselects the last (A), selects all (A again) and faces them all (F)
This method is better than the other answer (in my opinion), because you set the 3 and 270 parameters once and after that you can repeat Alt+R A A F as you want.
Also, you can make triangles, hexagons, etc... with it (just modify the steps and angle value)

DV'd for same reason as your other answer.

@lemon when you edit your post there is no need to leave redundant information

Yes, but sometimes people does not understand the difference between the first post and the edited one (this gave me some negative appreciation sometimes)... so the thread is hard to follow... but concerning "the pure information" i agree with you

For instance.. "as a proof".. your edited answer can not be understood when you read the comments...

@lemon It's easy enough to click on the edited X hours ago to see the revisions. Keep in mind that SE is very different from a forum. All the information is in the answer, no the comments. If someone points out something in the comments that's relevant, it can be added to the answer easily enough.

E X 1
E Z 1
E X -1
Select two vertices
F
OK, we are in edit mode with a single vertex selected;
E is for extrude the vertex, X is for constraint the extrusion only on the X axis, 1 is for the amount of the extrusion (1 Blender Unit), then press Enter to confirm the extrusion. The same approach can be used for the others two vertices. Then you can select the two unconnected vertices  and press F to close the quad, or select all vertices and press F to make also the face of the quad. Anyway, be aware that Blender is not intended to create precision geometry, as CAD systems do.

Could you give more info as to what this does? I have the same issue with this one as I do with @lemon's.

sorry but TARDISMaker and cegaton, Josh answer is perfectly correct as the question is from @OId Man who is not a novice. Also, anyone (even a novice) can reproduce the key strokes steps to see and understand what is happening, step by step. But I may be wrong.. ?

@lemon BSE isn't just a place to get questions answered. It's a library of answers. So how it's supposed to work, is that someone as the same issue, they google it, and they find the answer here. Also, we UV and DV answers based only on how accurate the information is, we also take into account the quality of how it's presented. Nine hotkeys in a grid isn't very easy to understand, and it could be very confusing to newer users.

I appreciate your answer but I also agree with @tardis maker. Stack Exchange is great because people are willing to explain things in great detail

I agree with Lemon, Blender is so complex that every user has a different degree of comprehension of its behaviour, lots of Stack Exchange answers are difficult to understand even for me, but I cannot ask everybody to fully explain every step of their answers; anyway, I updated my answer!

@joshsanfelici why can't you ask folks to explain what you don't understand? Isn't that the sole purpose of the stack exchange? Help us make the site better by asking for clarifications.


text:
Selecting and moving a subpart of a mesh
I have a question about this tutorial. At about 17:00 min Blender Guru creates a window and then selects a door of this window and moves that door to the left. I have tried to follow him doing that (you can see the strokes he makes) but I have still questions.

He seems to select a part of this mesh (window) and then simply moves it away. How is it possible that he can just move away part of this mesh (I mean it is connected to the rest of this mesh). And he also seems to do CTRL +L, why is that ? I simply don't understand this select and move away operation.

The door is here a subpart of the window mesh object.
This subpart is defined as a part of the mesh (some vertices and faces between all the others). And this subpart is not linked to the rest of the window vertices. This is like you have here a subset of the vertices dedicated to the door.
As this subpart is so some kind of "vertices isle", he can select it by just selecting (with the mouse) one or two vertices and then use Ctrl+L because this shortcut means "select linked" or "starting from a selection, select also all the vertices linked by one or several edges to this primary selection".
Concerning the "move away" : this is the consequence of above. Inside the window object, door vertices are not linked to the other vertices. So they can be moved independently in edit mode.


text:
Smooth shading gets ignored in cycle render
While working on a Model I stumbled upon this issue:

This is the first time I see this error and I couldn't find any immediate solution.
I checked if there is any sort of modifier or condition on the mesh which could result to this.
I found nothing.
Thanks in advance.

can you share your blend file or show more about your material nodes setup and eventual modifiers ?

it could be a problem with the modifier stack, if you don't feel comfortable posting the .blend, you could post a screen shot. Also, make sure the pony's saddle is selected when inspecting the object properties. In the photo, only the pony is selected

http://puu.sh/pl6M4/c47b131979.zip
This is the edited file~ Its derigged so you can change or use it.

I dont know what it is, but the problem comes from the "use subdivision" in the "displacement panel" here.
At the bottom of the picture below, just uncheck "use subdivision".


text:
Cycles render - rendering only text?
I am downloaded the template form here> https://www.youtube.com/watch?v=4zlK_F-29Sk , but if I render image or video i get this result:
Please help!
Thanks in advance!

maybe you should increase the size of that light in the back under the light properties. It spreads the light out more.

Set the render layer to Universal here :


text:
Curtain is making weird moves
I am doing this tutorial and somehow I have managed to have my curtain behave very strange. I must have made an error somewhere but I don't know where. I have attached my file.

Cloth simulations like those usually take a few frames to settle.
It is normal that the first few frames go weird on you: the simulation calculates how the mesh behaves with gravity, and how the pinning affects its shape, based on in its physical characteristics. If there are no more forces acting on it, the movement will eventually stop.
You can set the cache to start before your scene (like 200 frames) so that by the time the scene starts the curtain has already settled on it's resting postition.
Other way to have the same result, is just to make your scene start at a later frame, so that the movement is not part of the frames to be rendered.

And one more thing you can fix in the cache section: if your animation is 6000 frames, set the End value of the cache to that frame. Otherwise your simulation will stop at the default frame (which is 250).

hi, I am not sure why my animation is 6000 frames. I suspect this is because I installed some AddOns and later deleted them but some things have remained in the system. I did have a look at User Preferences but I cannot find a way to reset the number of frames.

But If I let run the animation I don't see things change, I still only see the weird behaviour at the start of the animation or should I bake first ?? In the tutorial at 25:30 min the curtain immediate starts moving ? By the way, I now have linked the tutorial in my question

@OldMan everytime you make changes to a simulation your cache and bake become invalid, as they will not reflect the change. Prees the free all bakes option and re-cache (or bake). Only then you'll see the changes.

Thanks. It was some time ago that I worked kWh Physics in Blender. It seemed that Blender Guru just played the simulation (without baking) and that is why I thought I had made an error. I did ... I had not baked before I played the simulation.


text:
What is the the ASC-CDL node?
The color balance node in the compositor can be switched to use the ASC CDL
How is it used?

How is this different from Lift/Gamma/Gain?
How do the Offset, Power, Slope options affect the image?

related: http://blender.stackexchange.com/questions/55859/using-the-fake-color-look-in-combination-with-the-cdl-node

ASC-CDL stands for the American Society of Cinematography's Color Decisions List
It's designed to create a standardized protocol to share basic color correction data across different systems from different vendors. It is a protocol that can be applied to either scene referred linear or log-like encoded imagery. The following outlines scene referred as Blender’s reference space is scene referred. Care must also be taken regarding white points and chromaticity, as using the CDL on work encoded differently to your reference will yield randomly different results, and the CDL is not a means to uniform grading changes alone. Reasonable advice is to not grade work prior to compositing, and grading should be the very last step of a pipeline.
It should be noted that applying the CDL on linear and log-like data has two completely different results. They include:

Log-like data will change contrast on slope adjustments, while linear will change exposure. Multiplication is a power function on log, and a scale on linear.
Log-like data will change exposure on offsets, while linear will literally be uniformly offset. Offsets are multiplication on log, while simple addition on linear.

The functions that the ASC-CDL node provides in blender are:
SLOPE , OFFSET and POWER:

Slope:

Scene Referred Data is multiplied. 0 remains unchanged. Slope can be any number greater than 0. Default Value is 1. Corresponds to a uniform exposure adjustment when Power and Offset remain untouched.

Offset:

Data is added. Raises or lowers overall brightness. Offset can have positive or negative values. Default value is 0
Note: Blender's CDL node currently allows for negative values via the strange "Basis" entry box because of Blender's decision to not permit negative values in the UI. (It is best to leave this one untouched, unless you absolutely know what you are doing).

Power:

Data is multiplied by itself ^ amount of times. Power can be any number higher than 0. This function is considered "non-linear", as it changes the shape of the transfer function. The default value is 1
To expose the values and do precise numeric editing of any of the values click on the color box at the bottom of the big color circle to expose the RGB values used for the node's transform operations:

NOTE The CDL works only via RGB values. Working on HSV or HEX does not work correctly due to their nonlinear encodings. Also, the input to the CDL node must be scene referred RGB ratios. No other colour encoding model will work, so avoid any transforms in your node chain that change the format from RGB.
Even though the node in Blender is arranged differently, the order in which the transformations should be executed is SOP
The final formula to calculate combined transformations is then:
$Slope = input \times slope$
$Offset= (input \times slope) + offset$
$Power= ((input \times slope) + offset)^{power}$
Also note that blender does not provide functionality to affect saturation as part of the CDL node. To control saturation on scene referred data a custom node group needs to be created to operate after the CDL node. Maybe a topic for a new question.
Difference with Lift, Gain and Gamma
Lift, Gain and Gamma vary in definition between different systems and manufacturers.
In the case of Blender's color balance node, it is vaguely defined like this on the manual:

Lift Increases the value of dark colors. Gamma Will adjust midtones. Gain
Adjusts highlights.

There is no explanation on what that means, and where the thresholds for shadows or highlight begin or end.
The Code
To appreciate the nuances of the difference, it helps to look at how the formulas behave, and in particular, behave with scene referred data.
Here's the code for the ASC-CDL node:
float x = in * slope + offset;
return powf(x, power);

And here is the code for the Lift, Gamma, Gain node:
float x = (((linearrgb_to_srgb(in) - 1.0f) * lift_lgg) + 1.0f) * gain;
return powf(srgb_to_linearrgb(x), gamma_inv);

So aside from looking like mumbo jumbo gobbledygook, I'd encourage you to look at the line in the Lift, Gamma, Gain operation where it takes the linearrgb_to_srgb(in) - 1.0 value. Sadly, aside from an extremely myopic function name, there is a subtract from one, and an addition to one in there. This is the tell-tale mark that some bad assumptions are at play.
The Mangling
This speaks volumes about the nature of the formula. That is, it is display referred the moment you make grotesque assumptions about the values you are feeding into it. In this case, the 1.0 represents a maximum assumed value.
Of course, in scene referred imagery, there is no such thing as white, no such thing as black, and no magical values you can lean on that mean anything in particular. Cycles generates just such scene referred values, and as such, feeding a Cycles render through Lift, Gamma, Gain will not only not work at all, any results it delivers will be absolutely and critically broken beyond belief.
So, using Lift Gain and Gamma only works on information with a range of 0 to 1, making it unusable for those trying to work with higher dynamic ranges with much larger values.
The CDL has no such limitation. It can work on RGB values of any range.
Many formulas passed down through Stack Exchange and other sites with information all too frequently assume things about RGB that shouldn't be assumed. While Lift, Gamma, Gain is one such display referred assumed formula, there are many other traps like this. The AdobePDF specification lists many of them, and many of those formulas have sadly ended up in scene referred image manipulation applications. Screen, Overlay, Hard Light, Soft Light, etc.? Yes... all display referred and all will mangle your imagery.
The Standard
Beyond the basics of the formula simply not working, the ASC-CDL is a canonized function defined by the Academy. That means there is a specific specification that stipulates that in order to call itself the ASC-CDL, it must abide by the specification. Further still, because of this, you can find ASC-CDL transforms in many different applications. Unlike Lift, Gamma, Gain, if an application chooses to implement the standard, you can be reasonably sure (bugs notwithstanding) that it is identical across applications, assuming the caveats in the introduction are held to; different input data formats will yield different output even with identical CDL values.
Use and Reuse
Finally, because the ASC-CDL is a referential baseline, you can also find unique applications for the ASC-CDL, such as the ability to apply hand-crafted ASC-CDL values into a colour management system such as OpenColorIO, enabling an imager to quickly use Looks they have generated previously. Not only are you able to use a variety of different techniques to achieve this, as expressed in the previous notes, you can be quite certain that the formula is the formula you expect.
But where is the "List" part of the Color Decision?
Even though ASC-CDL nodes in other apps have the ability to save their settings into a file, so that it can be used across different programs and vendors, Blender does not offer such capabilities yet. Manually creating an .XML file with the data is possible, and the color decisions translate (and can be reversed) across platforms. The beauty of this is that if you are saving to OpenEXR with no color correction baked into the image, you can set looks that can be reproduced on other systems. Or if the color correction has been baked into the image in an EXR file, it can be reversed on other systems for further grading.
How to create the text file would need to be the topic of other question.
In the end, it is up to an educated imager to be aware of the upside and pitfalls, and choose their tools based on solid foundational knowledge.
For more information on wide dynamic range rendering please refer to this post: Render with a wider dynamic range in cycles to produce photorealistic looking images
See also Mike Most's discussion about the CDL.
Main source used: ASC-CDL_Release1.2 by Joshua Pines & David Reisner, 2009

Are you sure that lift can't be used for values larger than 1? It should be a linear calculation given that it is simple multiplication. The subtraction is a trick to brighten the lower values. For lift, 0 => 0.2, 0.5 => 0.6, 1 => 1. Gain is the same as Slope, but AFTER the Lift is applied.

@ArlenBeiler LGG is display referred. End of story. Broke junk. Look at the code excerpt. See the "-1.0" part? That is broken on scene referred models.

Not really.  ((5 - 1) * 0.8 ) + 1 = 4.2, it is just slope pivoting on 1, instead of 0.

It still makes the assumption about 1, but it works on any possible value. So it is still really designed to work with display-referred values, but it should work fine on scene referred values. From experience, values larger than 1 are used for lights mostly in Cycles. So it will still lower those values. You could call it contrast , but pivoting on 1 instead of 0.5.

For a lift of 0.8, the slope is 0.8 and the offset is 0.2

@ArlenBeiler So we have gone from LGG not working to you insisting it does, and now suggesting that 1.0 is some magical value that only lights go over? Wrong on so many levels.

Lights aren't the only thing, but what I mean is that in the end, unless the user saves as raw, the output will be clipped between 0 and 1. Remember, this is the compositor, not the textures. Can you show me how it does not work? All multiplication does is scale a value. When I graph that function I get a straight line. If we use a lift of 0.9, values less than 1 are increased and values greater than 1 are decreased in proportion to their difference to 1. 0 becomes 0.1, 2 becomes 1.9.

@ArlenBeiler I would encourage you to do some research into how transfer functions play a role in the scene referred to display referred domain. Further, when you are suggesting that "something works" I would also encourage you to examine what an imager is attempting to do and what those values mean to analyse what "work" means. Perhaps start by learning about the scene referred domain before we go any further, otherwise it is all moot. Fair? http://blender.stackexchange.com/questions/46825/render-with-a-wider-dynamic-range-in-cycles-to-produce-photorealistic-looking-im Further reading at end.

Looking at some of your answers, I am amazed and thankful for your breadth of knowledge about colorspace. I will do more research about it. But you can do the colorspace conversion in the compositor and then run the output through the LGG, can you not? Also, the LGG function uses the sRGB colorspace to do the conversion. That is the myopic function name you mentioned above.

@ArlenBeiler You can run data through any node you wish, but the question is "Will it do what I am attempting to accomplish?" In the case of LGG on scene referred data, the answer is unequivocally 'No' because of the 1.0 display referred value and that sRGB EOTF transfer function. No depth here, just another bumbling idiot that has been walking the halls for too long. Try the config and you will see what this discussion is about in practice. There currently is no node to perform a colourspace transform via the compositor, although you could hack a transfer curve with math, but unadvisable.

I am sure most people know, but just a note that in the current Blender version (2.92) the ASC-CDL code seems to be fixed. I found this float x = in * slope + offset; return powf(x, power); (I omitted negative values checking for clarity). It is from COM_ColorBalanceASCCDLOperation.cc, which is tied by several steps to the Color Balance node.


text:
Problem in texturing a cube
I add a texture to a cube. The texture is an image. I set Coordinates to Generated and Projection to Cube. The rendering is perfect: the texture is replicated on all 6 faces of the cube.
But if I use the Texture or Material Display Modes in the 3D View the texture is applied only on 2 faces of the cube.
Why ?
The attached image show the problem with Material Display Mode

Did you remember to add a material before the texture?
Instead of using Coordinates to Generated and Projection to Cube,use simple UV unwrapping and do each face separately. You can manipulate the size, shape, and position of the image in the UV editor.

Blender's viewport has limited support for generated and object coordinates.
GLSL preview materials only support a subset of Blender node material textures and features as stated in this bug report and this one too
You can fake it or workaround it using node materials, as shown in this video

It seems that GLSL preview materials only support the Flat Projection Type

That's right. Cycles material preview recently received an upgrade to support other projection types like cube sphere and tube. It will be in the next release I think,  but it doesn't work for Blender Internal or game engine materials.


text:
My eye won't track to my bone on a certain axis?
When I added an object constraint to my eye mesh, I selected my armature as my target and my bone as the one that I want my eye to track to, but it's not working.
Here's what it looks like:
And every time I move my bone, the eye doesn't track to it. That's mainly because that if you look right below the Head/Tail bar, you'll see an axis selection where the eye wants to focus the bone on a certain axis. For whatever reason, it'll track the bone when I select the X and X-, Y and Y-, but not Z and Z-, and that's where I want it to be because it'll place it on the original position it was in. Is there a way to fix this?

Uploading the .blend file might help get more accurate answers, you can upload the file here: http://blend-exchange.giantcowfilms.com/

Additionally, I can see many issues in the attached image, first of all, it's better to use Quaternion instead of Euler to avoid Gimbal lock, that's in the rotation method for the eye and the bone, second, I believe you should use Local Space rather than World space in the Track To constraint, and I believe you should check the Target checkbox.

I don't see where I would change Quaternion to Euler, you're going to have to tell me where exactly it is. Second, which one should would I have to change world space to Local space, Left or right?

Also here's the Blend File

Where's the .blend file? After uploading it, follow the instructions, you should copy the link, edit your question, paste the link in it, then save your edit. Concerning Euler, look in the properties panel (the one that you toggle using N keyboard shortcut) under Transform > Rotation, you can change the (XYZEuler) to (Quaternion).

Sorry accidentally clicked post before I could get the file onto the comment or question. :/

The file should be on my question now.

Actually your case is very simple, keep everything as is, use world space in the Track To constraint for both, the only thing you need to change is the (To: -Y) in the Track constraint. Which is the Y axis for the Bone.
Aside from that, you have some issues in the file, you have 4 armatures, each has bones, and all of them have default names, my advise is that you rename your bones, delete unused armature, this will make your work much easier, I also had to move the origin of the eye to it's bottom rather than the center so it doesn't detach from it's joint when rotates.Here's the .blend file:

Well all the other armatures and models are for my project, but other than that, it should be good.

Yeah at least rename them, this will make your life much easier, if this answers your question, please mark it as answered, unless you're looking for a different answer, or you think this answer isn't complete


text:
How do I fix an out-of-bounds object?
You know how if you move an object too far off within your blender space it starts to glitch out and moves to spaces that are in large numbers, like "D:78453876956487 along global X," well that's a problem that I'm having and was wondering if there is any shortcut button to center the object to the 3D cursor or something?

Select your object, use Shift+S, then select "Selection to Cursor" in the menu.

Nevermind, All I had to do was Alt+G and Alt+R  to clear all changes I made to an object.


text:
Strange shadows in interior scene
With massive help of Blender Guru I am making my first interior scene. At about 42:30 min in this tutorial he makes a render:

and my render looks like this. What are these very deep shadows on the pillars of the couch ?

Maybe the hdr in your World Properties is not the same (free version vs pro?) or the Multiply and Add Nodes need a little tweaking or the Mapping needs a bit of adjustment

The Average Node in the leather material is causing the broad stripes in the couch.

Yes, I think you are right. I just appended the couch from the tutorial's blend files and did not change a thing. When I change this Vector Math node from "average" to "normalize" everything seems to work but no idea wath this node does ??

@OldMan, for information, I have reloaded the pillows from "Couch - Leather brown.blend" of the starter pack into your "modern interior" file and the problem disapeared... but I was not able to find why.


text:
My Blender animation was rendering and stopped suddenly by 14 frames?
This is my First time rendering an animation in blender, and while my animation was rendering, it suddenly stopped at the 14th frame.
I don't know why, since I put the end frame at the place I wanted it to be, and I'm not sure where I would adjust thy frame rendering position.
If you're wanting any more addition information: I set my file formats/rendering images to be PNG, my render samples are 25, I set all of my images to a separate file. This is just information that I think would correlate to my problem, maybe.

Very casually you omitted any info about the scene. What is happening at that frame? Do you have any simulations going on (particles, fluid, cloth, smoke? Do you have motion blur? Please [edit] your question and add more information.

So I fixed my problem finally, and I guess I must of not had enough disk space on my computer to render out the other frames. If you ever render out your animation, maybe you just need to make some space on your computer.

check the start frame and end frame in the render settings if they are set correctly.
also check the frame step if it's set to something other than 1.
You don't have to re-render from the beginning, just set the start frame to 15 to continue rendering from where you left off.


text:
Using the False Color look in combination with the CDL Node to work on Wide Dynamic Range scenes
The color management for working in cycles can be enhanced to work with wide dynamic range scenes. The idea is to enable working with scenes containing values that exceed the conventional 0-1 range.
Instead of using the default sRGB display transform, the OCIO color management configuration and LUTS are replaced with those of the OCIO configuraition pack created by @troy_s
As part of the Looks available on the mentioned pack there is a False Color Basic look. It is designed to help visualize the intensity of scene referred values and how they will be converted for the final picture.

on the documentation is described as

A false colour "heat map" of exposure.

To control the levels of those values, the use of the CDL node is proposed.
What is the workflow to use that tool, in combination with the ASC-CDL node?

The false color look presumes the use of the Wide Dynamic Range View.
Using the False Color with other views in colour management will result in incorrect transform values.

This Wide Dynamic View transform can use approximately six and a half stops above middle grey and map them into the display referred values of 0 to 1.
Here's the histogram of an example scene. It shows 10 gray patches that are darker than middle gray (0.18) and 7 brighter ones. Each patch from left to right is twice the intensity than the previous one, except for the one at the very right that is just one half stop brighter. Note at the bottom left of the image the red arrow, it indicates the area between 0-1 (values used for display referred images).

(click on the image to enlarge)
Once the Wide Dynamic Range View transform is enabled, that wide range of values gets remapped to fit into the display referred range of 0 to 1. Middle gray gets mapped to a 0.60 and scene referred 16.29 becomes 1 (white)

(click on the image to enlarge)
Enabling the False Colour Basic look will allow us to visualize the Scene Referred values within the range defined by the Wide Dynamic Range View.
The mid gray is represented by grey. Brightes values will be represented as red and white, Darkest ones will be black and purple.

The colour scheme is as follows:

Low Clipping = Black Scene Referred Linear value below 0.0001762728758
Ten Stops Down = Purple Scene Referred Linear value 0.0001762728758
Seven Stops Down = Blue Scene Referred Linear value 0.001404109349
Four Stops Down = Cyan Scene Referred Linear value 0.01124714399
Two Stops Down = Green Scene Referred Linear value 0.04456791864
Middle Grey = Gray Scene Referred Linear value 0.18009142
Two Stops Over = Green Scene Referred Linear value 0.7196344767
Four Stops Over = Yellow Scene Referred Linear value 2.883658483
Five and a half Stops Over = Red Scene Referred Linear value 8.150007644
High Clipping = White Scene Referred Linear value above 16.29174024

A possible workflow:
To do a grade on an image that uses a wide dynamic range, start by assessing your scene and think of what parts of the image should be the mid tones.
By moving the Power values on the CDL node try to make those areas fall close to gray or slightly into the green.
Using a power greater than 1 will make the midtones darker. Setting power values smaller than 1 will make the midtones brighter.
Then try to bring your Highlights within the range of the Wide Dynamic Range View
Use the slope for that. If you have areas in your scene that are white, you know that you have reached the clipping point (1) on the highlights, and you'll loose any detail on larger values. To bring those values down use smaller for the slope, and try to get your brightest highlights display as red with only a few white spots for the areas you want to preserve detail.
Quoting @troy_s When using False Colour, the goal is not to necessarily always bring all values into the display referred transform, but rather bring the reasonable values you expect into the view.
If you see black on the false color, you have reached the clipping point on the shadows. To preserve information on the shadows you want more purple and blue.
One thing to look for is that using small power values, might also affect your highlights and push them past the clipping point. If that is the case reduce the slope value to bring those values back.
NOTE: To expose the values and do precise numeric editing of any of the CDL controls click on the color box at the bottom of the big color circle to expose the RGB values used for the node's transform operations:

One more note The CDL node expects values in RGB. Even though there are some buttons for HSV and HEX, do not use them, the operations will not work as within the CDL specification.


text:
How to re-render animation?
I'm trying to re-render my animation, and by that I mean I'm trying to fix a certain area of frames that have light and grain issues, so that when I want to render the rest of the frames again I could just slide the start frame to where I fixed all my other frames, but whenever I hit the animation button, it says "sequence render," which already renders the unfixed frames from my previous render. SO my big question is, how do I stop the sequencing render and render a set of new frames with the same animation? Mind you that I also want to render each and every frame on a .png file within a separate folder.

First, you did the right thing by rendering into an image sequence. Never render animations directly as video.
Delete (or move to a different folder) the frames that need to be re-rendered. Then on the output settings uncheck the "overwrite option"

Then re-render as usual wiht CtrlF12. Blender will just render the missing frames and leave the others untouched.
If you have any strips on the VSE (video sequence editor) uncheck the Sequencer box of the postprocessing section of the properties window.

Open the Post Processing tab where all of your render settings are and uncheck "Sequencer." Once your set of frames is done rendering, turn it back on to make sure that the video from the editor is rendered.


text:
simulate interaction of fluids with different viscosity
Like everybody else in this site I've been new to blender for quite some time...
I'm trying to do an animation to simulate a mix of paint blobs with different colors, like Ebru Painting or Suminagashi marbling, based on mixing colored liquids with different levels of viscosity.
The idea is to have a drop of colored paint displace the surface, so that the colors don't really mix but create variable abstract fluid and organic shapes.
As an example please take 30 seconds to see this video by garip ay from minute 3:00 up to 3:30:
https://youtu.be/4dKy7HNU4vk?t=187

(image from the mentioned video)
I understand how to make more than one fluid domain to create different colors but I can't think of a way to simulate the interaction between them.
Maybe there's a way to do this with dynamic paint... I just haven't used that tool very much.
Since this is a flat image it could also be done with some clever texturing... maybe?
How could I do something like this in blender?

Related: http://blender.stackexchange.com/q/5469/599

Possibly usefull to obtain some of the effects seen in the video : http://blender.stackexchange.com/questions/18703/creating-a-black-hole-in-blender

Hmm, could they be multiple textures (on a plane) that have their boundaries distorted by another texture or object?

Disclaimer : I'm afraid I've not done much beyond scripting meshes at this point. I did once play with particle emitters and some constraint stuff hence this suggestion but this is a bit of a hack and may cost you more time then save you any.
Based off of the video you could try the following :
Setup a plane or may be even a cube with the top face removed. Using a particle emitter you could fill this cube at various locations to 'add ink' as it were. The tricky thing is then to make the particles emitted in a single addition cling to one another but repulsive to any prior and/or successive addition. That is for a single emission you want those particles to group in some way, perhaps there is some sort of elastic constraint you could apply. Then for separate emissions you basically want each addition to repel one another slightly.
You may have to make all emissions adhere to the bin/plate though, this is most easily by just doing things in the vertical direction.

Very interesting approach. Worth trying with boids and flocks

I tried making a fluid distortion from metaballs on particles. Theres a material on the metaball that distorts based on the blobby surface geometry which looks like the paint mixing.

I made a plane that emits 2 sets of water particles from opposing edges then used wind force fields to mix them. I dressed the particles in metaballs.

Then I apply a material that has distortion using Musgrave texture.

This is not currently possible.  The only way to do something like this currently is to fake it in some fashion:
How to bake multiple fluid simulations in one scene?


text:
Object becomes transparent when motion blur is enabled (Cycles)
I'm trying to render a simple animation with comical characters. From the following images, you could see clearly Combines from the Half-Life universe, and a creature called "The Stalker" (based off of The Hidden). The project has gone rather well so far, and I've begun to render, but while rendering I came across a problem. I do have motion blur enabled, and it looks nice and all, but it causes a fast moving object to become transparent? It might be the color, material, or something else.
Motion blur:

Without motion blur:

It's supposed to look like this (side view):

All of the materials are in place, render view isn't restricted, the only difference in any of those images is the fact that Motion Blur is enabled.

Your object is moving so fast that it has lost its opacity due to motion blur. try reducing the value for motion blur.

Motion blurred objects are inherently semi-transparent if they're moving fast enough, because they do not cover any area of the frame for the duration of the exposure. Motion blur results because an object moves during the exposure and thus "partially" covers an area larger than itself. For large or slow moving objects, there will be a large region that they obscure for the entire exposure, thus the transparent blur only appears on the edges. However, if an object is sufficiently small and moving fast enough, it can cover the distance of its own width during a single exposure. At this point, there is no region that is covered for the entire exposure and the object appears to become transparent.
This is not a limitation of CG, it happens with real objects too. See, for example, how the car in this photograph is almost invisible except for the lights which are able to overwhelm objects behind them:


text:
Can't undo something in Node Editor
I accidentally deleted a Color Ramp node that I was working all my colors on, and now when I cmd+z it doesn't do anything.

Undoing is done with Ctrl+Z menu. You can try access undo history Ctrl+Alt+Z and proceed from there (at least you'll know whether or not undoing is possible).

Seems like undo is broken in the node editor completely. This should be reported as a bug.

I have the same issue. Yesterday Undo worked fine in node editor, but today it doesn't. The undo history shows all changes, but nothing happens when I select something. :(

I must admit that I am surprised to see the same behavior even in 2023 in the current Blender versions. I have to assume that this is indeed a bug in Blender.

Yes it is a known issue https://developer.blender.org/T71895

I noticed that undo in the geometry node editor window only works when my 3D view window is in object mode, more specifically, not in edit mode.

I found this problem on Google, and this was exactly my problem, thank you so much!

The above solution should work, but it seems like a bug in the Undo history for the nodes editor.
Solution

Switch to the 3d view
Make a change, press CTRL+Z (it should work)
Go back to the node editor, edit something, and CTRL+Z works again. Heureka!

Check User Preferences➜Editing➜ Undo➜ Step is not set to 0.
Try undo from dropdown menu(assume tho you have tried this alraedy)
Try restoring default key layout.

Hit Alt+Shift. You probably switched to a QWERTZ keyboard configuration (for example DE) by accident, and are too far in the 3d zone to notice or think of it.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
My object is too transparent, how to fix it?
I'm following this tutorial here: https://www.youtube.com/watch?v=gF6qkByl-_M and around 29:25, he copies his material nodes from the grass to his leaves and mine turned out to be too transparent.

Here are my nodes for the grass:
If you need anymore information here's my .blend file:

does your texture have an alpha channel(is it png/tiff/etc) ? you are connecting it wrong.. the alpha should be used as a factor in mix shader , not color

Ok, so all I had to was move the Alpha output and move it to the third mix shader from the right like-so.
Thanks root.


text:
Rearranging elements of a panel
Is there a way to edit the position or hide some elements of an existing panel ?
I know I can edit space_view3d.py but I prefer to do it properly.
right now i'm appending some labels and they appear at the bottom of the panel

I would like know if it's possible to insert them before some other elements of a panel

You'd like to display your distance and median calculations at the top of the panel or in between the bool properties?

@poor in between the bool properties

The Blender interface is defined in Python scripts, and it is drawn in the order the code is executed. I don't believe there is a good way to 'insert' an UI element above an existing one once the code has moved on.
So to make an element show where you want, you just have to move the code to the proper location. In the case of Blender 2.77, it would be line 3366 of the space_view3d.py file.

Editing of python files that come with blender is a bad suggestion.

Agreed. I was looking for a quick and dirty solution. But the answers below is much better.

Inserting UI elements in between existing properties is not supported at the moment. Also editing python files that come with blender is bad practice.
You can use append() or prepend() in order to add elements to the user interface of existing Panels, Headers and Menus:

import bpy

def draw_my_properties(self, context):
    scene = context.scene
    layout = self.layout

    # display properties and values
    col = layout.column(align=True)
    col.label("My Values:")
    col.prop(scene.render, "fps", text="FPS")
    col.prop(scene, "frame_start", text="Frame Start")

def register():
    # lets add the menu to the Mesh Display panel via append or prepend
    bpy.types.VIEW3D_PT_view3d_meshdisplay.prepend(draw_my_properties)

def unregister():
    # remove the menu
    bpy.types.VIEW3D_PT_view3d_meshdisplay.remove(draw_my_properties)

if __name__ == "__main__":
    register()

More information and Addon code: https://blender.stackexchange.com/a/34490/3710

However, here is some kind of hack based on this answer. Following Add-on code injects UI elements into the associated python file on the fly (space_view3d.py in this case). It's also equipped with a prepend() fallback if the specified line cannot be found:

bl_info = {
    "name": "UI Elments In-Between",
    "version": (0, 0, 1),
    "blender": (2, 75, 0),
    "location": "Edit Mode Property Panel (N) > Mesh Display",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"}

import bpy

def draw_item(self, context):
    layout = self.layout
    scene = context.scene
    layout.prop(scene.render, "fps", text="FPS")

class DrawFuncStore:
    bpy_type = "VIEW3D_PT_view3d_meshdisplay"
    bpy_type_class = getattr(bpy.types, bpy_type)
    draw = None

def insert_menu():
    insert_after = 'col.label(text="Normals:")'
    insert_code  = '    col = layout.column(align=True)\n'\
                   '    col.label(text="My Values:")\n'\
                   '    col.prop(scene.render, "fps", text="Fps")\n'\
                   '    col.prop(scene, "frame_start", text="Frame Start")\n'

    DrawFuncStore.draw = DrawFuncStore.bpy_type_class.draw
    #module = bpy_type_class.__module__

    filepath = DrawFuncStore.bpy_type_class.draw.__code__.co_filename
    #print ("filepath: ", filepath )
    if filepath == "<string>":
        return
    try:
        file = open(filepath, "r")
        lines = file.readlines()
    except:
        append_menu()
        return

    line_start = DrawFuncStore.bpy_type_class.draw.__code__.co_firstlineno - 1

    for i in range(line_start, len(lines)):
        line = lines[i]
        if not line[0].isspace() and line.lstrip()[0] not in ("#", "\n", "\r"):
            break

    line_end = i

    # Unindent draw func by one level, since it won't sit inside a class
    lines = [l[4:] for l in lines[line_start:line_end]]

    # line offset
    offset = -4

    for i, line in enumerate(lines, 1):
        if insert_after in line:
            print("FOUND INSERT LINE")
            lines.insert(i+offset, insert_code)
            break
    else:
        append_menu()
        return

    # import bpy - hacky!
    lines.insert(1, '    import bpy\n    from bpy.app.translations import contexts as i18n_contexts\n')

    # Debug output
    #f = open("/home/poor/Desktop/c.txt", "w").writelines(lines)
    l = {}

    exec("".join(lines), {}, l)

    #bpy_type_class.draw.__code__ = code_object # Doesn't work, since a single func is not a module
    DrawFuncStore.bpy_type_class.draw = l['draw'] # exec defined our custom draw() func!

def append_menu():
    bpy.types.VIEW3D_PT_view3d_meshdisplay.prepend(draw_item)

def remove_menu():
    if DrawFuncStore.draw is not None:
        DrawFuncStore.bpy_type_class.draw = DrawFuncStore.draw
        DrawFuncStore.draw = None

    else:
        bpy.types.VIEW3D_PT_view3d_meshdisplay.remove(draw_item)

def register():
    insert_menu()

def unregister():
    remove_menu()

if __name__ == "__main__":
    register()

Note as @CoDEmanX mentioned:

This method only works as long as there's just one addon replacing the code object of a certain bpy type.

thanks @poor, this is a better approach than editing the space_view3d.py file , also thanks for telling me about prepend() .

@root you are welcome! Since you've asked for the 'correct' solution, thats it for now. We can expand the answer, just let me know...

Editing the UI code can be a slippery slope.
I'd suggest overwriting the Panel classes draw method, or the Panel Class itself.
An example of overwriting the draw method
import bpy
#F8 will undo this change.
def f(self, context):
    self.layout.label("Gone")

bpy.types.VIEW3D_PT_view3d_meshdisplay.draw = f

thanks for this answer,  having to redefine the draw method is probably overkill for something as simple as rearranging UI elements. What i thought was possible was having the class return a list of it's ui elements or maybe a way to iterate on them like nodes of a linked list, i can see now why this is not possible.

This is interesting to me, even though it's some time ago. I tried ti overwrite the draw method and it did do any thing. Do I need to reregistre or reload or something? Or is it different post 2.8?


text:
Why is the blender exchange option missing from the export tab in makehuman?
In all the tutorials for makehuman I watched on youtube, on the export tab, there is an option to export as blender exchange. However, in my makehuman, that option doesn't exist. I remember a long time ago, I exported my makehuman models as blender exchange before, but that was an old version. I don't know where that option went. My makehuman version is the newest one (I just redownloaded it). Here are some screenshots:
My makehuman:

Youtube tutorial:

Thank you for your help.

The .mhx export code  wasn't included in MakeHuman because it's quite heavy. You have to download and install it separately. Follow the instructions and you should be fine.
https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange


text:
Splitting a face
I am doing this tutorial. At about 12:00 min CGGeek selects a face and first separates that face with P and then corrects and hits Y to split the face.
I am not familiar with this Y command and don't really understand what he does and why he does this. I understand that this command copies the face and also deletes the original face ? But the face remains part of the original mesh, is that correct ? But why does he do this ?
And I believe after that he deletes the original face

Y just splits the selected face (separates but stay in the mesh of the object).
He did that because he wants the window to be able to move on side (to be opened or not).
Previously, he did separate effectively from the mesh using P. But as this separated face is deleted after that, I think this is not what he wanted to obtain (a mistake surely).


text:
aligning top and bottom of two objects
I am modelling a large building and want two objects align at the top and bottom.
I have tried scaling but this is a very cumbersome process and in the end the objects are never 100% aligned at the top and bottom. So how to align  those two objects at the same top and bottom position ?

Related - http://blender.stackexchange.com/questions/539/snap-object-on-top-of-surface-of-other-object and http://blender.stackexchange.com/questions/2289/is-there-an-easy-way-to-align-two-objects-on-a-specific-axis. Use snapping while grabbing vertices.

You can use snapping options to do that.

Set snapping on and choose the closest to vertex option (under the green arrow bellow)

Enter edit mode for one of the objects
Select all the vertices
Then point your mouse to the bottom of the second object and grab G

Now position the 3D cursor to the bottom : select one of the bottom vertices, then Shift + S and cursor to selected

Back to object mode
Set the pivot to 3D cursor
Then scale S and point to the top of the second object

authors: محمد عبدالعاطي