PDA

View Full Version : Pant Effect: leaf normal direction


marlaS
02-23-2009, 03:55 PM
Hallo guys

I'm tryng to made a realistic tree with Paint Effect,

But I can't get my result with the leaf normal direction. I played with leaf twist, leaf twirl, curl... bend and stiffness... and costrains...but nothing :banghead:

"I would get normal direction (red arrow on sceenshot) in up-directionpredominantly, in order to obtain a right specular effects."

Sorry for my english, I'll try to explain the issue with a screen-shot:
I hope you help me
I'm glad you

http://img207.imageshack.us/img207/6208/leaftrouble.jpg

Duncan
02-23-2009, 09:03 PM
There is not a control for upward twist (but should be). One can sometimes get it by controlling the branch twisting and such but this also affects the tree shape and is difficult to do.

However if you convert pfx to poly there is a workaround:

First convert pfxToPoly for your plant(with history on) then turn on leafForwardTwist on the brush. Now on the stroke node under mesh output make CameraPoint = 0, 10000, 0. Instead of twisting towards the eye position the leaves will face upwards. (if the forward twist is on before convert to poly then a camera connection is made to the cameraPoint attribute, which you would then need to break). Unfortunately the camera position used by the pfx render cannot be overridden in this fashion, so this trick only works with pfx to poly.

Duncan

marlaS
02-24-2009, 08:13 AM
Thank you Duncan! I dont belive my eyes, I spent so many times...
I like this workaround, fortunately I need the poly solution... there is no much control with this technique, but it is enough for me.
Thank'you very much.
I'll show you my work when it is finished. :beer:

marlaS
04-19-2009, 02:13 AM
as I promised I show you my last personal work with hard paint effects,
http://forums.cgsociety.org/showthread.php?f=132&t=754315
thanks for your support! ;)

Duncan
04-20-2009, 05:10 PM
That is the best foliage rendering I've yet seen. Fantastic job on that... very serene and beautiful. You really must post a tutorial covering the key techniques you used, especially in terms of lighting and shading.

In terms of pfx attributes I was thinking it might be possible to add something like "fixedTwist and "fixedTwistDirection", where the fixedTwist attribute would control the degree to which the twist is bent to the fixedTwistDirection (perhaps one could come up with a better name). A simpler attribute might be "upTwist" , where there is no direction control, just the degree to which leaves face up. I'm thinking, however, it would be better to have a direction because one may wish the leave to face more towards the sun. What do you think?

I suppose it would be one of the leaf controls, as opposed to the general twist. Flowers and branches could have it as well, but it would probably be most useful for leaves.

Let me know if there were any other controls you wished you had, or things that were problematic.

Duncan

marlaS
04-20-2009, 07:25 PM
Thank you for reply Duncan,

I think it may be a good solution. The question is important, because the sun direction is foundamental in botany.

Just you ask me there's an other thing:

a natural leaf is two sided, the up side is sun directed is more reflective and shiny, the down side is more rough. Then you could give indipendent control to leaf direction (and its curling) and to face normal direction. In order to control different properties via shader. But I ignoring any mathematical complications...
I hope to be helpful

I'll notice you if I find other practical problematic

Congratulation for the paint effect tool, I found it is very powerful versatile and complete.

ps A light shading tutorial is in my plans, I hope to find the time soon.

ytsejam1976
04-20-2009, 07:34 PM
yes dunkan, congratulations also from part mine:bowdown:

Cheesestraws
07-29-2009, 12:24 PM
What happens when you try to break the connection?

fabergambis
07-29-2009, 12:25 PM
There is not a control for upward twist (but should be). One can sometimes get it by controlling the branch twisting and such but this also affects the tree shape and is difficult to do.

However if you convert pfx to poly there is a workaround:

First convert pfxToPoly for your plant(with history on) then turn on leafForwardTwist on the brush. Now on the stroke node under mesh output make CameraPoint = 0, 10000, 0. Instead of twisting towards the eye position the leaves will face upwards. (if the forward twist is on before convert to poly then a camera connection is made to the cameraPoint attribute, which you would then need to break). Unfortunately the camera position used by the pfx render cannot be overridden in this fashion, so this trick only works with pfx to poly.

Duncan

Thanx 4 the trick Duncan, but in a project I unfortunately already made the paint>poly conversion with with forward twist ON on the paintFX before conversion, and I cannot break in any way the connection between the camera and the paint.
It's a bit annoying because there's a consistent slowdown in viewport unless I hide the layer with paint>poly meshes.
What can I do?

Duncan
07-30-2009, 12:51 AM
You should be easily able to break the link to the camera as follows: in the attribute editor for the stroke node right click on "Camera Point" and do "break connection". You can now set the camera point to 0 10000 0 to get the leaves to point up. Note that if you had toggled "forward twist" on the brush turn it off and instead use "leaf forward twist".

Duncan

fabergambis
07-30-2009, 12:11 PM
Thank you Duncan, just tonight (in Italy) I found out by myself the Camera Point slots on the stroke settings, and broke the connections.
I was trying to break it in the work area of the hypershade, but never got it since tonight...:D
Finally! Now I can move easily in my scene :applause:
But I left these values untouched,
I left leaf forward twist ON, as set before converting the stroke to poly, and everything worked fine.
I'm not sure where to find the forward twist parameter of the brush you talked before.

Duncan
07-30-2009, 03:17 PM
The forward twist attribute is under the twist block (you had said forward twist, not leaf forward twist so I thought you might have also set the wrong parameter, but sounds like you didn't)

Duncan

fabergambis
07-30-2009, 06:16 PM
I mean LEAF forward twist, in the Leaf section of the stroke, that's what I set ON before convert it to poly.
I can't find the forward twist parameter you talked before instead, but I must confess I did'nt spend so much in searching for...

Duncan
07-30-2009, 06:39 PM
"I can't find the forward twist parameter ..."

It is under the "twist" block of attribute on the brush( but you won't need it ). It would twist the rotation of the main tubes, such as branches, to face the camera. This can be useful when doing billboard trees and such.

Duncan

mwgriffin
06-05-2010, 10:12 PM
Hey I just saw a new feature in Maya 2011: Leaf Face Sun. Is that your doing Duncan? Thank you so much!!! I'm glad either you or someone else at Autodesk created an attribute for leaf facing. Now all I have to do is find the sun direction attribute and I'm golden! Thanks again!

Duncan
06-06-2010, 08:38 PM
Yeah, that was my doing. You can find the sun direction attribute in the growth block. In addition to leaf twist one can control the degree to which flower stems bend towards the sun.

Duncan

mwgriffin
06-06-2010, 09:46 PM
Hey thanks a bunch Duncan. I found it eventually and told myself that I'm completely blind. I was wondering if you have any tips on how to deal with the paint effects to poly conversion high poly count regarding trees with lots of foliage? More specifically I would like to know how to instance the leafs so that I can actually convert the whole mesh with out crashing my system or mental ray. I really have no clue how to go about doing this... Thanks again for that addition! Oh and since I have you here (this is totally off topic) I would love, as I'm sure many other Maya users would, to see graphite tools or some similar functionality integrated into Maya. I almost want to switch over to 3dsmax because of the inorganic modeling tool set. I may very well use both, but ideally I'd like to see that functionality in maya. If there is no intension of doing that, how would one go about creating tools like those (for instance flow connect, which looks awesome)? I'm assuming it would be more advanced than something you could write in mel or python? Oh and one more off topic question. I'm assuming you've heard of the plugin called Nex. How does something like that function? Does is utilize maya's "brain" (could it be written as a script or call maya's api) or does it introduce new logic? Thanks again!

royterr
06-06-2010, 11:04 PM
this feature brings PFX one step closer in helping the average user create convincing trees.
but there are too many features to tweak an its hard to tell witch ones we should tweak first.
i have done alot of researches and frankly allessandro trees are the one and only exemple of a convincing tree geometry.
i am familiar with pfx for doing artistic things but when it comes to real world trees its hard to tell where to start.
is there any convincing presets for a convincing tree (besides the old visor ones) that one could start with?

these are onyx trees, they are good i think but i am sure that pfx has a bigger potential but what we need ias a descent preset :
http://sor.typepad.com/.a/6a00d8350600cb53ef0133f03c0b17970b-800wi

visua
09-15-2010, 09:40 AM
this feature brings PFX one step closer in helping the average user create convincing trees.
but there are too many features to tweak an its hard to tell witch ones we should tweak first.
i have done alot of researches and frankly allessandro trees are the one and only exemple of a convincing tree geometry.
i am familiar with pfx for doing artistic things but when it comes to real world trees its hard to tell where to start.
is there any convincing presets for a convincing tree (besides the old visor ones) that one could start with?

these are onyx trees, they are good i think but i am sure that pfx has a bigger potential but what we need ias a descent preset :


Sorry for the cross-post folks but maybe we can get Autodesks attention this way:

+1

I've been struggling for like a week now but it seems as I just can't get
the look I'm after quite right (like the placing of the leafs in your average onyx-tree).
The leafs in paint fx have a habit of turning and popping in a unpredictble unwanted way?

royterr
01-29-2011, 05:46 AM
Sorry for the cross-post folks but maybe we can get Autodesks attention this way:

+1

I've been struggling for like a week now but it seems as I just can't get
the look I'm after quite right (like the placing of the leafs in your average onyx-tree).
The leafs in paint fx have a habit of turning and popping in a unpredictble unwanted way?

i totally agree with you, even with the sun direction attribute, they still tend to flip/twist around branches/twigs giving an unnatural look.

Duncan
01-31-2011, 07:55 PM
There is a bug ( will be fixed in future releases) with the sun direction where odd branches get a reverse twist (off by 180 degrees ).

Duncan

royterr
02-01-2011, 10:33 AM
There is a bug ( will be fixed in future releases) with the sun direction where odd branches get a reverse twist (off by 180 degrees ).

Duncan

Actually the problem appear to happen in the old method also (leaf forward twist/cam point 100).
So its not related only the new sun attribute.

However after sleepless nights..I found a way to fix it:
the problem only occurs when "branches" is turned ON, but its almost impossible to have a natural looking tree with twigs only.
So by raising the number of branches from 1 or 2 to 3 and higher, all the leaves amazingly and weirdly behave as they should again (facing the sun/same disposition as the brush).Now this is not a clean solution because i really prefer to have 1 or 2 branches and a high number of "twigs in cluster" then the other way around.

There is another issue with the leaf Angle 1 and 2, when branches is turned off, those 2 attributes work like charm on leave twigs turning them in the horizontal axis to the twig. But when branches is turned ON, they dont work properly and they turn the leaves in the vertical direction, how can i correct this?

This said, i now almost have a complete control on my tree bark structure and i can almost mimic every Onyx or Speed Tree structure and even the leafless trees models in Alessandro Prodan's renders.
But there is still something missing in the leaf disposition.Duncan do you have any info regarding the leaves attributes in Prodan's trees or did you notice any particularity besides the "leaf face sun" trick?I really want to get there!

* I don't want to sound rude or nonconstructive but regarding the Bug, "WE" Maya users have invested years and years in this great software, and in the year 2011,the least we expect from Maya is to be fully functional and production ready.I have been using both softwares for many years now, and i think that Maya is far in the race compared to Max and it's "Excalibur" project.Things like painting tools/modeling tools/mental ray integration/fast UI(and i pass) are way more advanced in Max and are holding Maya back and this is becoming more and more avious with each release.
Maya already lacks essential industry plugins sush as ,Autograss,ForestPro,VrayPattern,VrayScatter ghosttown.... Why not integrate modern and realistic tree PFX presets just like Prodan's and incorporate a modern a scatter/forest tool, in my opinion with these 2 modifications only, Maya could become an arch viz standard.

Duncan
02-01-2011, 06:59 PM
A setting with one branch is somewhat unusual( but can be useful all the same ). Could you post or bugput a simple scene showing the problem?

Duncan

royterr
02-02-2011, 12:32 AM
A setting with one branch is somewhat unusual( but can be useful all the same ). Could you post or bugput a simple scene showing the problem?

Duncan

here is an illustration (http://www.youfile.net/download.php?file=19939adc6f4cd4b911b138c1586d624f) of the original problem:

and here is a scene (http://www.youfile.net/download.php?file=1acb1c63f3feef6586c5590f32634bd9) showing the 2 problems:
-flipped leaves when branches set to a value lower than 3(its really hard to control the tree shape when number of branches is higher than 2, i really prefer to keep it to 2 and play around with the twig and other attributes.....there must be a way of fixing the flipped leaves and by having 2 the number of branches )
-leaf angle 1 and 2 tend to rotate the leaves in the wrong axis.

Duncan
02-03-2011, 07:17 PM
Yes that is the bug with leafFaceSun I described. Basically we maintain a separate twist for textures uvs so that the texture doesn't mirror at branch junctions and thus looks more continuous. The problem is that this flip was used for the sun facing twist causing leave on odd branches to face away from the sun instead of towards ( hard to see if the leaves were simple flat polys). This will be fixed in future releases of Maya.

I noticed also that you had a lot of subSegments on your brush which results in a high face count. The subSegments are mainly useful when you want to capture in detail effect of a displacement texture on the brush node. Otherwise I would keep the value 1 as it will not add detail.

Also in looking at your file I found another problem: we keep track of the output face count on the stroke node as a way of making it faster to build the output mesh. These hidden attributes( mainVertBufSize, leafVertBufSize and flowerVertBufSize) only grow in size and never shrink. This means that pfx to poly will still require a large memory overhead even after having simplified the mesh. (I actually got a crash with your file because my machine was low on memory when I loaded the scene and the values for these suggested that you had initially had a very detailed tree then simplified it at some point) A workaround for this bug is to manually set the value of all these attributes to zero. They really should probably not be saved with the file to begin with... that or they should both grow AND shrink.

Duncan

royterr
02-10-2011, 02:54 AM
I noticed also that you had a lot of subSegments on your brush which results in a high face count. The subSegments are mainly useful when you want to capture in detail effect of a displacement texture on the brush node. Otherwise I would keep the value 1 as it will not add detail.
Duncan
i was just a testing model, but i finally did what you said.
This is really a golden rule in CG, always choose the lowest number you can get away with, specially in PFX where some parameters get affect dramatically by others.


Also in looking at your file I found another problem: we keep track of the output face count on the stroke node as a way of making it faster to build the output mesh. These hidden attributes( mainVertBufSize, leafVertBufSize and flowerVertBufSize) only grow in size and never shrink. This means that pfx to poly will still require a large memory overhead even after having simplified the mesh. (I actually got a crash with your file because my machine was low on memory when I loaded the scene and the values for these suggested that you had initially had a very detailed tree then simplified it at some point) A workaround for this bug is to manually set the value of all these attributes to zero. They really should probably not be saved with the file to begin with... that or they should both grow AND shrink.

Duncan
even after setting those values to 0, nothing changed in the memory consumption or the file size but i will take that as a note.

Duncan
02-10-2011, 03:27 AM
even after setting those values to 0, nothing changed in the memory consumption or the file size but i will take that as a note.



Yeah, that attribute is just used for a momentary grab of memory when building the meshes. It is released right after used, but could cause a crash if you were running out of memory (working on a stroke that had been simplified from a really heavy mesh back when you had more available memory). Probably pretty rare to hit that case, however.

Duncan

DutchDimension
02-10-2011, 09:51 AM
Sorry to budge in here (it's relatively on topic). But Duncan, seeing as PaintFX fixes are being worked on, can we also expect a fix for the PFX drawing issue on OSX? Despite logging the bug early last year when I discovered the problem, interactive drawing of PFX strokes has been broken since 2011 with none of the hotfix or service packs addressing the problem.

Edit: Never mind, I already found my answer. Thank you, nothing to see here, move along. :)

royterr
02-11-2011, 09:02 AM
I have been trying to fix a very annoying problem, when a twig is pointing upward its leaf automatically follows its direction (even if face sun is turned on), i could use the bend parameter but it will bend the other good leaves too much downward.
So how can i let my leaves take a global horizontal position even if their twigs are going up?
illustration (http://www.youfile.net/download.php?file=ca1bfce4176341165e77785801d93e18)

illustration2 (http://www.youfile.net/download.php?file=fd464f4244e94201b9ab717f5f0ffbfe)

TheNeverman
02-14-2011, 02:08 PM
what was the fix DutchDimension?

Sorry to budge in here (it's relatively on topic). But Duncan, seeing as PaintFX fixes are being worked on, can we also expect a fix for the PFX drawing issue on OSX? Despite logging the bug early last year when I discovered the problem, interactive drawing of PFX strokes has been broken since 2011 with none of the hotfix or service packs addressing the problem.

Edit: Never mind, I already found my answer. Thank you, nothing to see here, move along. :)

CGTalk Moderation
02-14-2011, 02:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.