View Full Version : tree script and material problem
Im developing a tree pluginscript, the scripting has so far gone well, but a problem that i have been aware of for quite some time now is starting to annoy me.
materials, i dont have a clue on how i would get mapping coordinates say for the opacity planes that form the leafs, these would have to be face mapped since i use V-Ray and cant use mat.ed.s face mapping, i do not want to have to put a separate uvw map on top of the mesh, since i then would have to make a lot of uvw modifiers to get a good result for branches and leafs.
also of cuorse the mapping of branchs and the stem would have to be scripted into the plug.
the trunk, branches and leafs have different mat ids depending on wether trunk/branch generation and leaf generation
the geometry is all calculated in the script, ie no max cylinders and stuff.
if anybody have any clues please could you help me out.
older tests (http://www.corenne.com/ufa/olika2.jpg)
small avi (http://www.corenne.com/ufa/lovtrad2.avi)
early spike tree test (http://www.corenne.com/ufa/blad.jpg)
early spike tree test2 (http://www.corenne.com/ufa/blad3.jpg)
the interface is totally new for leafs/spikes so this img is not really according to how it looks right now
02-03-2004, 03:28 AM
Cool looking plugin...
sounds like your looking for "buildTVFaces" and associated items. You may have to assign the mapping to the faces or vertexs the old fasion way.
For example, manually map a leaf, then go and check out the vertex mapping information. then apply that info to the generated leaf.
Branches are going to be harder as the size of the branch needs to be computed into the vertex mapping info so it doesn't get distorted...
02-03-2004, 03:12 PM
You might try examining Shawn Lewis' TreeMaker script. It does a decent job of generating the UVs, also decently handles the intersections between branches.
thanks for your fast and enlightning replys !
I think ill try the buildTVfaces, since i now have read a bit about it, it seems the only way. the leaf faces should be quite easy, but the branches might be harder just as you say kramsurfer, but ill give it a try.
as for branchintersections i have not thaught about that, would be cool though.
ill check out the treemaker, i remember trying it somtime, but then it was definately not version 5 :) .
also i was thinking about a proxy object for high detail trees and a forest function that would scatter the objects with a bit of random variation, but i dont know how to switch between proxy and real model at render, is this possible, like "on render" or something??
just doing a little testing now for a while, so hopefully ill have som nice anims and pics to show soon.
02-03-2004, 05:36 PM
Are you thinking of sharing the finished script?
I like the functions in Peter Watje's scatter plugin, perhaps some of these ideas could be incorporated into your script...
Good luck with it!
not quite sure yet about how and if to share, have not thaught about it.... at least i will finish it first... future issue?? long long way to go until its finished...
yes the watje scatter is quite nice, tried it for making grass, and actually tried to get some help from peter to redev. it into a grass plug but i newer got any answer, so i wrote a entirely new grass tool, it is quite like the druid grass o matic, but has got further bitmap options, the placing, color (rgb channel) (of every different strand) and length (alpha) is based on a bitmap. i also put simple wind in it. it is now functioning as a utility tool and thus is really slow and uncomfortable to use, but i will redev. it further into a geometry pluginscript after i get tree tool finished
grass 1 (http://www.corenne.com/ufa/grasstest.jpg)
grass 2 (http://www.corenne.com/ufa/grasstest_storre.jpg)
grass topview (http://www.corenne.com/ufa/grasstest_top.jpg)
ill let you know when i make progress, and thanks again for the help!!
01-17-2006, 09:00 AM
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.