xjzeng
Hello to the SOuP community!

I've only recently found this delightful maya tool set. I'm playing around with the voxel grid tool at the moment, and I'm wondering if there is a way to select or extract transform data from the instances generated by the tool (since they can't be selected or interacted with)

Thank you for your time!

XJ

P.S May I ask where I can find documentation for this tool set? I checked out the sticky above but a fair bit of the links are dead. Would be great if there is an instruction manual somewhere!
pshipkov
To convert instancer data to individual DAG objects use the "uninstancer" tool under the second shelf button.

As for documentation ... well ... hmmm ... yeah ... well there is no official documentation - use the tutorials from the "tools" page. Go through the example scenes and browse the forums. I think we have all topics well covered by now, but not as a consolidated documentation in the traditional meaning of it.
Reply 0 0
xjzeng
Thank you Mr. Pshipkov! I will try that out, and thanks for pointing me to the materials!
Reply 0 0
xjzeng

Hi there.

I was playing around a with voxels a little more. I downloaded the example scene and was playing with the bound modifier and looked through the voxelReveal scene.

I have a couple more questions if the community wouldn't mind answering. So first, I like the way the bound modifier voxelise the surface of the object. I was wondering if there is anyway to break the voxelised object into component cubes and also fill up the hollow space inside?

For the voxelReveal scene, I tried substituting the bunny geometry with other geometries (just a sphere) to see if the particles generated can fill up other shapes as well, and I'm having difficulty getting the particles to properly fill up the geometry. What can I do to fill it up properly?

My questions are probably really basic, and I beg pardon if they have been answered elsewhere, or are just plain noob.

Thank you all!

XJ

Edited to add:

Well, it seems I can get the sphere filled up properly if I just scrub the timeline reeeeally slowly, and if the particle cube doesn't fit exactly keep scrubbing back and forth till it does.

So, I'm completely new to the effects side of Maya really (been a modeller the whole time). I'm sorry if the stuff I'm doing now looks hopelessly noob to you all, but I hope you'll have patience with me while I try to learn this stuff :)

Reply 0 0
pshipkov
Check the attached scene.

This will fill up the arbitrary geometry with cubes or whatever other objects you want.
The result is meshed geometry that you can edit as usual.
Generating meshed instances is slower than using the maya instancer.
Reply 0 0
xjzeng

Mr. Pshipkov,

Thank so much for the example file! This is really so interesting, and this tool set is really versatile! I'm playing with your example file now and seeing what I can do with it. I'm going to try and see if I can apply some kind of texture, either procedural or 2D texture with it. Judging from the other example files, there should be some way to do it!

I'm trying to get a mental image of how this works. Looking at the file, the cage mesh is piped into the voxel grid, who will take the geometry and....what, generate points (or a grid) based on the vertex on the surface? I can't quite tell, seems like it should be taking the whole geometry and generating point data not just on the surface but the volume inside? (I would love it if you don't mind giving a quick explanation on how you coded this (either the maths, or the API used?))

It then passes the information to the scatter node, which will generate procedural particles(or maybe just point information on where the instances should be?) with the copier node turning the result mesh into the final mesh, with the scale of the voxel being driven by the voxel scale connected to the cube mesh?

Really, I'm just guessing. This is probably all wrong haha.

Anyway, thank you so much for your help!

XJ

Reply 0 0
pshipkov
Can you clarify to what result you want to use a 2d texture in conjunction with the point cloud ?

The voxelGrid node uses the object's bounding box and partitions the space inside into regularly spaced "cells". At the "vertices" of these "cells" it places a point. Or something like that.

The scatter node can randomly distribute points on the surface of objects or within their volume. I use multiple different techniques inside to do that. For surface scattering i do ray projection and check if randomly generated vector crosses the surface. Alternative way is to generate 2d points and then find their 3D representation by transforming them from UV to 3D space.
For volume scattering i check if the randomly generated vector is inside the object by comparing it's direction to the surface normal where it intersects it. The node will check which points are inside and which are outside the base object and will output only the ones matching the criterias briefly outlined above.

If the scatter node has something connected to its inPositionPP attribute then the points there will be used as a base.

In general you got a good idea of how this works.
Reply 0 0
xjzeng

Dear Mr Pshipkov,

Thank you for your explanation! So for the voxelGrid, perhaps something like the pseudo code below is what you did? (sorry, I only know python!)

dimensions = list()

dummy_tuple = cmds.polyEvaluate('testObj', b= True)

for set in dummy_tuple:
    use pythagoras to find the edge length in 3d space,
    (e.g. linalg.norm from numpy)
    dimensions.append(set)

And then you divide the dimensions equally from input from the user (either the XYZ resolution or voxelScale field, something like that?) and get the co-ordinates like drawing a graph in 3D (moving inwards by using the scale provided as step?)

xyz_dictionary = {'point01' : (x01, y01, z01), etc.... }

And creating the instances later based on the generated co-ordinates much later with either scatter or copier.

As for the 2D Texture thing, I was wondering if it's possible to use a source geometry that already has UVs and project the UVs onto the result mesh? 

Thank you so much Mr. Pshikopv! I hope I don't annoy you too much with my questions, haha.

XJ

Reply 0 0
Reply