Rendering text mesh as particles

benoitlahoz's picture

Hi all !

I'm trying to render a 3D letter mesh as lines particles with Kineme Particle Tools, so :

  • I parse the mesh vertices structure through a "Get Mesh Component"
  • scan the obtained structure with an "Interpolation"
  • and connect the obtained coordinates to a "Particle Emitter"

But I have two troubles :

  • I would really like to preserve the holes in the letter ("A" in my example).
  • My letter isn't in 3D : when I rotate the whole thing I have lines connected to an unique point.

Do you think that my mesh is not well done (Blender text transformed in a mesh) ? Would you have any advice about parsing the mesh structure (and may be selecting "good points") to keep the "A" points ?

Thanks a lot in advance !

Ben

PreviewAttachmentSize
AMeshParticles.png
AMeshParticles.png58.89 KB
AMeshParticles.zip7.33 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: Rendering text mesh as particles

What about dropping the .dae and using a workflow based upon the text extrusion example?

see attached example, might point you in a fruitful direction.

Two things occur to me on examining your posted .qtz.

1 - the .dae is being represented with a surrounding triangle

2 - the particle render of the mesh is very flat.

I think text extrusion is more malleable, adjustable and gives a good 3d effect.

Hope that helps

PreviewAttachmentSize
Text Extrusion Two.qtz44.9 KB

gtoledo3's picture
Re: Rendering text mesh as particles

The z-port was hooked up incorrectly in the sample.

The big problem with the attachment is the order of the vertices, and that if you interpolate them in a linear way, particles are going to draw all over the place with the vertex order instead of along the boundaries of the actual letter.

photonal's picture
Re: Rendering text mesh as particles

nice example but wow only getting 6fps!!!

cybero's picture
Re: Rendering text mesh as particles

Well spotted, I was just leaping in after several days offline with my knee jerk reaction / preference regarding text extrusion instead of particles.

Once the z is going to the z emitter it does do depth nicely.

However still get a triangle surrounding the 'A' character. [bounding box?]

Guess that would be the model, so I turn to the looking at the model in Mesh Lab and can't find any intrinsic imperfection.

gtoledo3's picture
Re: Rendering text mesh as particles

Again, it is the order of the vertices. This composition runs through the vertices in the order that they load by default, and "draws" line from each successive point. Since the vertices don't line up in an order that you would "draw" something, it looks messed up.

benoitlahoz's picture
Re: Rendering text mesh as particles

Thanks all for your advices, and cybero for the composition, but... (there is a "but") what I'd like to is to apply some particle effects to the text.

So, I guess there is no solution to order the vertices and maintain the 3D ? I tried to look more closely to the XML in the DAE file, but I can't really understand how all this is organized... :-/

benoitlahoz's picture
Re: Rendering text mesh as particles

Well... I've been thinking to all this, and I'm now trying to find a solution to export font glyphes vertices directly from the font, and perhaps I could then import them through an XML file...

No idea right now if there's an existing tool to export this type of data...

cybero's picture
Re: Rendering text mesh as particles

What about using the _1024 Vector Font plugin?

Not exactly rendering text as particles, but does allow for rotation and sizing.

You could RII that and then output to to a Particle Renderer, or else have a close look at the _1024_VectorFont NOISE.qtz in the examples for that plugin.

I'd be interested to see if that font glyph export idea were feasible and useable in QC.

bernardo's picture
Re: Rendering text mesh as particles

well if you were using 3dsmax i have a script that exports the vertex list into xml file. but you are using blender and its python based.... when i have time i'll upload it and all the letters in ARIAL font in XML files, its really easy to do... hugs bern

bernardo's picture
Re: Rendering text mesh as particles WHAT IF?

what if the xml parse came like this:

<object>
   <face 1>
      <vertex 1> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 1>
      <vertex 2> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 2>
      <vertex 3> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 3>
      <vertex 4> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 4>
   </face 1>
   <face 2>
      <vertex 1> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 1>
      <vertex 2> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 2>
      <vertex 3> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 3>
      <vertex 4> 
         <X>001</X>
         <Y>001</Y>
         <Z>001</Z>
      </vertex 4>
   </face 2>
 
   (...)
</object>

would that help to form make an object? instead of a vertex list make it a face list then you could link the vertex by face...

gtoledo3's picture
Re: Rendering text mesh as particles

I think the easiest way would be to just make the structure in QC. Then, you can actually control the order that the particle paint type thing "draws" in (which looks like what's going on here to me), when one interpolates through the indices.

That said, this has also revealed to me that using line segment setting on the render:structure and then the line struct isn't working, and I would expect it to. Come to think of it, it may have never worked, or maybe broke somewhere along the way...

benoitlahoz's picture
Re: Rendering text mesh as particles

The bernardo's way seems a great intermediate way to manage with it (BTW, thanks for the Arial vertices !). But, of course, it would be great to have an intra-QC solution. Why do you say "isn't working" ? How would you expect it to work ? I'm very interested.

I tried with the 1024_VectorFont, which is incredible, but that's not exactly what I want : I would like letters to seem really light, and to make them react with wind, vortex and all these terrific particle tools... but, well... am I a little bit demanding ? :-)

franz's picture
Re: Rendering text mesh as particles

you're not demanding. You just need the right tool for this. Try emotion, by Adrien Mondot http://www.adrienm.net/emotion/eMotion.html

gtoledo3's picture
Re: Rendering text mesh as particles

It sounds like he doesn't want the particles to be letters franz... he wants to import a letter and use particle tools to draw what amounts to a wireframe, from his example.

Again, again ; one can use a structure maker or javascript to make vertex points in QC manually, so that when one interpolates through the indices, it actually "draws" the A shape with particle tools.

To the post above franz's I mean that when line segment is chosen on the GL Line structure renderer and use with particle tools at certain settings, it doesn't render at all, from some error. This doesn't really impact the ability to do/not do what you want.

...and, I don't think Bernardo's suggestion is that great really (no knock meant, it just seems indirect). If you're just trying to draw that A shape, re-ordering that entire A model is probably a waste of time (or at least, I wouldn't want to spend my time doing it that way). It will take you specifying something like 20~24 points to draw an A shape using a structure maker, just doing it "in QC".

bernardo's picture
Re: Rendering text mesh as particles

this is why i love particles

bernardo's picture
Re: Rendering text mesh as particles

as soon as i have the script ready ill post the xmls and the its processing time for a huge font list that i have here as well as letters.

benoitlahoz's picture
Re: Rendering text mesh as particles

I know well the Adrien Mondot's work (very beautiful actually !), as one of my collaborator is working with him too. In fact, he's using Quartz Composer a lot in eMotion.

But, as GT say it : I'd like to draw the shape with the particles. Hard way to have to make structures manually (maybe a first attempt drawing with a Wacom in a file ?) !

franz's picture
Re: Rendering text mesh as particles

you can do this with Particles_Warfare. Not 3D tho', and no vortex yet.

PreviewAttachmentSize
PWarfare_from letters.qtz5.27 KB

gtoledo3's picture
Re: Rendering text mesh as particles

(hint: look at sample comp)

benoitlahoz's picture
Re: Rendering text mesh as particles

Great ! thanks so much to you 2 ! I'll be working on this !

bernardo's picture
Re: Rendering text mesh as particles

well this is whitout any plug ins extra... a simple xml with two letters... will make that links the width of the extrusion.... try it. i''ll keep working on it because its really usefull the XMls with letters... i'll be using the alot....

the comp has gl tools from kineme...

and the xml FILE: http://dl.dropbox.com/u/3545315/AB.xml

hugs bern

PreviewAttachmentSize
simpleXML AB.jpg
simpleXML AB.jpg155.48 KB
particleEMITTER XML.qtz3.67 KB

gtoledo3's picture
Re: Rendering text mesh as particles

Ah, you took the time to parse points! Wow.

One thing I noticed when testing is that if I render from a given point A1 to point B1 (any two points, a test case), particle tools will seemingly want to generate lines lines that have many points along the way from point A1 to B1, with every line ending at 0,0, instead of every line ending at the last drawn point. I think that is going to make the cobweb effect inevitable with Particle Tools.

bernardo's picture
Re: Rendering text mesh as particles

yes i was getting that too... there seem to be a problem with the gl lines as if they were not updating at the speed of the interpolation patch that moves the emitter along the structure... will keep working on it. strangely i guess it has nothing to do with my xml or not. but its a project for tomorrow.

cybero's picture
Re: Rendering text mesh as particles

If one made each letter into an object structure, wouldn't that give one cleaner lines of separation, so that A did not connect to B, as it does now?

Like [letter A] and [letter B]

Interesting example.

[I was a bit confused at first by the Particle Render: Standard patch above the Trackball. :-)]

BTW, how did you convert the font outline to xml structure? I'm thinking it would have been hand coded, except for the fact that it's two letters as one object, which suggests to me that it's been exported from an application.

Scratchpole's picture
Re: Rendering text mesh as particles

Great tip Franz. I had seen some of Adrien's work previously but did not look at his site. Amazing tool. Thanks

cybero's picture
Re: Rendering text mesh as particles

I'm finding that I'm going around in a loop when I download the item.

The application is downloaded, then it says it needs an update and if I click OK on the little update notice, then the modal dialog box behind the update notice automatically closes and updates nothing :-)

What am I doing wrong? [if anything at all].

cybero's picture
Re: Rendering text mesh as particles

Quote:

I think that is going to make the cobweb effect inevitable with Particle Tools.

Actually, the example posted is sending its points to GL Structure patches and the Particle Render: Standard patch is doing nothing, you could switch it off and the GL Structure patches still render.

Scratchpole's picture
Re: Rendering text mesh as particles

Oh bugga, I'm getting the same. Email on the way.

bernardo's picture
Re: Rendering text mesh as particles

i'll soon post some more xmls with single letters.... sorry about the particle forgot that :) the conversion was made in maxscript (3dsmax scripting language)

cybero's picture
Re: Rendering text mesh as particles

LOL :-)

Quote:
Oh bugga, I'm getting the same.

Kind of oddly glad to know I'm not alone in regards of this oddity.

As it happens, I've also emailed the author about this tantalising frustration.

cybero's picture
Re: Rendering text mesh as particles

Ah , bless you, no need to apologise [I just felt the need to clarify about the patches role {nothing}] & thanks for the 3ds work route update.

LOL - I was almost at the point of downloading a trial & then realised it's a Windows only product. Good looking product though.

benoitlahoz's picture
Re: Rendering text mesh as particles

Wow ! Great !

But right now it seems that it's not working with the way I'm scanning the structure to make it feed the X, Y, Z of the emitter (then render to structure and GL Lines).

With the standard render it seems to work better, but obviously the regions of the letters where there are more points are more visibles...

bernardo's picture
Re: Rendering text mesh as particles

yes it is... its c++ based scripting language wich is nice and simple.... the xmls of all my fonts of all the letters is a huge list.... will post is on my server small caps first

bernardo's picture
Re: Rendering text mesh as particles

oh well i'llpost the a font file with the letters and numbers inside... simpler... i will try this later... this is 2d structure... letter vertex pos letter vertex pos

(...) number vertex pos

(..)

PreviewAttachmentSize
lettersNumbersLetter_byFonts.zip5.76 MB

cybero's picture
Re: Rendering text mesh as particles

This is incredibly generous of you bernardo and very useful too.

Structure Key Member is the patch I've used with this XML to get individual letters out . The key being the particular character or number to get the structure of.

I find that the Line Structure patch does a good job of rendering the XML rather than the point structure, excepting where the Line Structure produces a closure of the structure that actually "breaks" the real form of the letter.

I'm definitely going to start doing some experimental hand coded refinements of these character XML lists as and when I find that there are characters that the structure produces any closure of the structure that actually "breaks" the real form of the letter.

One font at a time.

benoitlahoz's picture
Re: Rendering text mesh as particles

Thanks so much bernardo ! That's enormous !

bernardo's picture
Re: Rendering text mesh as particles

glad i could help... i haven't check them all but if i can help in anyway please call...

i did this for letter but i can do it for anything in 3d... if you want anything done in 3d call...

hugs bern

benoitlahoz's picture
Re: Rendering text mesh as particles

Hi ! I found this on flickr : http://www.flickr.com/photos/curlycode/4196158562/in/pool-quartzcomposer...

Does anyone of you heard about Toby Spark Typo ? Seems that it can export meshes usable by the particle tool, found this too : http://www.flickr.com/photos/curlycode/4415152132/in/pool-quartzcomposer...

Very beautiful job actually, and exactly what I'm trying to make...

bernardo's picture
Re: Rendering text mesh as particles

it would be possible if they just add a structure input to particle tools!!!! as simple as that a simple loop that would create a new vee_emitter inside the object emitter.... all at once... but i am no programer. SMOKRIS HELP CRWIGHT HELP!!!!

benoitlahoz's picture
Re: Rendering text mesh as particles

Thank you bernardo ! I'm sorry for being pushy with that... These particle tools are so great that I'm totally excited :-) I'm having a good job with the letters you posted. I'll post some results soon.

pixelnoizz's picture
Re: Rendering text mesh as particles

its a private project from Toby, the plugin has a structure output, its possible to use with mesh or with any gl tools object (line, point, quad...) via structure input. The particle stuff is the same plugin just i used the coordinates from the structure to position the particles, and with a small but well filtered feedback got that result.

gtoledo3's picture
Re: Rendering text mesh as particles

I understand the idea of a structure input to particle tools, but it wouldn't help line rendering if lines don't render in a strip like fashion as one draws. Endpoints don't wind up in the correct place w/ particle tools and the line renderer.

This is really easy to see by using particle paint, and rendering with lines.

gtoledo3's picture
Re: Rendering text mesh as particles

Oh, toby made a text to 3D letter plugin. Cool. I was wondering when someone would do that. Too bad it's private.

benoitlahoz's picture
Re: Rendering text mesh as particles

"Simple" and beautiful ! I really like your work a lot !

usefuldesign.au's picture
Re: Rendering text mesh as particles

Coming in kinda late on this thread, I was following it but forgot this was something I've looked at before in a different context. I was scanning an image for edges to shoot my 'laser' at so it' has a method to generate the point data that's germane to this discussion.

I think Franz was on a similar track with the Edges Filter comp he posted. I went a step further and processed through the, afore-mentioned, PixelS plugin and then a JS patch to parse the 'hit' points (>= threshold) into a 2D array.

Some of the possible published settings will result in Beachball-o-Death (at least on the venerabel PPC I'm at atm) so be carefull.

This does not parse the points in a way that provides any meta-data about the points generated. As in: which points are 'connected' to which in the source shape/image. Such 'neighbouring pixel' parsing wouldn't be too much sweat in the JS Patch though.

A better output Struct would be just "item"={X:x,Y:y, Z;0} for 'hits' to allow for 3D transformations and GL Structure renderers. (And no null objects to sort through see "Flash" macro in comp). Will improve and post tonight…

I'm sure there's better (faster) ways to do this in SL and/or GLSL but this is a method I'm familiar with.

PreviewAttachmentSize
Edge detection PixelS.qtz55.36 KB

usefuldesign.au's picture
Re: Rendering text mesh as particles



I noticed you're only getting the vertexs generating points in this bernardo. All 3D apps I've used have a commend for dividing a line/spline into a series of lines/splines. So you end up with lots more vertexes and a more even distribution of points on the straight lines.

This might be very difficult to include in the Maxscript process you used as you'd probably want to cut away straight lines and divide them only (# of divisions proportional to length) before it parses the data but who knows?!

bernardo's picture
Re: Rendering text mesh as particles

yes yes i have an optimize spline script here that i can use to simply the shape to its final form yes i forgot about that...

but my pc died on me... loooking for a solution now....

usefuldesign.au's picture
Re: Rendering text mesh as particles

"loooking for a solution now...."

Well Blender can output point data as XML, as for the scripting I don't know…

bernardo's picture
Re: Rendering text mesh as particles

i am looking for a solution for my computer not for this

benoitlahoz's picture
Re: Rendering text mesh as particles

Thanks for your post !

But I can't manage to open your comp, I have an error with the NICircle and NIThreshold I can't find nowhere :

> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NICircle" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NICircle"
 
> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NICircleStroked" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NICircleStroked"
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputCenter_Y" @ "NICircle_1"]
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputCenter_X" @ "NICircle_1"]
 
> Macro Patch
Cannot create connection from ["outputImage" @ "NICircleStroked_1"] to ["source_1" @ "Multiplexer_2"]
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_2"] to ["inputRadius" @ "NICircle_1"]
 
> Macro Patch
Cannot create connection from ["outputImage" @ "NICircle_1"] to ["source_0" @ "Multiplexer_2"]
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_2"] to ["inputRadius" @ "NICircleStroked_1"]
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputCenter_Y" @ "NICircleStroked_1"]
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_3"] to ["inputStrokeWidth" @ "NICircleStroked_1"]
 
> Macro Patch
Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputCenter_X" @ "NICircleStroked_1"]
 
> Macro Patch
State restoration failed on node "Patch_1" <QCPatch = 0x1510A8F0 "(null)">
 
> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NISobelEdgev2" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NISobelEdgev2"
 
> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NIMaskFromColor" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NIMaskFromColor"
 
> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NIGaussianBlur" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NIGaussianBlur"
 
> Macro Patch
Cannot create connection from ["outputImage" @ "NIGaussianBlur_1"] to ["inputBackgroundImage" @ "AdditionCompositing_1"]
 
> Macro Patch
Cannot create connection from ["output" @ "Multiplexer_1"] to ["inputImage" @ "NIGaussianBlur_1"]
 
> Macro Patch
Cannot create connection from ["outputImage" @ "NISobelEdgev2_1"] to ["source_3" @ "Multiplexer_1"]
 
> Macro Patch
Cannot create connection from ["outputImage" @ "Edges_2"] to ["inputImage" @ "NIMaskFromColor_1"]
 
> Macro Patch
Cannot create connection from ["output" @ "Splitter_6"] to ["inputImage" @ "NISobelEdgev2_1"]
 
> Macro Patch
State restoration failed on node "Patch_5" <QCPatch = 0x151F8270 "(null)">
 
> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NIThreshold" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NIThreshold"
 
> Macro Patch
Cannot create connection from ["output" @ "Splitter_6"] to ["inputImage" @ "NIThreshold_1"]
 
> Macro Patch
State restoration failed on node "Patch_7" <QCPatch = 0x175037C0 "(null)">
 
> (null)
<QCNodeManager | namespace = "com.apple.QuartzComposer" | 688 nodes>: Patch with name "QCImageFilter:NIThreshold" is missing
 
> Macro Patch
Cannot create node of class "QCImageFilter" and identifier "NIThreshold"
 
> Macro Patch
Cannot create connection from ["output" @ "Splitter_6"] to ["inputImage" @ "NIThreshold_1"]
 
> Macro Patch
State restoration failed on node "Patch_6" <QCPatch = 0x17505B20 "(null)">
 
> (null)
State restoration failed on <QCPatch = 0x001F6E50 "(null)"> 

Is it a particular plugin that's missing ?

[edit : event with this trouble it works well ! Great ! I'm going to try with particles right now !]

gtoledo3's picture
Re: Rendering text mesh as particles

If you're going for that look of the samples above, here's a thought... forget all about this particle => line struct stuff.

Make your letters however you're making them now (or, try the Google Sketchup letter maker tool, as it makes really simple letter models).

Place these letters inside of a 'GL Polygon Mode' (available with GL Tools). Turn on Front and Back rendering modes to "Wireframe". At this point, you should see your letters rendered in wireframe mode, with no weird overlaps.

Look in your Developer folder in the QC examples. Find the shader titles "GLSL Vertex Distortion". Place patch inside of this shader. Now, watch stuff wobble all around nicely. If you crank up the params, you can turn it into a total jumbled mess, or not.

In some ways, this is similar to the 1024 vector font thing that was mentioned, but this concept will work with your 3D models.

benoitlahoz's picture
Re: Rendering text mesh as particles

Thank you master GT :-)

I'm going to try the 2 solutions (yours and the usefulldesign one).

I'm really impressed and I appreciate so much the generosity of everybody on this forum. Hope I can participate in some way when I'll be more skilled !

usefuldesign.au's picture
Re: Rendering text mesh as particles

Sorry I should have mentioned them.* They just generate two of the source shapes, were kind of leftovers from the patch I carved this out of . Glyph and Checker Board will do fine for those without the NI Plugins.

I'm getting some nice results with a new improved version of the JS parser and a structure smoothing JS patch. Will clean it up/document a little and post in the morning. It's late here.

This has given me a push on finishing the laser drawing comp I left for greener grasses last year, so thanks!

* They are installed when you install Noise Industry FCS Effects Demos (might be called something else though) which I highly recommend for a look-see at what else can be done with plugins.

Not sure where they install exactly, I found one or two in root directory Library folder but that's all I can remember seeing.

usefuldesign.au's picture
Re: Rendering text mesh as particles

Lol