mikebart 1 Posted February 20, 2010 Dont be sorry, the more the merrier :), the normals are getting screwed when loaded into O2, yeah it seams the working plane is ok on all other transforms but the vertex normals. I can import an .obj from maya with working projected normals into O2, but its without UVs, and i havent had any luck copying from 1 model to another. If you're interested in having a look, check out the link i posted a few pages back, it has some samples in different formats exported from different programs. Share this post Link to post Share on other sites
Synide 0 Posted February 20, 2010 I can import an .obj from maya with working projected normals into O2, but its without UVs, and i havent had any luck copying from 1 model to another. hmmm, which .obj was that? must'a missed that one... Share this post Link to post Share on other sites
PuFu 4600 Posted February 20, 2010 I can import an .obj from maya with working projected normals into O2, but its without UVs, and i havent had any luck copying from 1 model to another. If you're interested in having a look, check out the link i posted a few pages back, it has some samples in different formats exported from different programs. I'll have a quick look later on. 3dmax2010 has a list of editable presets for exportin obj, never had an issue with missing UVs. talking about this one, yes? i've uploaded a few samples to the internets for if anyone wants to have a play around with them, you'll notice strait away if you import the 'EnglishElm_maya.obj' into modo that the vert normals are projecting from a center but it has no UV information, when I import the same file into 3dsmax the vert normals reset to default and no UVs too. VertProjOut_samples.rar Share this post Link to post Share on other sites
mikebart 1 Posted February 21, 2010 (edited) hmmm, which .obj was that? must'a missed that one... Actually it might not have gotten in there, sorry i've lost track of all the exports i've done, it all got a bit muddled up. talking about this one, yes? yep thats the one I meant, but never mind about checking those out. I actually managed to get it imported into O2 from maya .obj, with vert normals and UVs working fine, I hope i didnt waste too much of your time with this Synide, Pufu or anyone else who looked into it, sometimes its the simplest things that elude me with this stuff, thanks for all the help guys. heres how i managed to do it; exported from maya to .obj, made sure normals were ticked in the 'freeze transformations options', imported to O2, selected all verts, opened 'points, propertys' and locked the vert normals through there, otherwise they get unified on saving the .p3d or with any other adjustments aswell, e.g copy and paste, unifies vert normals if they're not locked, thanks for making me aware of that flag Synide. I guess its not over yet till I binarize complete with other lods, I also need to see how well I can match the projected vert normal effect with the other visual lods. one disadvantage is that due to the direction of the vertex normals I cant use the NormalMapSpecularThrough vertex shader, which uses noise in the alpha channel of the _NON normal map to fade foliage planes when they align adjacent to view, and fades the foliage when it hits the near clipping plane. So i have to use NormalMapSpecularThroughNoFade instead, which is ok i think because of how the foliage is rendering you dont really notice the "plane spikes" so much and It still fades between lods. left: unified vertex normals, right: Projected vertex normals with VertexShaderID="NormalMapSpecularThroughNoFade" you can see here what happens when I use the fading shader. left: unified vertex normals, right: Projected vertex normals with VertexShaderID="NormalMapSpecularThrough" I hope I can get the lods looking something like this off in the distance, you'll notice the foliage looks quite volumetric, and they also receive light dynamically. Theres only one lod at 1360 points at the moment but its only a small tree, it has much better use of UV space and vert count than my previous attempt, so I feel a bit more comfortable about completing the tutorial now. Ill probably start the tutorial again from scratch, I plan on making another large version of the tree eventually too. Here are 2 samples, one with unified vert normals and one with the projected ones. Download elmSmall_samples Edited February 23, 2010 by mikebart Share this post Link to post Share on other sites
Synide 0 Posted February 21, 2010 That's great news mikebart, well done. Best things come to those that persist and I'm whole heartedly pleased you proved my gut feeling wrong. Can you post a link to your .obj, I'd like to dissect it and the importing of it into O2 at some point when time allows. Just had a look at your .p3d, 1300 faces and looks good to me... again, well done. Share this post Link to post Share on other sites
mikebart 1 Posted February 21, 2010 (edited) Can you post a link to your .obj, I'd like to dissect it and the importing of it into O2 at some point when time allows. heres a new version of the .p3d with visual lods 1,2 and 3, it also includes the .obj exported from maya. elmSmall_with_lods.zip Thanks again for all the help synide, but I got to say, we're not out of the woods yet! (excuse the pun) I think theres going to be a fair bit of work to do on the lods to get them looking ok, Lod2 is playing up for some reason the textures flashing from light to dark as you move around it, probably something with the geo, ill check it out through the week. And they're actually not fadeing between lods properly now that im using the "NormalMapSpecularThroughNoFade" shader, which could be the killer, you'll notice if you place the Elm_small_VertNormalsProjOut.p3d in visitor, run bulldozer theres some serious lod popping going on, although when you move towards or away quickly you'll occasionally see a lod fade in or out. edit: fixed; was due to low object detail settings. Edited February 25, 2010 by mikebart Share this post Link to post Share on other sites
quiet_man 8 Posted March 4, 2010 Thanks again for all the help synide, but I got to say, we're not out of the woods yet! (excuse the pun) that's a good one :cc: one question: Do you think the way you try to get the trees done is the one for the future? Or are the BIS trees the future and they are only a bit ahead of "time" (= hardware)? QuietMan Share this post Link to post Share on other sites
mikebart 1 Posted March 5, 2010 (edited) I'd say the altered vertex normals for dynamic shading + lightmaps for ambient shadow and colour variation would be the way to go for the future. I dont really know about BIS trees being a bit ahead of time, they're the nicest looking trees i've ever seen in a game, and that game has a 10 km veiw distance at a FPShooter level of detail, so yeah they do pretty well I think, obviously the guys making them know what they're doing, but sometimes in a production environment you simply dont get time to try out every idea that comes to mind, or maybe they did try projecting vert normals but dropped it for fading foliage planes. One negative about using the altered vertex normals means that the foliage planes will no longer fade properly when they become adjacent to the player or when they hit the near clipping plane, so thats the only loss i can really think of, everything else about them is a visual gain with no extra cost, and they still fade normally between lods. from looking at some of the normal maps from the BIS trees, ive think they're either overlaying a normal map of a sphere over each peice of foliage or, each peice of foliage has projected vertex normals and they've rendered them to texture, so who knows... left; mikes projected vertex normals, right; BIS vertex normals. but if it walks like a duck and it quacks like a duck, then maybe it is a duck. :cc: im glad you appreciated my pun quiet man, for a while there i thought i'd killed the thread with it. Edited March 5, 2010 by mikebart Share this post Link to post Share on other sites
BadBenson 0 Posted March 7, 2010 just wanted tell all 3ds max users who want to try this out that there is a script for max which lets u do the same kind of normal transfer. here's the link: http://www.scriptspot.com/3ds-max/scripts/normal-thief Share this post Link to post Share on other sites
mikebart 1 Posted March 7, 2010 just wanted tell all 3ds max users who want to try this out that there is a script for max which lets u do the same kind of normal transfer.here's the link: http://www.scriptspot.com/3ds-max/scripts/normal-thief have you tried it out? man, I've scoured script spot looking for something that does this for max. ill test it out later, thanks for this. Share this post Link to post Share on other sites
bad benson 1733 Posted March 8, 2010 i made a lil test using the script. seems to work. left default (arma1 sample model) right custom normals Share this post Link to post Share on other sites
mikebart 1 Posted March 8, 2010 nice one, is that in bulldozer?, I didnt spend too much time with it, but I had a go with a 1000 vert peice of foliage and it took a very long time to process, but the results were the same, did you try importing to O2? my normals were unified in oxygen when i imported from .3ds, and O2 crashed when i imported as a .obj. Share this post Link to post Share on other sites
bad benson 1733 Posted March 8, 2010 yeah this is a buldozer shot. i exported as obj and i unchecked the optimization stuff cuz i didn't want anything changed. not sure if that did the trick cuz i'm not that familiar with all the theoretic stuff being discussed here. i checked after saving in o2 and the settings are still there. i think i made that lock normals stuff u described too. btw in case u didn't know, u can use another script to make the sphere fit the shape of the tree crown (like u did on one of those maya screenshots) named retopo before running the normal script. Share this post Link to post Share on other sites
trezza 10 Posted April 18, 2010 I'd be interested in creating an Australian tree set for arma2, the modeling looks difficult and complex, too many things in one place, I'm not good at difficult and complex but I'd be willing to go out with my camera to find native trees and snap some shots of the bark, a whole tree from a few different angles and also spend some time picking off leaves and twigs of a few branches until i have a flat branch which I could take a photo of against a flat surface all to help with the textures, most eucalyptus trees are quite tall with long trunks so you wouldn't need to worry too much about the detail of the leaves because they all grow at the top. Also the grass could be replaced, in the Australian bush I've found that the forest floor is mostly small ferns or bracken, the grass grows in tufts more often than a complete layer of grass like in chernarus. If anyone with plant making experience is interested then PM me and tell me what is needed. I'd like to have a go with an authentic Aussie island for arma2! Share this post Link to post Share on other sites
mikebart 1 Posted April 21, 2010 Sounds good trezza, I think it would be a good idea to make a new thread for this sort of thing and post up some photos, ill post up some of mine as well, call it the 'vegetation reference thread' or something :). I loosely explained what I look for personally when taking photos of trees for modeling/textureing in this tutorial. But i'd recommend going through the BIS tree textures found in Arma1 and 2, just to get an idea of the sort of leaf density and shapes you should be looking for in photos. The thing with Gum trees though is that the leaves are always drooping downwards, so i think that should be an important thing to keep in mind while modeling them (something covered in that tutorial), and thats why it should be made from scratch i think, as none of the BIS trees would be suitable as a template. Gum trees have been on my 'to do' list for quite a while now, just havent quite gotten around to it, but the projected vertex normals (explained a few pages back) would be ideal for this type of tree. So i'd be happy to help out with this. Share this post Link to post Share on other sites
mikebart 1 Posted May 16, 2010 (edited) >>>>>>>Download tree[d]<<<<<<< Hey again. I've been playing with tree[d] since my Max attempt turned out rather crappy, and it's a lot better than it seemed at first glance. Branches look a bit mechanical sometimes, but that's probably due to the settings used. The images above seem to me like they could be used on a polyplane right away. Only issues are that the lighting doesn't seem to be editable, the built-in RTT is limited to 512x512 for some reason, and you can't really do the normal/spec maps properly off of the above images. It exports fine to OBJ and I was able to load it up in Max. After some fiddling with the alpha on the leaf textures it looks just like the tree in the program, however I can't seem to recreate the lighting. It also seems like you lose the random leaf color variation when exporting, as they're all mapped to a single texture. I'm not too experienced with Max, though, so all of that might be fixable, and then you could use your projection baking method to get polyplane textures. It generates pretty good trunks and branches, too, so you might be able to use the exported mesh as a base for the ingame trunk model. It's a pretty awesome little program and it's great they're giving it away even though it's apparently been worked on for close to ten years. looks great!, thanks for sharing, the only problem with using the projection baking in max is that alpha channels don't get included in the render, so you end up with lots of planes for leaves, unless you use this method: http://www.bencloward.com/tutorials_normal_maps11.shtml basically you manually setup all the lights for you're normal map and render from a camera. its a bit of a pain but once you have all the lights setup properly then you can just save them as a .max and merge them into your scene when you need them. Just to save you a bit of time, heres my setup: normalmap_lights.max and heres my lighting setup: diffusemap_lights.max its pretty simple really but its enough i think for the render. or you can use modo for you're baking, modo includes alphas in its projection bakes and its very easy to use, maya might work too, not sure though i havent tried. about the random colour variation, im not sure of a quick way to do that in max, you could try adjusting vertex colours on randomly selected leaves, or applying a lightmap on a second UV. you might also find a script out there that does something like that. Edited May 16, 2010 by mikebart Share this post Link to post Share on other sites
cctoide 0 Posted May 16, 2010 (edited) Thanks a lot for the scenes, I've managed to get a generated branch properly diffuse and normal mapped. Looks great. Also, I found a couple other generators that look pretty good: ngPlant seems to be basically a fancy 3D L-system interface, it's slightly more flexible than tree[d] though the preview isn't as good. This might be good for generating smaller plants (e.g. fern leaves, weeds, etc.). You can have as many branches and sub-branches as you like, and more than one branch per level. Branches can also be triangles, quads or tubes. There aren't "leaves" per se, they're just branches with a different mesh and texture. Exports to OBJ. No restrictions on output that I can tell. powerPlant looks good but I haven't managed to get it running, the batch script it creates tries to run it via a command that doesn't exist, even though I have Java installed. Will check it out later, I guess. Edited May 17, 2010 by cctoide Share this post Link to post Share on other sites
mikebart 1 Posted August 12, 2010 Hey guys, I just found some more information about vertex normals in regard to vegetation, for those of you that didnt fully understand what they're all about, someone has written a tutorial with some useful data explaining the purpose of vertex normals and how to manipulate them in 3dsmax/maya, theres also a link to "slideNormalTheif", which is pretty much the same as "normalTheif" the one BadBenson posted a link to previously in this thread, except its super fast :) http://wiki.polycount.com/VertexNormal#What_Is_a_Vertex_Normal.3F @cctoide, thanks for the links! Share this post Link to post Share on other sites