Hi
I am working on my submission for the kinetic rush challange but get a little problem.
I added some destructible pillars created with cell fracture in Blender but becuse i use object texture coordinate to accurately generate the PBR on the meshes. Also i want to add some descrtion to the bridge and on the bridge is it more visible.
The problem is, that the fractures are making a new origin what destroys accuracy but i cant change the origin, becuse it need to be in center of the fractures and act as anchor point if i remember correctly. How can i change the nodes, that the texture coordinate is by the object but ignores the position of any origin?
The problem with the fractures is that even if you change the origin reference to something else, the texture will slide when your fractured parts move out of place…
So your best option is to bake the textures (and you can use an empty as the origin of all parts)… or, manually add the transformation from the fractured parts’ origin to root object’s origin (using the Mapping node with the object coords).
as long i no adding a object in the object bar of the texture coordinate, the texture will not slide. And i wanted to avoid baking the textures or do UVs, becuse that means i need to fracture all again and delete all the baked stuff.
It must be possible to solve this with nodes, I thought everything was possible with nodes?
Sure… but then your reference origin is binded to each fracture shard, which is not what you want.
And if baking isn’t an option, then python is… And this is how it goes:
You need to store the original relative position of the root object in each shard, as an Object Custom property.
Then you use that property with the help of the Attribute node to move the shard’s origin in the material.
Having all shards selected and the original object as active, run this script:
import bpy
root = bpy.context.active_object
selected_objects = bpy.context.selected_objects
selected_objects.remove(root)
for shard in selected_objects:
shard['RootOrigin'] = root.location - shard.location
And in the material for the shards, use this setup as your new ‘object coordinates’:
Just copy the script above into a new Text in the Blender’s Text Editor,
Select All Shards plus the Original Mesh as the Active object,
And Run the Script (the ‘play’ icon in the Text Editor)
The script creates the Custom Property automatically!
Setup the material and it’s done.
Otherwise you need to do this manually for each piece of the fracture alone. (or live without it!)
Thanks you so much, i wish there was an option in the texture coordinate for no needs of scripting but at least this way is not that complicated.
Have a nice day! ^^
I thought you had taken this into account, because the rigid bodies simulation is destroyed when the position is applied. The fractures glitching around. D:
Just the rotation and possibly the scale (if the rotation doesn’t fix)… The position is not to touch.
Can you send me a scene with just one of those columns, shards included.
No need for anything else (no textures, no other objects, etc). If i know what values are in the objects, I may be able to fix those problems also in the material.
Alright, here try around.
Hope the texture shows up, becuse i use the Substance Painter Add-on to be able to load SSP materials into blender.
And i am using 3.6 btw.