Add more plants to LumenRT plant library

1734
13
11-20-2017 12:22 PM
awei
by
New Contributor III

Plant loader with LumenRT is a great resource for visualizing plants, but for even more extreme scientific usage, I would like to include more species to visualize. Seems there's few free 3d tree model online. The approach I'm trying now is to export 3d models from another 3d modeling software I have, but because of different texture formatting with LumenRT library, the leaves texture is not showing up correct (fig.2). Seems to require fairly amount of photoshop. Does anyone know how to adjust the texture map export setting (fig.2) or incorporate customized tree models to the LumenRT library?

fig.1 

fig2

0 Kudos
13 Replies
LR
by
Regular Contributor

Your leaf textures are lacking transparency, try generating an alpha map.

0 Kudos
awei
by
New Contributor III

On that one screenshot there was no alpha map, but I did generate alpha map. Just try again, with alpha map, the leaves still don't have transparency..

0 Kudos
LR
by
Regular Contributor

Can you post the original model?

0 Kudos
awei
by
New Contributor III

If other people have similar question, xfrog and Turbo squid are good places to find plant models! 

0 Kudos
CherylLau
Esri Regular Contributor

What is in the .mtl file?  What should the tree look like?  Can you post the model (eg. .obj, .mtl, and related texture files)?

0 Kudos
awei
by
New Contributor III

so I was able to use model that I downloaded online. However, they're too heavy. Each model is about 10-20 MB, and I have to generate hundreds of these.

When I apply the rule, there's no error at all, but I notice that CE just generated a tiny portion of trees. The LumenRT's plant library is really light, I wonder how I could reduce my model size.. I tried to use cleanupGeometry commands but seems doesn't help. Can I do this quickly in CE? Or I have to manually import/export in other 3d modeling software

0 Kudos
awei
by
New Contributor III

I just stopped using the models that are too big, but it still stops the loop after a few loops, I have no idea why....

0 Kudos
CherylLau
Esri Regular Contributor

You could reduce the complexity of a model using the reduceGeometry() operation, or you could do this in another 3D modeling software.

reduceGeometry Operation 

0 Kudos
awei
by
New Contributor III

My generation just stops after a certain number of loops....I think it isn't related to the model size. Could you look at my code?

/**
* File: viff.cga
* Created: 7 Nov 2017 20:05:46 GMT
*/

version "2017.0"
_getMix = "Sugar_Maple;12;20.652872772912;5.554958664000001;0.2203;Sugar_Maple;10;20.683350410712;5.719611624;0.2233;Sugar_Maple;24;27.924276874728;5.884264584;0.2263;Sugar_Maple;33;32.670674562;6.048917544;0.2293;Sugar_Maple;52;41.582897113440005;6.213570504;0.2323;Sugar_Maple;6;14.862108588144002;4.91281212;0.2086;Sugar_Maple;5;13.832673407496001;4.74815916;0.2056;Sugar_Maple;5;12.996153544344;4.5835062;0.2026;Sugar_Maple;5;12.226485523104001;4.418853240000001;0.1996;White_Ash;8;22.268444504424004;6.213570504;0.2323;Red_Maple;4;14.197410260952001;4.91281212;0.2086;Sugar_Maple;18;23.319306299064003;5.554958664000001;0.2203;Sugar_Maple;17;23.611461152904;5.719611624;0.2233;"


@StartRule

PlantMix -->
Ground_Cover.GroundCover
PlantMix(_getMix)

PlantMix(mix) -->
case mix != "":

print (listFirst(mix))
print (float(listItem(mix,1)))
print (float(listItem(mix,2)))
print (float(listItem(mix,3)))
DistributePlant(listFirst(mix),float(listItem(mix,1)),float(listItem(mix,2)),float(listItem(mix,3)),float(listItem(mix,4)))
cleanupGeometry(all, 0)
reduceGeometry(0.8)

PlantMix(listRange(mix,5,100)) # recursive call until list is empty
else:
NIL


DistributePlant(plant,number,height,radius,contagion) -->
20%:scatter(surface, number, gaussian,center,contagion*5000){ TREE(plant,height,radius) }
20%:scatter(surface, number, gaussian,left,contagion*5000){ TREE(plant,height,radius) }
20%:scatter(surface, number, gaussian,right,contagion*5000){ TREE(plant,height,radius) }
20%:scatter(surface, number, gaussian,front,contagion*5000){ TREE(plant,height,radius) }
else:scatter(surface, number, gaussian,back,contagion*5000){ TREE(plant,height,radius) }

NIL

TREE(plant,height,radius) -->


case plant == "Quaking_Aspen":
33%:
alignScopeToAxes(y)
r(0,rand(0,360),0)
setPivot(yzx,0)
center(xz)
s(radius,radius,height)
i("assets/Plants/" + plant +"/"+"SH10_1.obj" )
Tree.

33%:
alignScopeToAxes(y)
r(0,rand(0,360),0)
setPivot(yzx,0)
center(xz)
s(radius,radius,height)
i("assets/Plants/" + plant +"/"+"SH10_2.obj" )
Tree.

34%:
alignScopeToAxes(y)
r(0,rand(0,360),0)
setPivot(yzx,0)
center(xz)
s(radius,radius,height)
i("assets/Plants/" + plant +"/"+"SH10_3.obj" )
Tree.


else:
NIL


else:
alignScopeToAxes(y)
s(radius,height,radius)
r(0,rand(0,360),0)
i("assets/Plants/" + plant +"/"+plant +"_Model_0.obj" )
center(xz)
Tree.

0 Kudos