Notifications
Clear all

[Closed] Deformed Offset mesh

I have 3 meshes:
Base : box
Offset : taller box
and Deformed Base : deformed box
I would like to create “Deformed Offset mesh” (taller deformed box)

Please could someone explain to me how should I do it?
Now I am on

Deformed Base vertex  + (Offset vertex - Base vertex)

And it is good only for transleted not rotated or deformed meshes.
So one again please.

13 Replies

it’s very hard for me to understand what you want to do…
please give a better explanation
maybe some picture can help too.

btw… in your list of favorite tools there is the BLENDER two times. Do you love it two times much than others?

I would like to create something like skinwrap in genome . Iam asking for math becouse I am soooo lost in 3d math, vectors, matrixes and so on. I found that U was answering something like this inthis treadbut I do not understand Your answer ( so may be I should let it be.).
And thanks U for notice about my signature I missed that completely. Or something like thart.

you have to apply vertex offsets in local space.
play with this snippet (by un-commenting commented for example), and try to understand how it works:


delete objects
t0 = box name:"target0" width:10 length:10 height:10 pos:[0,0,15] wirecolor:green
t1 = box name:"target1" width:10 length:10 height:10 pos:[0,0,15] isFrozen:on xray:on wirecolor:(green*0.6)
s0 = box name:"source0" width:10 length:10 height:10 pos:[0,0,0] wirecolor:red

converttomesh objects
seed 0
offset = [2,2,2]
--meshop.movevert t0 #all (for k=1 to 8 collect (random -offset offset))
update t0
meshop.movevert t1 #all (for k=1 to 8 collect (random -offset offset))
update t1
--meshop.movevert s0 #all (for k=1 to 8 collect (random -offset offset))
update s0
	
rot = quat 1
--rot = (eulerangles 35 40 70)
rotate s0 rot

s1 = box name:"source1" width:10 length:10 height:10 pos:[0,0,0] isFrozen:on xray:on wirecolor:(red*0.6)
converttomesh s1
rotate s1 rot
	
for k=1 to 8 do
(
	p0 = (getvert t0 k)*(inverse t0.objecttransform)
	p1 = (getvert t1 k)*(inverse t1.objecttransform)
	
	d0 = (getvert s0 k)*(inverse s0.objecttransform)
	d1 = d0 + (p1 - p0)
	setvert s1 k (d1*s1.objecttransform)
)
update s1

you might guess that:


 (getvert t0 k)*(inverse t0.objecttransform)
 

is the same as:


 getvert t0.mesh k

Thank U veeeery much .:bowdown:

Sorry once again me.
It works but in this video (45 sec) when I rotate whole mesh there are some problems. On 90 degrees It looks like lag on 180 it is flipped (what was inside is out). Please is there any other way to approach this problem. (Something with point position vertex normal?)

your problem was solved by my last post.

(Something with point position vertex normal?)

do you see any other way to solve the issue? go… we are always opened to get.

U are right (U allways are). But if I may say:” The Japanese had already forgotten more neurosurgery than the Chinese had ever known“. So even if U are answering very clear I can not understand it.(basicly I am dum. Not proud of it but it is truth)
Mesh is still flipping insideout. In thread mentioned before guy is storing offset relative to each target point using point and its normal. Could someone please point me to some tutorials or something where I could learn more about transfrom matrixes? Idealy would be somthing for preschool age :). As allways i do not undersstand what I am doing so I should let it be. Even then have a nice day all.

it sounds like you want to get a vertex offset along its normal. that’s a different story, and in your previous posts you said nothing about this idea.
if you read this forum (because i explained it many times there) you have to know that the vertex normal is a delicate matter. what the normal does mean for you?

Page 1 / 2