text:
Can I create a Link style connection to an external OBJ file?
I would like to create some parts in FreeCAD or other software and Export as OBJ. STL or other files to render in Blender. But I would like to create a Link so that if I update the files, the mesh data in Blender would update, that way I wouldn't have to reassign materials, modifiers or redo any animation.
I've done something similar between AutoCAD and 3Ds, I wonder if its possible here.
Thanks.

AutoCAD and 3Ds are both Autodesk applications with native builtin intercommunication tools; such thing is not available in Blender as far as I know. Be smart about it. Put your imported objects in groups and instance those groups, parent the objects to empties and animate them instead, use armatures and link modifiers on updates. Not much you can do about materials though


text:
Why does part of my scene not appear in my final camera render but appears in all other situations?
I am new to blender and and not quite sure what info should be included here so please be patient with me.

Any information about your scene set up would be helpful. If your objects are organized into different layers, make sure all layers are selected in render layer tab, also check if the objects are visible to camera in the cycles settings in the object tab, also check if the objects are not render restricted in the outliner

In the Outliner (looks like a hierarchy), are any objects have grayed out camera icons? If so, they are being excluded from the render.

The usual suspects are render layers or the render option being turned off in the outliner.
See the attached image for what I mean.
Here you can see the bottle in the 3d view but missing from the render.
Hope this helps.

source: Stack Exchange

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

sort: votes


text:
The interface for material looks different than the one on tutorial
I am a complete beginner and following a tutorial about how to put a texture on a cube. I think maybe they have a different version of Blender because what I see in a few places is different so it is very hard to follow.
In the video after UV unwrapping the cube they click to create a new material then click this little button next to the colour and then get a menu where they can choose 'Image texture'

But in my Blender which is 2.79b when I click Add material it looks like this:

As you can see it is totally different and I can't find anywhere a Color box with a button like in the video. I can't even see 'Surface' anywhere. So I am stuck.

Did they change Blender so much I need to find a new tutorial for my version?
Is there a simple way to do the same thing in the version I have?

See for differences between the render engines https://blender.stackexchange.com/questions/5820/how-is-cycles-different-from-blender-internal

@MrZak Maybe to someone experienced it is the same but not from my perspective seeing as I don't know what BSDF is. Thanks.

BSDF in short stands for shader. There's nothing wrong if question is marked as duplicate. This is how this site works. Reason for vote is that this question was already asked before and already recieved an answer

Hi. Please consider the size of images you upload in future. These are very large images for the information they are showing.

@RayMairlot They are actual size screenshots. I should have scaled them down as I realised after posting the question that this website shows them at 72dpi instead of how they look on my screen.

OK I found a comment about something called Cycles mode. I don’t know why but apparently you have to switch it to Cycles Render.
There is a menu at the very top of the window. This was not explained in the video. I would love to know more about why it's different or what this means!

In your version of Blender, and using the Blender renderer,  you have a Diffuse channel. If you click on the colour field next to Diffuse, you can change the colour.
If you want to add an image etc, you click on the next icon along in the Properties editor, the one that looks like a chess board.

It means the rendering engine. Like an oven and fried pan, you can choose what you want your scene object been cooked.

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


text:
Period key does nothing on Mac keyboard without numberpad
I have an iMac with a wireless keyboard with no number pad. I am using Blender 2.78.
In one of the absolute beginner videos it says that if I turn on 'Emulate Numpad' then the keyboard's normal period '.' key should function to re-centre the view to the selected object (after I have used shift and middle mouse to pan across).
But when I press the period key it doesn't seem to do anything.
I have checked in User Preferences > Input and I can see Outliner > Show Active has a mapping to '.'

Is something set up wrong or am I misunderstanding what this key is supposed to do?

The shortcut shown on the screenshot is set up for the Outliner editor, while you want it to be in the 3d Viewport editor; in the latter Period button used for setting pivot point to 3D Cursor so most likely it still is the same. See https://blender.stackexchange.com/questions/45911/emulate-non-number-numpad-keys, looks like you need to setup some custom shortcuts to make Period button work like Numpad Period.

Thank you for the link. I have managed to sort it. Though I don't understand why there are more than one key bindings with the same name 'View selected'. Is that just multiple key bindings for the same action?

Actions and shortcuts for them differ depending on the editor where this action is used in. So while it might seem there are multiple key bindings for the same action they are different for Blender because are used in different contexts.

You can't tell just by looking at it, but it's set to Numpad period. Remap it to regular period and you should be fine. (Emulate Numpad doesn't change this one.)

Thanks. I saw that in Blender 2.9 it now says "Numpad ." by default which makes it clearer

Instead of using Command, use Ctrl key.
Ctrl + . (Period) key, it worked for me.

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

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


text:
How to render only one render layer?
How to render just one render layer?

Rerending only freestyle on previous render and Adjusting Freestyle in the Blender compositor explain how to separate the rendering into "normal render" and freestyle-only. Unfortunately they do not explain how to render only one layer.
An code method is explained in Re-render single layer without losing all the others (Blenderartist.org):

Open a Python Console
Run bpy.ops.render.render(layer="FreeStyle")

This appears to not be working:

It freezes Blender (no progress bar or view)
It takes as long as pressing the render button, so it seems to not work and just renders all layers.

I suspect there might be a non-code UI way to do it. Is there?

In Blender 2.80 and later you can find settings for current layer in Layer Properties in Properties pane. Fourth tab from the top, and the relevant setting is at the top of the pane.
To switch layers use layer switcher at the very top right corner of the window.

In the Node Editor:

Press the Render Layers node that handles the render layer, which you want to re-render.
Press the camera icon in the bottom right corner.

or:

Select the Render Layers node that handles the render layer, which you want to re-render.
Press N.
In the sidebar, in the Properties section, press the camera icon.


text:
IK rigged elbows have unexpected "laggy" or "jumpy" behaviour when animated
To keep this both as short and as informative as I can:
The character I'm animating has bones in his arms set up like this:
The lower arm has a regular IK constraint with a hand controller as a target (chain length 2), and the upper arm has a  regular IK with an elbow controller as a target. Both targets are custom shaped helper bones.
(I didn't use the "pole target" function because it introduces undesired twisting, and doesn't fix this problem anyway)

The problem I have is that the elbow updates in a weird way during animation, as if the IK calculations were struggling to keep up.
When you go to any frame, the elbow first appears in a wrong position. And only after about a third of a second it snaps into correct place by itself.

Sometimes the difference is minimal, other times the elbow faces the other way completely.
Because it takes that short while for the bone to correct itself, mostly the wrong positions show instead of the good ones when the animation is played normally in viewport.

I've made 3 animated actions in total with this same armature, and 2 of them work perfectly fine. Only this one has this problem, which is why I have no idea what the cause could be.
So far I've tried to fix this by restricting bone rotations, re-rigging the arms to use the pole target function, changing position of the elbow targets, disabling animation of the elbow targets, and also baking all of the animation.
None of that has however solved the issue.
If anyone will be able to make any sense of this and tell me what's wrong, I will greatly appreciate it.
The blend file can be downloaded from here:
Blend file on Google Drive

Just FYI, I just opened your Blend file on my laptop (Win7) which has the slowest processor ever and there's absolutely zero lag.  It runs at 24fps all day long.

Well you are not wrong, the fps isn't the problem here. The animation runs at 24fps for me as well. The problem I have is that the IK that doesn't behave as it should. As seen on the gif above, the elbows jump around even though they shouldn't be, going first to a wrong place when you enter a frame, and then snapping back into the correct place without any sort of input. But I've explained that in the text... My apology if it wasn't clear enough.

No, it's my fault if anything's misunderstood.  I was just looking at your gif and seeing that there's a stutter step that I can't replicate, even by stepping through frames.  How were you able to capture that in the gif?  If it was some kind of calculation lag, I just wanted to let you know that it was running smoothly on my machine, just so you would have a troubleshooting data point.

The gif was captured by "Active Presenter", kinda regular screen capture software, it shows quite exactly how the elbows behave for me. This is interesting, if the issue doesn't appear for you with the same file, then it might be some kind of a glitch on my side.

I have managed to find the source of the problem, This IK glitch seems to be caused by a second constraint that I have on the lower arm bones: There is the main IK constraint, and then I also had a Copy Rotation contstraint, so that the bone's roll would partially follow the hand to avoid twisting. With this constraint removed, the bones no longer behave like on the gif.

Could you please add that as an answer below?

So by messing around I managed to find my own mistake, and hopefully this answer will help others avoid it.
As is the standard with most IK setups, I have 2 bones in the place of the Hand:

The actual deforming Hand bone, which is child of the Lower Arm bone
A helper "Controller" bone, which occupies the same space as the Hand bone, but is not a child of the skeleton.

The Lower arm bone has a regular IK with the hand Contoller as a target, the deforming Hand bone then has a Copy Rotation constraint, so that it always has the same orientation as the hand Controller.
And here's where I made my mistake:

I wanted to add some extra realism to my rig by adding a Copy Rotation constraint on top of the IK to the Lower arm, 0.5 weight and limited to Y, so that the forearm would twist slightly as the hand bone turns. But I've set the target of this constraint to be the deforming Hand bone, and not the Controller bone.
That means the IK solver had to compute a lower arm bone, which rotation was dependent on the hand bone, which rotation was dependent on the controller bone. The rotation of the Lower arm basically had to be calculated in two steps, which is most likely what caused the strange Elbow desync as seen in that gif above.

I've discovered this by the elbows suddenly fixing themselves when I muted the lower arm's copy rotation constraint.
So the solution is following:

As ironical as it is compared to the length of my descriptions, the solution was as simple as changing the target of the Lower arm's Copy Rotation constraint from the Hand bone to the hand Controller bone. That way the rotation for the lower arm is only calculated once, and the problem disappears.


text:
My shadows using "blender render" are noisy?

Whenever I make a render in Blender, all my shadows are messed up. They aren't just black, they're black but have a lot of noise. I don't know how to explain it better, so I'll post a render where you can see it.
I added a few red boxes at the parts where it's really annoying, but I also want the other parts to be fixed.
Thank you so much to the person who can fix this for me! I'm a complete beginner, so I  have no idea how to fix it. Thanks! :)

Regards and thanks in advance,
Jonas

what is your lighting setup? Strong point lights will create crisper shadows. Are unnaturally sharp shadows your goal?

Ah, thanks! I tried fixing it, however, I'm using cycles now. ;)


text:
How do i get rid of these circles appearing on the background I created while using emit?
I've been using blender render just to make a new background for my computer, and it involves 3 planes which can all be seen: The background is one, and the 3 is one, and the ring around the 3 is one. I messed with the emit on the 3 and the ring (it's the same material for both) and the more light they emit, the more visible these spots are. Anyone know what to fix? I have indirect lighting turned on with 2 passes allowed it that matters.

Okay I figured out what was wrong, the 3 and the ring were too close to the background. This appears to be "Z Fighting."


text:
Blender gpu renders turn completely gray
Whenever i try to render with gpu in blender it all turns completly gray, i have no idea why, but with cpu, it turns out just fine
Im using: AMD Radeon 200 series. Blender 2.78
The exact same renders but with cpu and gpu.
(CPU)

(GPU)

Hmm... that is odd. Try adding a light source to the scene that lights up the cube. Whether or not that works, this is not normal behavior. Possible GPU problem?

See here https://docs.blender.org/manual/en/dev/render/cycles/gpu_rendering.html#opencl and follow the link to wikipedia to check if your card is compatible

So I have an AMD Radeon HD 7800 series video card. It worked wonderfully for rendering gpu in Blender up  until 2.78 came out. Once 2.78 came out, I lost complete ability to render with GPU up until 2.78b. It kept giving me errors when I would try to render it. Once 2.78b came, the errors stopped, but I had the same gray render that you have. I decided to boost the light significantly, and try rendering again. It works, you can now see the object with the boosted light. You'll have to boost your lighting to use current version GPU for AMD, and it'll have significantly more noise. It will also be way over exposed if you render this same scene with cpu with the boosted light settings. I hope they fix it soon.


text:
My car's topology is messing up as soon as I attempt to move a group of vertices along the y-axis
I am modelling a car and am using edit mode to position the trunk. Whenever I move my string of vertices along the y-axis, the topology gets really strange, and it looks like one of the edges (with one of its vertices selected), is not being affected by the movement of that vertex. I do not know why this is happening. I removed the only modifier (mirror) I had on the car, and tried removing doubles. It told me it "Removed 0 vertices", and the problem is still there. Please help me!

You car has bad topology, the side and the trunk are huge ngons (faces with more than four sides) which is known to cause trouble. If the car is to be symmetrical, consider using a mirror modifier.

@Leadmeteor, in the upper image it seems that your back face is an Ngon: try to convert that face to regular squares, it should be easy (delete just the ngon face and rebuild it using just 4 sided (4 vertex)  geometry. Or, upload the model to http://blend-exchange.giantcowfilms.com/ and then put given link in your question, to have an example.

@Duarte Farrajota Ramos he was already using mirrors, he said.

I don't know how to clean up my topology. I uploaded my .blend to that website. Can you please show me how to fix the topology without deleting and rebuilding the car?

Okay, I fixed it. I had to delete most of the vertices in the middle of the car and then fill in the edges and faces. It was tedious, but I did not know any better way. The only question I have now is will using the loop cut/slide tool cause bad topology again? That is what I used and it messed up my topology, so I am wondering whether or not I should continue using that tool or if there is a better way of adding more vertices. Thanks for your help!


text:
Problem about text (letter not complete)
I have a problem with the letter "s" and the number "5" (the same form) with this font on Blender :/
It is not complete and don't appeared on my render.
[Pardon my English]
Thanks

The font works perfectly, the font borders are present, but there is not the texture.

@pycoder I think this could legitimately be a problem with blender's interpretation of the font as I have seen this happen with fonts before.

Was the text converted to mesh already? If not try to change font options, like depth, resolution or offset for a tiny amount, it could probably make font object to change Ngons there a bit so Blender to fill those faces.

First, Axel, what is the font, and where did you get it? Also, is this effect that you see with the "s" when you type it in when adding a text curve object? What does the same selection look like when you use the same font in a different program, like GIMP?

Converting the curve to a mesh don't works :/ When I extrude the text, the borders are present on the lower part of the "s" but the profil face is empty

This text has already been realized on Blender without problem ( Beginning of this video : https://www.youtube.com/watch?v=6wec2CwBH7Q )

It is all good, I offset the font, really easy ^^ Thanks you all !

@pycoder It appears that it can sometimes be a bug: https://developer.blender.org/T40144


text:
Why is blender not rendering the light source in certain frames?
As said in title blender is not rendering the light source in certain frames and there is no distinguishable pattern to the frames that are missing the light source.
First two frames Exhibiting this behavior. are 2 and 13 of 250.
I will continue to attempt to solve this issue however Any info you may have on this issue would be greatly appreciated.
Thank you.
(in the file "Green.7z" the image titled "Green" was used to texture the uv sphere just because it looked better then just using defuse.I was just trying to make something that looked interesting that was simple. Feel free to play around with the project yourselves and make something better of it if this issue gets resolved.) (I labeled the project files as "(Corrupted)" so i could recreate the project without confusion.)
Blender Project files:
Please go to the link provided to download all related files to the project described.
https://drive.google.com/open?id=0B6UXTR3VWO_DODNtQW1DZnd2cUk
(3.54 GB)
Render Engine: Cicles
System info:
OS Name Microsoft Windows 7 Professional
Version 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer Microsoft Corporation
System Name MS0001
System Manufacturer Gateway
System Model    DX4831
System Type x64-based PC
Processor   Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz, 2668 Mhz, 4 Core(s), 4 Logical Processor(s)
BIOS Version/Date   American Megatrends Inc. P01-A0, 11/17/2009
SMBIOS Version  2.6
Locale  United States
Installed Physical Memory (RAM) 16.0 GB
Total Physical Memory   16.0 GB
Available Physical Memory   13.2 GB
Total Virtual Memory    31.9 GB
Available Virtual Memory    28.9 GB
Page File Space 16.0 GB
GPU:
Name    NVIDIA GeForce GTX 660
Adapter Type    GeForce GTX 660, NVIDIA compatible
Adapter Description NVIDIA GeForce GTX 660
Adapter RAM (2,147,483,648) bytes
Driver Version  21.21.13.7849
Color Table Entries 4294967296
Resolution  1280 x 1024 x 60 hertz
Bits/Pixel  32
Cores       960

I forgot to mention that i am using blender version: 2.78a and have installed filmic blender in blender.

Replace all objects with a cube, narrow down the problem. And reduce the file size. Does the problem remain with 1 light and 1 cube, then upload that file!

I have narrowed it down to the emission shader for the fluid domain.

The light source and the emission shader on the fluid domain cant coexist in certain frames. I seemingly can only have one or the other.


text:
Color ramp gradient 'flattened out'
I'm experimenting with some procedural ways to create dunes, but I'm experiencing some issues with the color ramp. I want the top to be (close to) pefeclty sharp, but right now it is sort of beveled. Is this a limitation/issue with the color ramp and is there any way I can get rid of it?

I would guess it's because your lighter value is clipping past the maximum "white". Try lowering the value somewhere in your node setup.


text:
Can't use context menu 2.81
When I add a new object and I want to change the properties of it I can't change any of the options in the context menu. The options look grayed out and when I click I just click through the window into the 3D viewport.
This only happens when adding meshes: When I go into edit mode and bevel, then pop up the context menu I can change values just fine.
To clarify, I have used 2.81 full time for a couple of days now with no issues, one second it was fine the next I couldn't use it anymore, I'm pretty sure that means it must have been a thing on my end.
Restarting blender and making a new project doesn't work.
I've been using Blender since 2.69 and never had anything occur similar to this.

Hello :). Seems like a bug, but if you'll share your file https://blend-exchange.giantcowfilms.com/ I can try to replicate the issue.

@JachymMichal uploaded an empty blender file because the file the issue first occurred in is sadly one I cannot share, the issue occurs over multiple projects though. Hopefully it can be of use. :)

Hello again :). It works just fine for me, so it might be your Preferences messed up.  Try to reset them to Factory preferences, that should narrow it down.

I wonder if you changed your mouse to right click select? If you did and put it back to left click, you might see it normally.

I was hoping I wouldn't have to, but that fixed it for me! Thank you!

Factory reset my preferences fixed it.

Glad to hear that, I'll know what to do when this happens to me :). You can now mark your question as solved, for other poor souls that encounter this.

I have to wait two days before I can accept my own answer :/


text:
merge 2 objects in sculpt mode
So I've been studying the anatomy for a couple of days and I made de legs separately from the upper body. I now want to merge those 2 but I don't know exactly how I've tried a Boolean tool but it's not really working. Can you guys help me pls.
Thanks in advance !

Can you join them manually in the lower multiresolution? I woudl suggest the sculpt tools addon, but that is mainly for the dynamic topology sculpting with destructive sculpting.

Why is boolean not working?

The real solution would be to use boolean operation to do that. We can try to help you to solve this problem if you tell us why it is'nt "really" working

Well my advise is to go Zbrush. There you can join the meshes and re-project the sculpted detail so you will still have all the sculpted subdivisions. By doing join operation or boolean in Blender you will loose the multires data, the operation is destructive. You will end up with one-piece high-poly but no corresponding low-poly.

To merge the legs with the torso, select the two objects (the legs and the torso) in either order, and press CTRL-J key. The object you select first gets merged into the object you select last, so if the first object you select is the legs, and the second is the torso, the surviving object is the torso. If the first object you select is the torso, then the surviving object is the leg object.
But why do you want to merge the legs with the body? In blender, for one element of a character (like a leg or an arm) to articulate relative to another element (like a torso) the elements need to be separate objects. After merging (or "joining") the legs to the body, moving the legs relative to the body (or the body relative to the legs) becomes impossible with ordinary modeling and animation techniques. So, if you're modeling a non-movable statue, go ahead and join the objects. If the character is to be animated, leave them separate. In fact, if the character is to be animated, you probably want to separate the legs into four objects, one object for each of the lower legs and and one for each of the upper. Similarly, when you get there, if the feet and hand are to be able to articulate, each foot and hand will need to consist of multiple objects, depending upon how detailed you want the animation to be.
To preserve the ability to animate the character, you would use a different mechanism in Blender: you'd parent one object, for example an upper leg, to another object, the torso, and in turn, parent the lower leg to the upper. There are several tutorials available on Youtube easily located by using your favorite search engine with the parameters "Blender tutorial parent objects".

Hi thx for the answer. I actually wanted to merge the 2 objects to make them look like one because now you can clearly see where the legs stop and where the torso begins.And i'm not planning on animating it.

Joining the two objects will not make them "look like one", it will make them one.

This answers the question if the first paragraph, although I would add that you may want to connect the mesh pieces in edit mode after joining the objects. However the rest of this answer ranges from misleading to incorrect with regards to character animation. Characters are normally a single mesh weighted to an armature, which is then used to animate them.

Go ahead and edit my answer to improve it, @Sazerac. My Blender experience thus far has mainly involved static objects and I am only now beginning to consider animations, but mainly with inanimate objects, not characters. The answer contained a reasonably accurate statement of my understanding at the time I wrote it, but I make no claims to any particular level of expertise in animation.

@brasshat I have added a mention of the aramature modifier and a description of retopology that will be helpful if animation is a target.


text:
Typing in a game?
I made my own little... I guess one could call it a pictogram sort of language?
I want to be able to type it in a blender game, I've already made all the characters/letters but I'm not too sure on how to do the game logic.
I basically want to make this "game" just to quickly generate words/sentences with my made up characters. xD
Idk. How can I make it to where when I press a letter the corresponding mesh appears? And how can I make a space to type a new word?
I'm hoping there's a way to do this without coding, a way with just Blender's built in game logic or something?

What have you try so far?

Well, I think that the Sensor in the Game Logic view would be Keybaord and the Controller would be And. Pretty sure that part is simple. The Actuator might be Edit Object with Add Object? But it doesn't seem to be working. Maybe I did some options wrong.

I don't think it's possible without at least a little bit of python, but... I suggest taking your characters and turning them into an actual font. This can be done for free on several websites. You can then have a text object display its text using your new font, and therefore just change the value of the text object instead of spawning in new meshes.

But the format on how the words would be typed is different then what happens when we're typing here. x3 But I suppose I can't avoid python.

Typed differently? How? If you mean you want to press D to get A then you can just move the A character to the D slot while making the actual font.

I meant instead of the letters appearing side by side like they do normally in word or other text documents, they overlap in a specific way.

Hmm okay, does each character overlap differently to each other? If they all overlap the same then I think there is a setting in the text object settings which lets you change that.

There might be a way with the game logic to generate an object (in this case a letter) at the location of an Empty and then move the Empty over by one character-width so it will be ready for the next letter. All hypothetical; haven't tried this myself.


text:
File Output node not saving anti-aliasing (Blender internal)
I'm trying to use the Z Combine node in Blender Render (internal) to combine a person and a shirt - node setup depicted below. The problem I'm running into is that the image saved from the File Output node does not save the anti-aliasing (Full Sample), whereas if I go to the Image Editor and go Image->Save as Image when the Image Editor is viewing the Composite, the anti-aliasing saves properly. Zoomed in portions of each image attached.

Either I don't understand what you are trying to achieve of your node setup seems convoluted and overly complicated. Why not just use an Alpha Over node?

I ended up hiring a contractor to help me with this render setup and an Alpha Over node is exactly what they chose to go with. Obviously doesn't explain the unexpected behavior but will hopefully solve my problem.


text:
How to read shader code of a compiled node tree?
Since Blender supports GPU rendering, sometimes the shader node trees need to be compiled into a form that can be sent to the GPU. I don't know if it's first compiled into a shader language HLSL/GLSL/MSL/WGSL etc. or directly to the intermediary representation DXIL/DXBC/SPIR-V/RDNA2 ISA/PTX, or maybe even directly assembly? Obviously obtaining HLSL would be best, but even getting assembly helps.
So for example, if I have a node tree:

How would I obtain an equivalent shader code:
vec3 RGBnode() {
  return vec3(0.5);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec3 col = RGBnode();
  fragColor = vec4(col, 1.0);
}

This is not really an answer, more like me sharing notes on studying the Blender source code. Various aspects of converting the node setups to shader code are all over the place, so it seems the most reasonable approach is to fork Blender and save to a file the code that is being sent to GPU…
Python
source/blender/python/gpu/gpu_py_shader_create_info.cc
source/blender/python/gpu/gpu_py_shader.c
GPU
GPU shader interface (C --> GLSL)
source/blender/gpu/opengl/gl_shader_interface.hh
source/blender/gpu/opengl/gl_shader_interface.cc
source/blender/gpu/intern/gpu_shader_interface.hh
source/blender/gpu/intern/gpu_shader_interface.cc

Structure detailing needed vertex inputs and resources for a specific shader.
A shader interface can be shared between two similar shaders.

GL shader
source/blender/gpu/opengl/gl_shader.hh
source/blender/gpu/opengl/gl_shader.cc

Implementation of shader compilation and uniforms handling using OpenGL.

GPU shader shared utils
source/blender/gpu/GPU_shader_shared_utils.h

Glue definition to make shared declaration of struct & functions work in both C / C++ and GLSL.

GPU material
source/blender/gpu/GPU_material.h

Functions to create GPU Materials nodes.

GPU platform
source/blender/gpu/intern/gpu_platform.cc

Wrap OpenGL features such as textures, shaders and GLSL with checks for drivers and GPU support.

GPU codegen
source/blender/gpu/intern/gpu_codegen.h

Generate shader code from the intermediate node graph.

source/blender/gpu/intern/gpu_codegen.cc

Convert material node-trees to GLSL.

GPU shader dependency
source/blender/gpu/intern/gpu_shader_dependency.cc

Shader source dependency builder that make possible to support #include directive inside the shader files.

GPU material library
source/blender/gpu/intern/gpu_material_library.h

Parsing of and code generation using GLSL shaders in gpu/shaders/material.

GPU capabilities
source/blender/gpu/intern/gpu_capabilities.cc

Wrap OpenGL features such as textures, shaders and GLSL with checks for drivers and GPU support.

GPU node graph
source/blender/gpu/intern/gpu_node_graph.h
source/blender/gpu/intern/gpu_node_graph.c

Intermediate node graph for generating GLSL shaders.

Color management
source/blender/imbuf/IMB_colormanagement.h
source/blender/imbuf/intern/colormanagement.c
Render internal
source/blender/editors/render/render_internal.cc
Nodes
source/blender/nodes/ - it looks like those files only describe the interface part of nodes and has nothing to do with the actual rendering part.
tbc…


text:
How to create a ° degree field in Geometry Nodes?
Some nodes like Vector Rotate or Mapping have scalar and vector fields with $°$ symbol in them:

This also affects how the value is stored in memory – without the symbol it is stored basically without a change, but degrees are stored by being multiplied by ${π\over180} = 0.017453...$:

So I need to add "Degrees" to the field name to make it clear I ask for a value in degrees, and I need to divide it by 0.017453 or use Math: To Degrees node. How do I instead just set the input to display a value in degrees?

Related: https://blender.stackexchange.com/questions/258623/how-to-add-units-in-the-input-parameters-of-geometry-nodes-properties-panel

Related: https://blender.stackexchange.com/questions/272070/what-is-the-parameter-forcing-a-node-input-defined-as-float-to-use-degree-unit-f

@quellenform could you close it as a duplicate of both? I don't know if I can link to both posts as a duplicate, but one is earlier, and has a methodology on creating it, the other has python information but unfortunately Gordon Brinkmann deleted the answer (we have to ask him to undelete)

Actually also https://blender.stackexchange.com/q/271457/60486

I couldn't find a setting in UI or Python API, but you can create a degree° input by connecting a placeholder Group Input socket into an existing degree° field:

Unlike with the technique to create constant inputs not accepting attributes in the modifier stack, here the degrees will stay even after you disconnect them from the degree fields.


text:
In Video Editing tab - any Audio FXs?
Is there any Add-on or Plug-in that would add Audio modifiers, like Reverb, Flange, Equalizer, etc. regular AFX stuffs?

No, there is not. And I myself would be thrilled if Blender would support VST3 or similar, but Blender is not an audio editor. And actually that's good, because audio works better in other programs, and Blender should focus on other things.

An EQ is in the works: https://developer.blender.org/D14412
Alternatively, you can roundtrip strips or the full sequence in Audacity with this add-on: https://github.com/tin2tin/audacity_tools_for_blender

Animation-Nodes for Blender Addon adds a bit of support for audio:
Animation-Node-Addon-Docs


text:
Create a shader mix with a factor of Illuminated surfaces in Cycles
Is there a way to mix shaders with a factor that identifies illuminated or lighted surfaces?
For example: I have a space scene with earth planet in it, I want to cover the sun-lighted side with day texture and dark side with night texture.

I made a shader with some workarounds: I created a plane with a Damped Track constraint that keep its face to the sun and projects UV on earth, so the factor to day and night of earth is always in the direction of the sun.
But I'm looking for a more physical-real way to doing it... a factor that understands the way light brights the object and puts it to the shader.
*In EEVEE there is a simple way: Toon BSDF -> Shader to RGB -> to Factor
but Shader to RGB is not available in Cycles.

In blender it's possible to texture lights. Experiment with it!


text:
How to have 2 or more dynamic paints on a single object?
I have a Waved Object (Blue surface) that need to Wet the Red Cubes fall into it, how to make that happen? Only one Dynamic paint can be applied to surface at a time,
Is it possible to cache, or convert-to-frame the Waved Deformation, and then apply a new Brush Dynamic Paint to surface?
Any other workarounds would appreciated!

How made you this drop in the water (bounce) & swim effect?

If you interested, I'd like to manually animate the cubes as brushes and the surface is a refined cube dynamic-paint canvas that builds wave.

Yes, it's not possible for an object to be a brush and a canvas at the same time.
You can bake the Dynamic Paint as an Image Sequence. But I am not sure if this helps in this case and I don't know if you can use the baked cache data of the waves.
A working solution is to fake the effect with a duplicated setup:

It's basically what you have already:

a cube that works as a brush to create the waves
a pool/liquid (cube) that is the canvas to get the waves

plus additionally,

another cube that acts as canvas to get the wet effect. It's overlayed to the brush cube and slightly scaled-up so the brush cube is inside of it and cannot paint on it. The canvas cube is parented to the brush via Parent Type = 3 Vertices to follow the soft body physics. This can also be used to create a swim effect (not used here).
a flat cuboid that is right under the surface of the pool that is a brush and paints on the canvas cube to make it wet. For more realism, you can use a Mesh Deform modifier and bind it to the pool mesh so it gets also wave deformations. The Dynamic Paint modifier must be the last one on the stack (bottom).

The canvas objects need some subdivisions to have vertices that can be colorized.
Use the Vertex Color node in the Shader Editor to make the vertex color visible in the material preview and final render.

Thanks Blunder, for this descriptive answer, I really appreciate it and also tagged it as current Correct answer!

Also the "Mesh Deform" Modifier doesn't work in this case, I used "Surface Deform"! Thanks again


text:
Using Blender & Python for Batch Image Conversion, getting unexplained Runtime Errors
I need to import a bunch of models which use .dds textures, which are not supported by Cycles, but they are supported by Blender. I can open such a .dds in the image editor, and press F3(Save image as) to save it as a perfectly functional .png file.
However when I try to do this through Python, it fails without a useful error message, and no new file gets created.
Here is my code:
# Set current panel to Image/UV Editor
area = bpy.context.area
area.type = 'IMAGE_EDITOR'

for i in bpy.data.images:
    area.spaces.active.image = i
    newPath = i.filepath.replace("dds", "png")
    bpy.ops.image.save_as(save_as_render=False, filepath=newPath, relative_path=True)

Which will throw this useless error:
Couldn't save picture.
D:\Path\FileName.png: No error
Error: Could not write image: No error
Traceback (most recent call last):
  File "D:\ProjectPath\TexConvertTest.blend\Text", line 19, in <module>
  File "C:\3D\Blender\blender-2.79-windows64\2.79\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Could not write image: No error

I tried running it with admin priviliges, but no difference. Any other suggestions would be appreciated!

Have you checked if i.filepath contains something useful? RenderResult and other internal images do not have any filepath, which has to be filtered out. Otherwise add a print statement to identify what image it fails on.

Don't use operators unless there is no other way. In this case you're making your life overly complicated with them. This is my proposed approach:
for i in bpy.data.images:
    new_path = i.filepath.replace(".dds", ".png")
    if new_path == i.filepath:
        print('Refusing to overwrite %s (name=%r)' % (i.filepath, i.name))
        continue
    i.save_render(bpy.path.abspath(new_path))

I've also taken the liberty to change a bit more:

Replacing .dds instead of just dds. You don't want to change adds-liquid.dds into apng-liquid.png. For more reliable manipulating of file paths I would recommend pathlib rather than string manipulation.
Using bpy.path.abspath() to convert any blendfile-relative file path to an absolute path. Without this, saving the file won't work reliably.
Added a check to prevent overwriting a non-DDS file.
Applied PEP 8 -- Style Guide for Python Code to your variable names.

Works like a charm, thank you so much! Both for the solution and the great advice.


text:
Why does my glass fishbowl have a gray sphere inside it, even without an object there?

I can clearly see a grey sphere looking thing that doesn't exactly look like a glass bowl. Here's the blender file for the bowl.
I have no idea what is causing this.

I think that is the reflection of itself. See the small white dot in the black area of the bowl (Upper right). There is an opposite white dot in the grey sphere (Lower left).

There's a little more wrong than just the normals.  The table plane intersects the bowl, your light bounces are all set to 128 (which will greatly increase render time), the Transparent shader has a gray color (must be white to actually be transparent), the sun is too bright, and, as is, you're shader nodes will not allow the bowl to cast a shadow (not realistic).

@bertmoog How would I allow the bowl to cast a shadow?

You can add a multiply node to adjust the amount of shadow that's cast.  See this answer: https://blender.stackexchange.com/a/86695/38953

Your faces are flipped inside out. Select all faces and press Ctrl+N, to correct this. Additionally, you have double vertices. Select all vertices in your mesh, and in the toolbox to the left click 'remove doubles'.

You're welcome. So please accept this answer as the correct one to mark this problem as solved.


text:
How to importing all active hosting servers as server list into blender game engine?
Hello I have a simple favor to ask that how can I import all active hosting servers IP address and Port address as a server list into blender game engine like multiplayer fps games like Call of Duty, Halo, Battlefield etc. There is no haste I can wait about till a month or more.
Please It will be a great favor for me for my small game project that I am currently working on. Thank you.

What do you mean by "all active hosting servers". Servers from where?

I expect you would use urllib to get the list from a known server. To find players on the local network use something like this.

I mean if one or more people are hosting from a file such as host.blend, and others wan't to join as client but don't know the IP address or Port address, so they can join a specific IP address.

There is also a video on example youtube of what I'm trying to say:

This is impossible or at least not efficient possible. You need a server where game hosts can register themselves. This enables clients to get the hosts addresses from that server. This is typically combined with a lobby. The clients just need to know the address of the lobby server.

May be you are right, but there is a video on youtube which completely sums up my question: https://www.youtube.com/watch?v=mzLAoTJiz_g    Anyway I can totally understank if it is not possibe.

To name a few, there are numerous, Python network modules out there, for example socket, pickle (and cPickle).


text:
Scaling problems (using drivers or hooks)
I want to do a wooden construction within Blender 2.79. The width of the beams shall be variable (for example using a driver) but identical for all beams.
My problem is that the position of the beams need to change according to the width of the beams.
An example:

The image shows two vertical and two horizontal beams. The x- and y-scale of the beams is controlled via a driver via the x-scale of the selected "Reference" cube.
When increasing the scale of the cube, the beams will intersect as shown in the next screenshot:
Note that the expression for my driver is contained in this screenshot as well.
Again, imagine this is a real wooden construction: the top horizontal beam is too short and too low, the second one is too wide.
I tried to control the Z-position of the horizontal beams with a driver as well, but I needed to include the current Z-position of the beam plus "Scale Factor/2" which is a recursive expression and therefore makes no sense.
I tried to solve this problem with hooks as well, but to no avail.
Any ideas on how to tackle this would be greatly appreciated - if I don't need drivers or hooks: even better!
Thanks in advance
blackno666
The .blend file is here.

I can't entirely understand your goal or your problem.  However, I wonder if setting the origin of the beam to one of its corners rather than its center would help you?  When you do that, the model will end up scaling about the fixed corner, rather than its center.

Scaling the objects is the wrong approach. Use shapekeys and an array modifier. See if the ladder sample here provides enough info for you to figure it out.


text:
Convert simply python script to animation node setup
I created a simple python script which takes the selected object and transforms it in some (partially random) way.
I would love to recreate this behavior with animation nodes but am stuck. Any help would be greatly appreciated.
import bpy
import random

random.seed(12)

for i in range(0,100):
    c = bpy.context.object
    bpy.ops.object.duplicate_move_linked(OBJECT_OT_duplicate={"linked":True, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(c.dimensions[0], 0, c.dimensions[1]),  "constraint_orientation":'LOCAL', "constraint_axis":(True,False,True)})
    bpy.ops.transform.rotate(value=random.random()/2-0.3, axis=(0, 0, 1), constraint_axis=(False, False, True), constraint_orientation='LOCAL')
    bpy.ops.transform.resize(value=(0.98, 0.98, 0.98), constraint_orientation='LOCAL' )

Best regards
blackno666

Have a look at the examples in this video or this one

This is one possible way to set this up in Animation Nodes:

For convenience I control the fixed part of the transformation by using the transformation values of an Empty, similar to an Array Modifier with Object Offset.
The amplitudes for the random parts of the transformation are entered manually. The seed of each Wiggle node should be set to the loop index so that subsequent objects get different wiggle values.

binweg's answer solves the problem perfectly. The only problem that might occur is with adding Euler angles. Flipping might occur which will lead to improper results as shown in the following picture (where no cube but a pentagon was used as base shape):

The problem can be got rid of by using quaternions math instead of Euler math as shown in the following setup:

Unfortunately for the 'Object Transform Input' to work properly with Quaternions, the Transform for the Rotation of the corresponding object (in this case the Empty) must be set to Quaternion (WXYZ) in the properties panel of the 3D View.


text:
Is it possible to create a brushed metal material in the standard blender render?
Is it possible to create a brushed metal material in the standard blender render?
I need to create concentric brushed metal. Something like that https://www.asus.com/Notebooks/ASUS-ZenBook-UX330UA/
I know that this can be done with Cycle, but I am still very uncomfortable with it.
Maybe I might use some kind of imitation or something.
Any help would be greatly appreciated.
This is my first post here, and I apologize if I do something wrong.

I would recommend just using cycles render. It is much nicer. You could probably fake the effect with a texture in the blender render though.

Thank you for your comment! I think that in the end I will move to the Cycles. But till now I have not achieved good results with it. That certainly is my fault. And I just do not have a good texture for it.

There is anisotropy in BI which is what you would need, but Cycles is way better. If you don't have good textures for Cycles, then you don't have good textures for BI either. I would suggest textures.com for high-quality, free textures, or search for pre-made materials. Here is a good tutorial on brushed metal in Cycles.

10 Replies, pycoder, Thank you very much for your help!
I will try to use cycles.
And a special thank you for the useful links. I sorry, I had to create another account to write it.


text:
Bake normal map for different shape keys?
So I've followed the instructions in this video link exactly with my blender character:
https://www.youtube.com/watch?v=ApzVWuPa4A4
The problem is, my normal map isn't showing up on the low poly model. Is it possible that it's not visible because I've already implemented shape keys on the low poly model?
Here's how the low poly model currently looks:

This is the high poly model (notice the added brow wrinkles and smile lines):

I copied my high poly model from the low poly with all of its shapekeys, and sculpted each individual shape key of the high poly model.
Any ideas where I could be going wrong?

Sorry if the answer is obvious. I just started using blender this week.


text:
What is the "Position" input of "Index of Nearest" node?
In Sample Nearest node, I can plug an arbitrary vector or a field of arbitrary vectors. The docs seem to communicate the same thing about the Index of Nearest:

Position
The position for each element to search. By default, this is the same as if the Position Node was connected.

I produced a simple example:

Since for each point, I'm looking for a point nearest to the position $<2, 2, 2>$, I expect to to find the first, index #0, vertex for all vertices but itself, which should find the 2nd nearest vertex, index #1. The viewer should say 1, 0, 0, not 2, 2, 1.
So what is the actual logic behind this socket?

you have to remember that the position it takes into account is only the one you input into the position field, [as apposed to the sample nearest that takes the position field at the context abd the physical position from the sampled geometry], so all the points are sampled here as if they all have the same position (at 2,2,2).

I was worried this might be the case - which is terrible, because I could easily use "set position" to achieve such result. Can you produce an example proving such behavior? How about producing the behavior intended by me - can it be done using this node, as opposed to (I imagine much slower) using a repeat zone?

seem to me that i don't get it. What sense does the input then make at all?

@GordonBrinkmann: did you try to add/multiply something? in my test it did change...nothing

OK to prove I understood my lesson, I'll also write an answer.
Basics
First a simple case just showing how the "nearest index" works in principle: it returns the index of the nearest element, not counting self.
You can see the 1st point, index #0, is on the left; the viewer displays $0$ as black.
The 2nd point (index #1, but it's irrelevant) is in middle and is controlled on the GIF. Only the value evaluated for this point is of interest in this presentation, so you can ignore the colors of other points. For the same reason, the spreadsheet shows only this point.
Finally, the 3rd point, index #2, is on the right; the viewer displays $2$ as white.

For the most part, the result of this experiment is very simple to understand: as the middle point moves to the left, the left point becomes the closer one, and so the middle point reports $0$ (the index of the left point) as the closest index and so becomes black. When the middle point moves to the right, it reports $2$ as the index of the nearest (right) point, and becomes white.
Tie-breaker
However, when the middle point is at an equal distance to both other points, there's no valid answer on which of the two (in this case two; there could be more than 2 ex æquo winners) is closer. Usually the last sorting criterion is index, and so it's reasonable shmuel assumes here also the index is a tie-breaker, but at the same time is surprised the convention doesn't follow in the ascending/descending matter, and in the question the maximum index is picked.
Never assume. This is why I decided to investigate too.
In the GIF above, the point in middle, when it is in perfect middle, becomes black, so it picks the lowest index ($0$). Therefore the tie-breaker is not index.
At the same time we can say the tie-breaker is stable, deterministic, because when the point moves along $y$ axis, remaining at an equal distance to two other points, it remains black instead of blinking, proving the tie-breaker consistency:

I'm too lazy to read the Blender source - perhaps some kind of list of candidates from BVHtree is being processed, and once no more elements can be removed from the list, as all are at an equal distance to the evaluated point - the first element on the list is picked. If you think this could depend on order of sectors of the 3D space, rather than order of the elements, but the below experiment disproves it as well:

The tie-breaker could be something very technical like an ordering based on a hash of each element, so I think it's fair to just call it (deterministic) random…
Radius
Gordon [why did you delete the answer??] introduced various radii in his points, so I just had to test this:

Radii are irrelevant. Points are dimensionless, and radius only affects how a point is displayed, not how close it is considered to be to other points. [Just to be clear: Gordon didn't claim radii are relevant to distance calculation, he used it for a different purpose].
The actual answer
I suspected it, but didn't say so because I didn't want to suggest the answer I didn't want to hear… It doesn't work like "Sample Nearest", that allows a point to override the sampling position (from the default, self position), without affecting self position. Think about it, if you were sampling the same geometry from which you are sampling, and overriding the default "Position" input from current position to anything else, you would move the points rather than say from where you're sampling, and so you would always find yourself. Of course the flaw of this argument is that it's never "the same" geometry, as logically (an implementation may be different but will act as if this statement was true) geometry is passed by value, not reference -  each link makes a copy of geometry.
Here's two equivalent setups:

And so the "Position" input serves as a convenience feature that can save you up to 5 nodes, if you actually need to move those points, need that to be temporary, don't store the position for other reasons etc.
Proof
Here's an expensive way to produce an empty geometry:

For a 1000 tries, a 1000 points with random positions, overridden to other random positions, found the same connection, so I think this proves those setups are equivalent.
The Misconception
This is how I actually thought this works:

You may think: it would be a convenience feature for a similar number of nodes. There is however a crucial difference: in this case, these nodes are run as many times as many points there are. So if you have a completely reasonable number of 10 000 points, the algorithm could be maybe 10 times slower in the first case, but 10 000 faster in the second case. I understand, however, that it wouldn't be easy to implement it this way.

too much. (~15 character to comment)

did you know in blender 4.1 there is a number overlay, so you could have the Index displayed

@shmuel I divided it to sections so you can choose how much to read. Also I need to fix the last node tree, needs position/field switch based on the same "equal" selection

it's alright not too long. very nice . just skimmed it, but looks good. very nicely sized sections. very readable.

it's better than my answers

I'm sorry to say (my bad): I still don't understand the actual aim of your question. I mean what you wanted to achieve using this index of nearest node?

@lemon if you look at this answer: https://blender.stackexchange.com/a/309536/60486 my first approach was to use the index of nearest. Here's the node setup at that moment: https://i.imgur.com/4zmapW0.png - looking at it after seeing the final solution probably makes it seem stupid, but that was my initial prototype: find the nearest point, but not from own position - from own position after subdivision - but not to own position after subdivision, just to own position before subdivision. I also gave another example under Gordon's answer but he removed it for some reason...

@lemon ... the example was: imagine that you want to find the nearest point to e.g. make a connection, that's exactly why you would use "index of nearest". But now imagine you want it to be weighed based on normal - you want the points to prefer points that are "in front" of them. A simple solution would be to adjust sampling position by adding a scaled normal to own position - but then the candidates are also moved, which you don't want...

Markus, ok. For information, this is a KDTree (similar as Python one, with the usage of filter option to eliminate self). If I read well here (not totally sure) https://github.com/blender/blender/blob/6e2624967150dff73f575623552ae923dd185197/source/blender/nodes/geometry/nodes/node_geo_index_of_nearest.cc#L84 it takes positions evaluated from the input field. So... no mystery about providing a constant value.


text:
Geometry Nodes: set sharp or crease attribute for an edge
All pre Blender 3.0 tutorials use Fill Attribute node for setting an attribute like sharp. Many attributes are now set in a different way, for example there's a dedicated node to set smooth shading. However, I couldn't find anything for edge sharpness.
Let's say I want to add a geometry nodes setup for the starting cube:

Which should mark 4 edges of the cube sharp and crease them

Which would allow me to add Subdivision Surface and Split Edges modifiers to get a bullet shape:

I'm actually after something more complex than a bullet shape but still I have no idea how to set named attributes in Blender 3.0...
So what should be inside Set Sharp and Set Crease custom nodes so the setup works?

Crease (Blender 3+)

Defining the Crease output in the modifier stack to be a crease attribute sets the crease. However this doesn't work by defining Sharp as sharp or sharpness attribute…

Also, the crease attribute exists at the beginning, which can be seen in the spreadsheet. sharp doesn't…
The specific situation described in my question could be solved entirely by geonoodles:

Sharp - Blender 4
I'm leaving the old answer for old Blender versions and to present the technique for other properties like this recent question:
Is setting the freestyle edge parameter via geonodes possible?
However currently the "Set Shade Smooth" node supports both "Face" and "Edge" mode, allowing you to dynamically set edge sharpness:

Setting Edge sharpness
This post is a third in the series of:

How do I use an existing modifier to create a bridge between geometry nodes and a property the geonodes setups can't access?

Assign vertex group in Geometry Nodes (v3.3)
How to apply Geometry Nodes with UV maps?
This technique.

This time rather than splitting edges, storing their positions, moving each near a sharp or normal edge, transferring data by positions, restoring positions and merging by distance (where information on split edges would be lost, as it is in the UV technique), I decided to transfer by topology:

Take object named Main, duplicate it as Main.stage.2 (⎇ AltD is fine, Mesh data doesn't need to be duplicated) and disable Main visibility (at least for renders) as it's just a first stage that's not supposed to be visible anymore.

Create a custom group Sharp Mapping, which checks runs through provided edges, and for each either creates a plain simple edge, or imports the sharp edge provided as an object wrapper:

Obviously you need to create the abovementioned sharp edge wrapper: just create a new cube primitive, delete all edges but one, select the remaining edge, right click, Mark Sharp. Name the object Sharp Edge.

Add a new geonodes modifier to Main object to store the edge sharpness information using the Sharp Mapping node. For example, if you want to set all "horizontal" edges sharp:

Remember to link the Sharp Edge object in the geonodes modifier, as well as an attribute name (any available name will work):

Finally, add Data Transfer modifier to the Main.stage.2 object; non-default settings marked yellow:


text:
How to pass 2nd input through a muted node?
I'm improving the node setup from here: Performance ?, which is better, taking a 4k image and splitting it up, or using material with full 4k image and changing the texture coords?
And I thought it would be useful to easily change the default behavior of numbering the tiles in left-to-right, bottom-to-top fashion, to an order more intuitive in 2D world: left-to-right, top-to-bottom, as well as to allow right-to-left too.
My idea to make it as simple as possible is to use Math > Subtract node to flip the value and then mute it, advising that the ordering can be reversed by unmuting the node:

However, the GUI clearly shows it is the static columns value that is passed when the node is muted, while I want this:

I'm aware I could work around this problem by e.g. flipping the inputs, so the input I want to pass through (coming from Modulo) is first, and then add another node: Math > absolute to make the math correct. But ideally this could be done without reducing the readability of the node setup...

Select the node and CtrlG then make sure to flip the 1st and 2nd inputs:

Now the first value passed through is actually the 2nd value in the Math node inside the group:

This doesn't mess with the node layout, but it may confuse the reader on what the node group actually does, and I don't know how it affects performance.


text:
How to reproduce Blender's smooth shading?
Thanks to help of shmuel I made a setup for interpolating a normal in geonodes. Ideally, it would reproduce Blender's smooth shading exactly. So I reproduced the setup in the Shading nodes. In order to access the vertex positions and values, I capture them in geonodes on face domain:

For this to work properly I triangulate first:

Now, the main shading tree is straight-forward, just read the attribute, offload the actual calculations to another tree "Smooth Shading", and use the result:

"Smooth Shading" tree is based on barycentric coordinates:

The "Triangle Area" tree:

This all works very well for most purposes, but isn't perfect, the Mix node is there to easily switch between the two and see the difference:

It's very subtle and not visible when actually used as a normal. And yet there is a difference and it's not some kind of super-subtle difference I got here:

It's more, my approach is a linear interpolation, but here's I think a quadratic interpolation? Which would mean I need to consider also further vertices? Just a guess... You can see it if you pass the normal through Vector Math: Wrap to generate lines. In linear interpolation they are straight, but as seen on the top of the head, the Blender's interpolation smooths the lines:

So what algorithm do you propose to reproduce the smooth shading exactly?

The issue is inside "Smooth shading" node group.
It calculates 3 surfaces from a given point and takes the weighted average of the normals relatively to the whole surface (the sum of the 3).
But this weighted average of 3 normalized vectors is not normalized itself.
Simplified case:
n1 = (1, 0) and n2 = (0, 1)
s1 = 0.5 and s2 = O.5 (s total = 1)
will result in 0.5 * n1 + 0.5 * n2 = (0.5, 0.5) which has not a length of 1.

So much trouble, and you fixed it with one well positioned node :D Great, thanks!

It also explains why I didn't see a difference when testing it as an actual normal in the shader - I thought it's just because it's a subtle difference, but instead it's because the normals are normalized by the shader (or otherwise their magnitude doesn't matter in the calculations).

mmm... in fact, if used as normal, it seems there is still an issue... : ( ... something about back facing

yes... if backfacing, the normal should be inverted.

How so? I'd think if the face is flipped, that is read on the geonodes, so the data is already inverted on the geonodes part storing the data on faces? Is there some problem with interpolation between flipped faces? or maybe the "backface" property simply doubles the flipping and that's why I should detect it and flip again?

face corners are not "doubled" per face depending on front/back facing, or am I wrong? Another way to say that is "back facing is just a point of view... so impossible to know that in gn" (except calculating from the cam, of course).

I forgot the "backfacing" doesn't tell you some kind of an attribute of a face, rather, as you point it, it tells you your "view" - from which side you look at it. So it all makes sense now. Just last addition from me: the normalization has to be applied only in case of interpolating normals. When interpolating something else e.g. color, the custom group "Smooth Shading" works as it should. So you were correct to position the "Normalize" node outside the custom group.

Well in fact, I placed it here just because it was more simple... without taking any other consideration into account. But thanks for the precisions.


text:
IES-like lights in Cycles
I have been consistently trying and failing to recreate the techniques described in the links to create an IES like textured light effect with Cycles Spotlight lamps using a Color Ramp node.
http://blenderartists.org/forum/showthread.php?264052-IES-Like-Lights-in-Cycles-Architectural-Lighting or
http://www.elysiun.com/forum/showthread.php?264052-IES-Like-Lights-in-Cycles-Architectural-Lighting/page2
According to the images you need the Dot Product between the Normal with Incoming connected to a Color Ramp node; however recreating the described node setup does not yield the same desired effect as shown bellow.

Using Add instead of Dot Product seems to show some effect, but it's not the expected result.

Those images seem to be from older versions of Blender, using 2.65 and above I have never been able to achieve that effect.
Did something change internally that broke these techniques, or is there a new workflow to achieve the effect currently?
Did I miss something obvious? Hopefully someone with better math knowledge can solve this.

Dot product is the way. Couldn't be just a matter of setting the handles in a different positions? Without any kind of remap, values tend to be all in one place: maybe you missed them. Here's a screenshot of my testfile: http://imgur.com/8M1c3PR

The problem was not the handle position but your answer made me realize my mistake. What I did wrong was the light type, it must be an areal light, not a spot lamp. Thanks for the help

Note that native IES support is in the works and there is already an addon allowing it.

I knew about the addon, but never actually gave it a try,but with the upcoming patch it will hopefully become obsolete. I've also been following the patch for a while now, looking forward to those improvements as they will come in handy here is the link for the project https://developer.blender.org/D1543 and thanks for the info.

I did miss something obvious, thanks to Carlos comment I solved what was wrong with my scene.
The problem was not with the node setup itself, but with the object data. Light type must be an Area Light, not a Spot Lamp.
Using the correct area light type now yields expected results.


text:
How to Mirror After Starting Sculpt with MultiRes Modifier
I recently ran into the need to retopologize the body mesh of the character below so I could connect the body to the head (I needed to make the edge loops have the same number of vertices). This is where I realized a major problem.

I had been using a multires modifier and I had already begun my sculpt. I figured all I needed to do was delete one half of my mesh and use a mirror modifier across the x-axis so my new topology would be symmetrical.

Upon following this obvious method all was looking great. Besides some splitting between the meshes, it looked like I could apply the mirror modifier.

BUT THEN, I discovered that the mirror modifier does not play well with the multires modifier. And that you can't move the mirror modifier above the multires modifier in the stack. It seemed this mesh without my sculpting detail was unavoidable if I was using a mirror modifier.

Then I tried to mirror the mesh manually in edit mode by duplicating (SHIFT+D) and scaling by -1 on the x-axis. To my dismay, this resulted in all of the normal mapping from my sculpts being inverted. I tried to resolve this for hours.

It finally occurred to me to try to mirror from object mode under the "tools>transform" panel. So I duplicated my original body mesh and tried just that.

PRESTO! I got what I needed, and I won't have to worry about losing sculpting detail because of pesky mirror modifiers! All that is left after this step is to join the "body" and "body.1" meshes and merge any duplicate vertices.

I primarily wanted to post this as a help to others, but also to ask whether there are any easier work-arounds to this issue. If anybody knows an easier way to deal with this problem, your explanation would be greatly appreciated.

I encountered a similar problem when trying to copy an arm to the opposite side of the body, only to have all the detail disappear. I followed your steps and got perfect results. I wish mirroring it wasn't so complicated!

@EmeraldEelEntertainment Glad this helped you out!

just found an even better method without cutted out end result, no need for duplicate or mirroring, just use the same stuff that produces the main asymmetrical problem while using multires, yes its the SYMMETRIZE method, it is hidden in edit mode->mesh menu, just gotta click & chose which side way to symmetrize and boom! clean result. work in any base multires mesh density.

This is a great tip

Symmetrize (or mirror) only works if the mesh is clean, if you have shape keys or an armature with vertex groups associated with it here's the procedure for these cases

in edit mode, Create a vertex group and assign to 1.0 the vertices that lay on the center of the object
in object mode, Create a dummy shapekey
in edit mode, Symmetrize (or mirror) the mesh, use -x to +x, or +x to -x
Now select the vertices in the center with 0)
Go to select -> select loops -> select inner-loop region, make sure you are selecting the generated mesh by ticking or not ticking "Select Bigger"
Separate mesh
in object mode, select generated mesh, scale by -1 and apply scale.
(for rigged objects), copy this script https://gist.github.com/iszotic/e85d3c0cbd36186ea01dccb94a715a68 in a text editor, register, and execute with Ctrl+P, this will flip the name of the bones from .L to .R and vice-versa
Now merge the separated and the original object, then delete the dummy shapekey
in edit mode, select the central vertices with the vertex group made in 0), now merge by distance

IF you only have a rigged object, don't make the dummy shapekey at all
IF you also have the model UV wrapped go to edit mode, open a UV editor panel, select all the mesh in the UV panel, go to UV -> mirror -> Copy Mirrored UV coords, select negative or positive accordingly. Do this step if you have asymmetrical textures.

This may be out of date, but quick tip - if you mirror a mesh by scaling -1, you can then reverse the normals via 'recalculate outside' or 'flip normals'
see:
https://docs.blender.org/manual/en/latest/modeling/meshes/editing/mesh/normals.html#recalculate
https://docs.blender.org/manual/en/latest/modeling/meshes/editing/mesh/normals.html#flip
You may also be able to work around this by changing the order of the modifiers in the stack.


text:
Normal Map Baking: Does Low-Poly Mesh need to have larger volume than High-Poly?
This is my first character design and I'm afraid I was overly ambitious and made a mess of my vertices. I would really like to avoid starting from scratch, but I'm having troubles baking a high-poly spiky hair model onto a lower poly version (with less spikes).
Do I need to make sure that I have the same number of spikes in my low poly hair model and that the volume of the low-poly spikes encloses the volume of the high-poly spikes? Here's an image of what I'm working with for reference:

It is a bit difficult to tell what is going on from your screenshot, however, the basic answer to your question is yes - your low poly mesh needs to enclose your high poly mesh.
Your low poly mesh needs to follow all the major shapes and features of your high poly mesh. Think of it like wrapping your high poly mesh in wrapping paper. You can't have big spikes sticking out of your wrapping paper.
The purpose of baking a high poly mesh to a low poly mesh is:

To get better topology (your low poly mesh can be created with good edge flow); and
To bake all the very fine surface detail into a normal map so that its appearance is then created by normal mapping, and not actual geometry.

The trick is therefore to have your low poly mesh follow all the major shapes and features of the mesh, while ignoring the very fine detail (as this will be baked to a normal map). Sometimes that is a bit of a judgement call, but if you keep coming back to the wrapping paper analogy (what would you wrap around with wrapping paper, and what would you just paper over), it should be OK.

Thanks so much! That's a great description! I actually made another post with better screenshots and my .blend file attached and thought I had deleted this one, but I'm happy I got your answer here!

One more thing: So if I have several thin tall spikes in his hair, should it be okay to enclose them in one large spike on a low poly mesh?

Probably not to be honest. If they were sufficiently close and on top of each other that they basically made one spike with a bumpy surface than yeah, but if they are separate spikes they need covering separately. Perhaps consider if you actually need to bake here..


text:
Shapekeys before or after normal mapping?
Does anyone know of a good resource to learn how to create a low poly version of my character, create normal maps, and apply them to the low poly mesh?
I'm specifically confused about whether I should be making shapekeys for the high-poly mesh for facial expressions before creating a normal map. Would I just need to make one normal map and that would cover all the shapekeys? Or would I need to create a normal map for each face shape?
I also have yet to successfully transfer a normal map despite following some YouTube tutorials, so I want to make sure I get this right.
Thanks.

First of all, is your character using a Mirror Modifier to generate symmetry? If it is, you should apply it first before doing your UV mapping, texturing, rigging, and shape-keying. (Symmetrical UV maps are OK in some special cases, but definitely avoid them if you will need to use a Normal Map.)
As for creating a low-poly mesh from your high-poly one, check this technique out. It might seem a bit confusing if you're just starting out, but understanding it can save you a lot of time when creating your low-poly meshes.
Your Normal Map will not change with the Shape Keys, nor should it need to unless you're trying to do something overly complex.
Use the high-poly mesh to bake your maps onto the low-poly mesh. Keep both handy, and only delete your high-poly sculpt once you're done baking textures. Keep a version of your project saved that still contains your final sculpt in case you need to re-bake later.

Thanks for the detailed guidelines and linking me to that awesome shrinkwrapping post! I'll definitely check it out! I was about to start using reoptoflow, but this method looks like a huge help.
I'm not using a mirror modifier. The character is slightly asymmetric. I generated it using makehuman. So I suppose that's a good thing based on your answer.
One followup question: If I need one normal map, do you know if there is a way to bake it from a specific shape key I've made on my high-poly mesh? My basis key doesn't have the facial wrinkles I want.
Thanks!

When you bake a normal map Blender ignores Shape Keys. There is a way to get around this though. It's a destructive edit, so save your project first. You can move your key above the "Basis" key in the stack, then delete "Basis". This then becomes your mesh's only shape, and therefore you can bake it! Do not save your file after doing this or you'll be stuck with that deformation. Note that if you have multiple Shape Keys creating the facial expression you'll first need to combine them using "New Shape From Mix" - this option can be found by clicking the triangle button below the +/- buttons.

I should clarify: When you bake a normal map Blender ignores Shape Keys IF you are doing Bake From Multires (baking using one mesh). It does take Shape Keys into account if you are doing Selected to Active (baking from one mesh to another). That is to say, the deformations of your hi-poly mesh's keys will have an effect on your lo-poly mesh's baked texture. And it works the other way around too, if you have Shape Key deformations on your lo-poly mesh.

This was extremely helpful! Thank you, I was able to get everything baked exactly how I needed!

Great! I'm glad to hear it helped.


text:
imported .obj shows too small
Yesterday it was working fine and today it is not
I imported my obj file and it is not showing up or it is too small I guess but I can see it on outliner.

Did you try to scale it..?

nothing happen when I scale it still small

There is nothing apart the origin of the object in the imported file (you can see by the total number of vertices of the scene: 0 verts, 0 edges, 0 faces). Did you try to open the file with another app? Are you sure it was coorctly exported?

It could also be way to big, try hitting the . key on the number pad and see where it takes you, if it's to big, scale it down. It also helps to set the origin to "centre of mass" or "geometry" and resetting its location with alt+g.

Thanks but it is way to small . key take me zoom in to the orange dot.

Your question provides very little information, so it's just guesswork here. I assume you exported your OBJ again. Check your export settings, especially the unit setting in your export programm. Try setting blender to the same unit used as in your export (under 'scene properties').


text:
How to use mirror but affect different sides differently?
I want to make a car model but I want to be able to make the model with the mirroring way but I also want to be able to select the different sides of the model individual. For example I want to make a hole in the left door without having the same hole in the right door.

then at some point (after you have built enough of your car) apply the mirror modifier, and make the asymmetrical changes.

Related: https://blender.stackexchange.com/questions/30356/excluding-part-of-the-mesh-from-mirror-modifier

It will be difficult in this way, you may make it simple in following ways;
First work for the model in all aspect in which both sides are same - using mirror
When you satisfied with your model apply the mirror.
Secondly, Now you are able to select any side as per your need and change any side individually


text:
Code takes more time to run the more complex the scene gets
I have a script that parses a text file and creates the objects specified. The object creation should theoretically be O(1).
This method is the only thing other than an if quick unrelated if statement to set a Boolean and there's an increment of an int after that I included in my timing bounds.
def createAtom(aType,location):
    bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4,size=atomProps[aType]['size']/100.0,location=location)
    ob = bpy.context.object
    for polygon in ob.data.polygons:
        polygon.use_smooth = True
    if len(aType): ob.active_material = atomProps[aType]['material']
    ob.parent = empty
    ob.name = str(currAtom)

as you can see, it doesn't iterate over anything except for setting smooth shading, and with that loop commented out it still increases pretty drastically over time.
The anomaly with the bond times is that sometimes there are double bonds, so it takes twice as long.

Related  Only need to create icosphere once (or never) with an operator.

Interesting. So you're suggesting I create one icosphere of each type I need and just copy it? I'll look into it, thanks.

This is a common issue related to unique name lookup.
When an object is added to scene, blender ensure the name is unique.
So the more objects you add, the more time each one require for the name lookup.

That's what I was thinking it was. Do you have a solution around it to complement your very useful (not sarcastic) information.

Given you need separate objects, i'm not aware of any simple solution for this, the hard way require modify the current name lookup implementation -probably a scan through a list -.
On the other hand, if you dont need the separate objects, grouping data on a single mesh could be a workaround.

As a side note, C code for it is allready in blender, but not used by default. Seek for  IDNameLib_Map in sources.

Yeah, the basic concept of the program is that you give it an input file and output specs (resolution and whatnot) and it generates atoms and their bonds. That means creating each bond and atom separately, and it should be deployable since I'm trying to get my code out there for future employers and stuff.

It can run faster if you generate your own vertex and color data outside of Blender, using a documented filetype, such as wavefront .obj  -  I figured that filetype out easily by looking at a few exported LeoCAD files, but Wiki has decent info on it as well.


text:
bpy.ops.object.scale_clear(clear_delta=false) (the alt-s command in 3d view) lowers ram usage?
One of my projects has a script that creates thousands of objects every time it runs and even though it deleted the old objects there's still a ram build-up over time. For example, just now it hit 24gb (out of my 32). I found a trick a while back where if I run the alt-s command repeatedly eventually the program will freeze for a minute then drop my ram. It dropped from 24 to 6 gb with no apparent consequences since I create objects by dimension not scale. Does anyone know why this is the case? Is there a better way to delete objects than just the delete() method?


text:
Why does my rendered movie clip have no audio?
I am a Blender newbie, and know that I will have to supply additional info...Please be patient with me :-)
I followed this video by Oliver Villar, https://www.youtube.com/watch?v=nU8zqn091rM. I am using a 54 second video shot with a phone. The rendered AVI video has no audio.
I used a single tracker, placed on the cross on the green parament, to do the 2D stabilization.
The original video is here: https://vimeo.com/229907878
The stabilized video is here: https://vimeo.com/229907728
Here is a screenshot of how my compositor is set up:

Let me know of anything else I can provide. And, thanks so much for the help!

Have you selected a audio codec before rendering ?
By default it's on "none"
(Properties panel -> render -> encoding)

I have tried both MP3 and AAC

So you can manually add the audio of your video in the Video Sequence Editor. Add your scene (Add -> scene) and then add the sound by choosing your video clip (Add -> sound). It work for me.

Very late to the party, but I just had this problem and solved it:
At least in Blender 2.9+ it could be because you have to tick both "Compositor" and "Sequencer" in the Output Properties tab. This is because the Audio is loaded in the sequencer but the actual stabilisation happens in the Compositor via Nodes.


text:
Constant problems when reinstalling addon 4.2
So I've been developing addons for my workplace for over 2 years in blender 3.5 and previous versions. Now we are planing an update to 4.2 LTS and I'm updating and creating new ones and I am just unable to make them work.
Previously we would install python libraries by pip and just call them from the addons. I'm aware that now yoiu have to package them in '.\wheels' and list them in the 'blender_,manifest.toml'.
First time I installed the addon, everything was fine. After updating some minor stuff (panel distribution) I can't reinstall it, it just wont work. I'm constanly getting library errors and permissions errors. The worst thing is that every now and then I will go and manually erase everything the addon installed and it will work and other times it wont. I am really losing my mind because the behavior is not consistant at all.
Here is an example of type of error I get.
Error: Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\_bpy_internal\extensions\wheel_manager.py", line 428, in apply_action
    _zipfile_extractall_safe(zip_fh, local_dir_site_packages, local_dir)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\_bpy_internal\extensions\wheel_manager.py", line 222, in _zipfile_extractall_safe
    zip_fh.extract(member, path_restrict)
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\Lib\zipfile.py", line 1664, in extract
    return self._extract_member(member, path, pwd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\python\Lib\zipfile.py", line 1735, in _extract_member
    open(targetpath, "wb") as target:
    ^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Antonio GG\\AppData\\Roaming\\Blender Foundation\\Blender\\4.2\\extensions\\.local\\lib\\python3.11\\site-packages\\pyproj\\database.cp311-win_amd64.pyd'

It's bad enough that I have to zip the addon everytime I want to test something but not been able to install it after the first time is just frustating.
Does anyone gave any clue of what's happeing?
TL;DR: Self developed addons will only install the first time and crash when reinstalling.

I would recommend using the VSCode extensions for developing Blender add-ons (recently updated for the new 4.2 way of working).
If you are using that extension and VSCode, every time you change something and save the file it will update the add-on inside of Blender without having to reload Blender or re-zip anything.
I definitely have more of a hard time making add-ons on windows because of issues with permissions, and sometimes just running Blender as administrator helps (so that Blender can successfully move / remove / create files when needed).


text:
one unwrapped item for multiple textures/items

I unwrapped all the needed parts of my couch, but I can take a shortcut if the three pillows have the same texture coordinates as the first one I unwrapped, as you can see in the UV image editor (its outlined blue).
I want the same for the feet of the couch outlined green. How do I do connect the other items with the one that is already unwrapped?
I will probably texture in Photoshop, not in Blender, not sure if this relevant.

Easiest (and most resource optimal way) is to use instances. Just unwrap one pillow/foot/whatever, separate it from the main couch object and clone it in object mode. If you want it in one single object just copy the unwrapped pillow over the others with snapping, and delete the ones without texture coordinates.

Ok sounds fast. So after the one pillow i unwrapped, i can just copy that one in the 3D window and replace the other two? I copied them the same way before i unwrapped it. So doing it just after unwrapping should do the trick?

Yep, that's right. Either copy it directly in edit mode if you want a single object, or separate it into a new object and clone it, if you don't mind separate clone objects

authors: Алексей Пеньков


text:
Using array and mirror for modeling
Hi Blenderstack commun:)
Trying to create a certain pattern using Array modifier Mirror modifier and
like maybe a shrink wrap? I think?...
I'm trying to recreate the handle wrap without having to like sculpt it by hand:)

Wouldn't it be more simple to find a material of it? I don't think this pattern is that unique to find a similar one.

I already looked all over the internet for one!

You first need to find the pattern, use a plane, rotate it 45°, squeeze it to make a lozenge, duplicate and mirror it on the X axis.

Then subdivide, extrude and begin to move the edges so that the array copies will fit. Give it a first Array modifier on the X axis, then a second Array on the Z axis. To make it turn around give it a Simple Deform modifier / Bend mode. Also give it a Subdivision Surface modifier. You can still modify the original mesh to give any correction. If the pattern is not supposed to rotate around a cylinder but around another shape, just give your object a Curve modifier with the good curve shape instead of a Simple Deform.

thank you so much! this is it!


text:
obj.rayCast() not working as intended
In the game engine, I've got a function which uses rayCast in asteroids. It doesn't work as intended, as even with x-ray turned on, it often doesn't see through objects without the desired property:
def shoot(self):
    for n in self.cont.triggers:
        if n > -0.5:
            if self.ammo == self.maxAmmo:
                self.c.actuators["ShootSound"].stopSound()
                self.c.actuators["ShootSound"].startSound()
                self.laser = self.fxScene.addObject("laserbeam", None, 10)
                self.laser.worldPosition = self.pos
                self.laser.orientation = self.ang.to_track_quat("Y", "Z")
                self.ammo = 0
                target = self.obj.worldPosition + self.obj.worldOrientation * mathutils.Vector([0, 1, 0])
                hitObj = self.obj.rayCast(target, self.obj, 300.0, "asteroid", 1, 0)[0]
                if hitObj is not None:
                    hitObj["pyObj"].smash()
                exp = explosion(0.2, self.obj.worldPosition, self.fxScene)
                self.scene["explosions"].append(exp)

The problem is that often, even when cast through objects, it returns None. This happens more often when explosions get in the way of the rayCast (despite not having the property), so I moved them to another background scene to test. It's now more reliable, but still often returns None when it shouldn't.
Any ideas as to what's going on? I'd be eternally grateful.

If I understand you right you assume x-ray is turned on. As is now your call to rayCast() has x-ray flag turned off (6th argument) -> rayCast(target, self.obj, 300.0, "asteroid", 1, 0)

Thank you very much, turns out I'm an idiot and miscounted the argument number.

As is standard for my dyslexia, I misread the number of arguments. Don't make my mistake, kids. X-Ray was actually turned off.


text:
Blender Logic Source
I've been working on my own python library to assist in usage of UPBGE (importable player setups, auto-split screen, handling input in a more natural way, some procedurally generated objects etc), but to optimise it so things only update once per tick, I have ended up requiring a tick counter.
So far, I've been using an always sensor connected to a script that adds "bge.logic.tick_no" to the mix, so you can access it from anywhere else easily. I know it should be using "bge.logic.globalDict" instead of going straight to bge.logic, but I wanted it to feel like it was part of the engine as opposed to something strapped onto the side of it.
I was wondering if there was a way for me to edit the source code to have blender just add a tick to the overall tick number each time it ticks. I know C++, but cannot really make sense of what does what, or where it should go in the source code of UPBGE, even with the help of the documentation. No clue where anything running in the mainloop would be.
Any chance someone could provide some pointers?

Without using a script, you can create a tick count property and use the property actuator to increment it each frame. With the always sensor you can set the frequency (now called skip) to trigger the update every frame, or two frames...

If you place that in a common object that is always in the game, such as the ground, when you want to know the tick count in a script you can get the ground object from the scene.
scn = bge.logic.getCurrentScene()
grnd = scn['ground']
tick_count = grnd['ticker']

For forking your own version of blender, you will find the main loop at the bottom of wm.c. You can add a property to the GameData struct in DNA_scene_types.h, then add it in rna_scene.c to access it via python. Note that changes to any structs need to maintain a multiple of eight bytes in length for alignment, builds will fail if you don't get it right, and moving any existing properties will break reading blend files. It has been a while since I looked at this so I may be missing a change needed, start here for info about changing the data structures.

Sambler, thanks for the reply, but I understand the ticker method already. The purpose wasn't to find out how to add a ticker into my own game, but for a user of my library to automatically be able to get the tick count without needing to set anything up. I messaged the developer of the UPBGE and they pointed me to where I may edit the source code and add my own ticker. It seems simple enough, and when I change it, I'll post what I did here.
For the interim, I have a LibLoad() that automatically imports a ticker object and works with my library.

Sorry, ran out of characters. It works since when you try to access the elapsed ticks, there is a property getter which checks to see that the ticker object is still there, and if not, it re-spawns it.


text:
Is there a way to ignore subdivided areas in a particle system?

I subdivided a part of my model to sculpt there.
I control the hair density with a texture painted texture.
The texture is just black and white.
Is there a way to make the density of the particle system uniform ?
In my understanding it shouldn`t have more hair in subdivided areas.
It should just put no hair on black and hair on white uniformly.

What are your particle settings, could you show us? They are important to diagnose particle related issues. Do you have the Use modifier stack option enabled? What about Even DIstribution?

i dont like weight paint cause it always requires a high vertex count to be as accurate as i often need it to be. With all ive done particle-wise i had much better results with texture paint.

Try this settings:

Click Advanced to get extra settings
Click Even Distribution
Switch from Jittered to Random

Default settings:

Same geometry, but with this settings:

this worked flawlessly. Thank you for such a simple solution


text:
Where is Sapling Tree in 2.79?
I work on 2.79 full release version. I have the sapling tree add-on activated.
All tutorials i can find show the addon under Add>Curve>add tree.
Its not there :(

You trying to find it within the shift+A menu in object mode? Or do you search for it in the create panel in the tool shelf?

It is under Sapling Tree Gen now

im just blind apparently. thats all