UV Mapping to loaded object doesn't work

Hello, everyone! I am in the beginning of Dinamo way. Maybe someone has met such a problem. I upload to the Dynamo file another object, created earlier as Custom Node. I’m trying to multiply it along a grid of points and apply uv mapping, but it doesn’t work. I tryed to connect and multiply pyramid to points mesh and after to reflect it onto target surface. How to solve it? !

Try pulling a coordinate system from each surface you want to apply the geometry to with this node: https://dictionary.dynamobim.com/#/Geometry/Surface/Action/CoordinateSystemAtParameter

And then apply that transform to your original geometry with this node: https://dictionary.dynamobim.com/#/Geometry/Geometry/Action/Transform(geometry_Geometry-cs_CoordinateSystem)

I tried to do it this way, but the pyramids do not spread correctly. I tried to change the coordinate system in the source file of Custom Node, made it in the center and in the corners of the base, but the result is still not correct.

Looks like your pyramid is a list of surfaces instead of one solid or polysurface. Edit your custom node to create a single object as a start.

Better yet, deconstruct said node to its core parts, place those in the graph, and post your dyn and a sketch showing what you want (not a screenshot of Dynamo indicating ‘this to there’, but a sketch showing the intended result).

Thanks for the advice! I partially managed, but I can’t set UV coordinates for the grid from the coordinate systems and transfer them to a bend surface. Is it possible for Custom Node to transform according to UV coordinates? I am attaching a sketch and a failed result.

Unfortunately, I can’t upload the dy

n file.

Rectangle_11_send.dyn (101.0 KB)

Hello! I was able to upload my Dynamo file to the forum. Can anyone help - how to correctly position the pyramids on a curved surface? This is not my working file - I am trying to understand the general approach to volume texturing of the surface.

Hi Igor,
First: I’m not promising anything here. Writing Dynamo scripts is like writing code, and code can become complex very quickly. Asking someone else to find a bug in your code is asking a lot.
Nevertheless, I can have a look. Can you please also provide the SAT file, which you are using in your script?

I understand this, and in any case, I am already grateful, because this forum has allowed me to move forward in the study of Dynamo.Rectangle_4.sat (5.8 KB)

Hi Igor,
Let’s do this step by step. First bug: you have a 10x10 grid, so you want to create 100 Pyramids. But on your base surface, you already create 400. See image and attached .dyn file. The pyramid should only have one base transformation per one of the 100 tiles, not one per base corner point (=4, which is 3 more than you want).

Rectangle_11_send-GG.dyn (104.2 KB)

Hi Igor,
I was thinking about this one a bit more. I was wondering if a different approach to it would be easier. What about the following approach: instead of first building the pyramid, and then trying to transform all of those (which would require 3D scaling, right?), why don’t you build your pyramids directly on the curved surface? So what I would do:
Create a grid of center points on your (curved) target surface. With these points:

  1. For each one, create the corresponding 4 pyramid base points, by moving accordingly into U and V.
  2. Moving the center point up in normal direction.
  3. Then connect each of the four base points with the moved up center point, to create the pyramids.

What do you think?
If there is no design intend reason which would prevent this approach from working, I’d be happy to share a “proof of concept” script with you on this one.

Hi, Michael

. Thank you very much for the errors indicated. I’m trying to fix it - the result is better, the pyramids are already ordered relative to the surface, but still do not lie on it. With great pleasure I will accept your proposal for the construction of this figure.

Rectangle_15send.dyn (102.6 KB)

I tried the second method - building directly on a curved surface. The problem is that the rectangles are regular in shape and intersect with each other. This means that I have to build each rectangle on the surface at the corner points and spread it over the entire surface. I have not yet figured out how to do this.

Hi Igor,
This is exactly what I was expecting, and why I was suggesting the different approach.
I don’t have much time, therefore here only a rough version of my idea as a script. You can move the UV point on the surface, and you will see, that the pyramid moves with it (I only created the 5 base points, and one triangle of curves, you should be able to complete the rest).
You can complete my script by creating all sides of the pyramid, and the surfaces out of the curves. You might want to use “pull to surface” on the curves on the bottom, if you want them to be on the surface.
Once you have finished that, you can create all pyramids by the same pattern. Does that work for you?
Pyramid.wire (83.3 KB) Pyramid.dyn (65.1 KB)

Rectangle_18send.dyn (140.4 KB)

See my script. Create the base points (grid) of each pyramid. From there, compute the relative U and V values of the 4 corner points. Build a 5th point by moving it up in local normal direction. Then connect those points to pyramids.
Let me know if you should have questions about this approach.

Might I suggest an isocurve here instead?