Page 1 of 2

Align particles away from center

PostPosted: Sunday, 20.April 2014, 14:36
by Skinnytorus
Hi guys,
Since there is still no proper way to get point normals of the emitter mesh and align particles along them, I've figured a workaround by using Exploder operator.
Chunks operator needs particle Speed parameter in order to orient meshes, so Exploder does the job pretty well ;). I have also found a small but annoying bug in FromVertex operator. Well... See for yourselves ;)

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 09:03
by CybeREX
yes, its work, but this bug prevents to use this method in demo, simply because its not loading then...
well hope programmers can fix it up

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 09:22
by Skinnytorus
I added a link to this thread to Bug Reports. Hopefully, ikam will have a look at that when he has time.

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 09:50
by CybeREX
Well, old knowledge about WZ1 still works in WZ4, that good news for me =)
Let me explain how it works in WZ1
when you use operator like select it will cut some parts from object and you need to place green ADD operator after your whole mesh complete, then CPU will start calculating from this point like this is solid mesh, if you don't place that operator then CPU will calculate all primitives that you use to make mesh (in 2004 year we saw much graphics performance improvement if we use ADD operator and also this point included in WZ1 tutorial on multiples cube example)

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 10:03
by Skinnytorus
Excuse me - I'll be able to open your file only in the evening. If I get the idea, you refer to turning a mesh into a model. Wz4 particle systems (Exploder in our case) do not accept model (render) ops (yellow) as input - only meshes. Until I've seen your file I wonder how you could bypass that limitation in wz4? Did you just add a mesh Add operator and it worked?

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 10:10
by CybeREX
When you use green operators it will generate mesh that will be calculated with CPU, when you use yellow operator, you will generate content for gpu, I will upload WZ1 example in the evening, and try explain this situation more clearly.

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 10:13
by Skinnytorus
That'll be cool. Thanks. I'm not that that fluent in wz1 as I am in wz4, but the approach seems the same...

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 12:09
by CybeREX
Here is screenshot from WZ1 tutorial, that explain, how add operator work with mesh.
So in WZ4 its seems also work and good as for WZ1

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 12:22
by Skinnytorus
I see what you are talking about. In our case FromVertex has nothing to do with creating a mesh or a model for rendering. It's used just to create an array of vertices to spawn particles on. From what I can see is that if set into Selected mode, FromVertex operator does not output the data Exploder (or Chunks) needs to work properly. Some data is missing or not initialized. Add mesh operator seems to add the missing data. This should be easily fixed imho.

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 12:31
by CybeREX
Well, we have cool coders here, that can find and solve this problem.
I just make simple WZ4 stress test with cubes =)

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 13:11
by Skinnytorus
Cool. I'm gonna have a look at it this evening.

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 18:10
by ikam
Skinnytorus : Yes There is a problem with FromVertex and the build operator stack process. In short, mesh in cache (readed by fromvertex op) is not available if you directly show a render operator (yellow) in the satck, it is why when you show green operator before it will work, mesh will be in cache. Need investigation to remind me how all this process work.

You can quickly fix it by removing cache for this operator (comment the line flags = passinput | passoutput; for fromVertex code secetion in Wz4_mesh_ops.ops)

CybeREX : Yes for performances, you also can use a rendermesh operator and enable instances to improve performances again when same mesh is multiplied many times. (there is an explanation in the tutorial, section rendernode)

Re: Align particles away from center

PostPosted: Wednesday, 23.April 2014, 20:09
by Skinnytorus
CybeREX
Yep. You're right. That's how things are between meshes and models.

ikam
Thanks man. As always you come to the rescue. :)

Re: Align particles away from center

PostPosted: Friday, 23.May 2014, 14:03
by broink
Ran into the FromVertex-problem last night. After reading some other threads, I thought this rigorous adding of adds would work, but to no avail. No fancy tunnel for this demo then =(

Re: Align particles away from center

PostPosted: Friday, 23.May 2014, 17:40
by Skinnytorus
Perhaps you should try ikam's trick mentioned above i.e.
comment the line flags = passinput | passoutput; for fromVertex code secetion in Wz4_mesh_ops.ops
?