Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Subdivide an object

Author
Message
lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 30th Sep 2006 19:18 Edited at: 30th Sep 2006 19:19
DBP
This function takes an object and subdivides it, turning each triangle into 4 smaller triangles. UV data is also transfered to the new object.

lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 30th Sep 2006 23:44 Edited at: 30th Sep 2006 23:57
Spherify objects using this new function, Spherify(dest_obj,src_obj,k#)
k# is the spherify amount:
Spherify(dest_obj,src_obj,0) will do no spherification.
Spherify(dest_obj,src_obj,1) will make each vertex equally distant from the center of the object (like a sphere)
Spherify(dest_obj,src_obj,0.5) will do a partial spherification.
Spherify(dest_obj,src_obj,-0.5) will unspherify the object, that is, the points closer to the center will get closer, the corners of the object will get spikier, the bumps will be exagerated, etc.

Hold shift to watch the transformation. Use up/down keys to change the k amount for the spherify function.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 30th Sep 2006 23:48
Wow amazing stuff here! I like the sphereify thing, it looks like it smoothes objects out

Ummm...
Baiame
18
Years of Service
User Offline
Joined: 8th May 2006
Location:
Posted: 1st Oct 2006 10:37 Edited at: 1st Oct 2006 10:37
Awesome, and surprisingly fast.
Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 1st Oct 2006 23:27 Edited at: 1st Oct 2006 23:29
You just keep making such amazing code dont you Lower Logic.

Its an extremely cool piece of code!

Kyhoshi
18
Years of Service
User Offline
Joined: 21st Jun 2006
Location: Somewhere over the rainbow.
Posted: 3rd Dec 2006 11:03
dude, sweet this is a really nice code. this thing would be really good in a vertex editor

(\__/)
(O.o )
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!

Login to post a reply

Server time is: 2024-11-23 03:18:20
Your offset time is: 2024-11-23 03:18:20