- User Since
- Jan 28 2017, 8:06 AM (133 w, 5 d)
As @Charlie Jolly (charlie) noted, the mapping node rotation doesn't match the texture mapping rotation for some reason. Our Euler to matrix conversion follow the same order XYZ, and the functions are implemented based on the matrix from the wikipedia page on the topic, that is:
Not sure where the problem is, are the BLI eul_to_mat functions implemented wrongfully?
A file to test backward compatibility:
- Add versioning code to mapping node.
- Use hash_uint2 instead of hash_uint in Cycles code.
@Brecht Van Lommel (brecht) Ok, I will create a patch for those. But I need a bit more details, in particular:
- Shouldn't we normalize the input vectors in the Average operator if we want to compute the "Average Normal"? Or is it meant to be a weighted average of some sort?
- The Cross Product wasn't removed, are you talking about the fact that it is no longer normalized? I just thought that it makes sense not to normalize the output, the cross product operator should just do a cross product, nothing more.
- The problem is that the output value is used by more than one operator. I wounder if we can dynamically rename sockets somehow. Would that mess something up?
- Fix typo.
- Add tool tips.
Tue, Aug 20
@Brecht Van Lommel (brecht) I will fix those regression tests in a separate patch as they are related to the Math node.
- Clean Up: Follow code style.
Mon, Aug 19
- Refactor reflect function.
- Refactor the safe_divide_float3_float function.
A file to test versioning code:
- Add custom loop macros to the clang format dot file.
Sun, Aug 18
Sat, Aug 17
- Fix misnamed enum.
- Bump subversion.
- Revert more renamming.
- Revert socket renamming and removal of the clamp option.
Fri, Aug 16
@Brecht Van Lommel (brecht) Just to make sure. Do you object to using A and B in the code base everywhere or are you talking about sockets only? In other words, can I use A and B internally in the Cycles /OSL/GLSL code?
@Brecht Van Lommel (brecht) Regarding the removal of the clamp option, let me explain my reasoning.
@Brecht Van Lommel (brecht) I also changed the socket names to A and B in the Vector Math node, and could do the same for the Mix RGB node. Sorry if I am wasting your time, but let me explain the reasoning behind this change:
- The identifiers of the sockets will be unique by default. This has many advantages:
- In C code, we can get sockets more readily by their unique identifiers using something like nodeFindSocket(node, SOCK_IN, "B"). If you look at the patch, you will see that this makes the code much more readable than before. Before we had to index the socket blindly in the listbase.
- Socket names will be the same for Blender and Cycles. Before, Cycles used the names Value1 and Value2. Had we used A and B, the socket names would be consistent and the functions calls to get the sockets would be similar nodeFindSocket(node, SOCK_IN, "B") -> input("B").
- The python path to a specific socket becomes more readable and easier to write. To me, inputs["B"] is better than inputs["Value_001"] or inputs.
- You get the point, other areas of the code benefit from the distinction.
- Tool tips become clearer.
- Node labels can be more expressive, especially when the node is hidden. I plan to implement a better label function in a separate patch.
- Animation Nodes uses this same naming convention and has a better label function. So this convention was tried by a lot of users already.
Wed, Aug 14
The following file includes a node tree with math nodes in different settings. This blend file was created before this patch so that it can be used to test backward compatibility.
- Cycles: Fix tests.
- Cycles Versioning: Update link iterator.
@Brecht Van Lommel (brecht) Sorry, I didn't realize tests had to be enabled. Will fix that now.
I wounder if we can implement this using graph expansion. It would expand to two nodes I think, a Vector Math node and a Mapping node. I used expansion before and it was very nice and easy to use. Maybe you should give it a try. Check the following commit for reference rB7a7eadaf.
Other minor remarks.
I think you should take care of those remarks first.
Tue, Aug 13
@Brecht Van Lommel (brecht) It is an additional node. A Clamp node has always been in my proposal and was already created months ago in the GSoC branch.
- Use standard naming convention.
Sat, Aug 10
Sun, Aug 4
Sun, Jul 28
Jul 19 2019
Jul 17 2019
Jul 16 2019
Jun 22 2019
- Add a utilitie function is_visible_socket
@Jacques Lucke (JacquesLucke) Sorry, never mind, will do that.