project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
19 Nov 2019, 00:00:00 (PRT)
Register Developer Blogs Project Reality Members List Search Today's Posts Mark Forums Read
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2009-11-03, 11:54   #11
[R-DEV]​Rhino
PR:BF2 Developer
Supporting Member

Rhino's Avatar
Default Re: [Tutorial] Making and exporting overgrowth

its not directly controllable no. But it can be slightly controlled via the size of the object I think.

Rhino is offline Reply With Quote
Old 2009-11-03, 22:27   #12
[R-DEV]​Insanitypays
PR:BF2 Developer

Insanitypays's Avatar
Default Re: [Tutorial] Making and exporting overgrowth

Okay, now how do you delete it? I tried to and I cant delete any of my overgrowth.


"Go to Heaven for the climate, Hell for the company." -Mark Twain
Insanitypays is offline Reply With Quote
Old 2009-11-04, 12:09   #13
Amok@ndy
Retired PR Developer
Supporting Member

Amok@ndy's Avatar
Default Re: [Tutorial] Making and exporting overgrowth

then you should go to bfeditor.org and try some tutorials about over/undergrowth !

this tutorial is about creating a tree and not about over/undergrowth in the editor


Amok@ndy is offline Reply With Quote
Old 2015-11-24, 15:28   #14
[R-DEV]​Outlawz7
PR:BF2 Developer

Outlawz7's Avatar
Default Re: Making and Exporting Overgrowth

Creating the final LOD

This post picks up where original post ends.

What you'll need:
-3ds Max 9 with PoE2 and PR Max tools installed and set up
https://www.realitymod.com/forum/f18...s-v0-40-a.html
-Photoshop CS3 or higher with DDS plugin for Photoshop
https://developer.nvidia.com/nvidia-...dobe-photoshop

- a finished tree/overgrowth model in need of a final LOD



Load up the 3ds Max scene with your tree.
Open the Material Editor (press M).
You should have at least two materials for your model, a tree bark and a leaf material.

Your bark material should be a BF2 static mesh material with the bark texture on channel 2, with channel 2 visible.

Your leaf material or materials should be Standard material with your leaf texture loaded as diffuse (blue line) and opacity (green line). Click and make sure Mono Channel Output is set to Alpha.

Your Ambient and Diffuse color (red line) should be black (completely black, not gray).



Your viewport layout should be Top, Front, Left and Perspective (as can be seen in the picture).

We'll start by making a quick render to grab the background color.

Select your Front viewport then click the Quick render (production) buttom to make a quick render.





Zoom in your viewport (by mouse scroll) until the tree fits the render then save using the disk icon.



Save the render as TGA to your desktop (or some other place you can access it easily) then open the saved TGA in Photoshop. Using the sample tool, grab the color near the edges of the tree.



Switch back to 3ds Max and go to Rendering>Environment (or press 8 ). There set the background color to the RGB value of what you got from the sample tool and close the dialog.



Open the Render scene dialog again and under Common Parameters, make sure "Force 2-Sided" is enabled. Set the render size as 300x300. Then press the Render button to make a new render which should now have background color of your sample. Make sure the render fits as before.



Save the render as TGA with alpha enabled and name it accordingly, this case it's the front viewport render, then repeat this process for the other two viewports (select viewport, render, save).



Open all three saved renders in Photoshop then create a new image (File>New or Ctrl+N), sized 900x300 and RGB 8-bit. In the new image, go to Channels tab then click Create new channel to add an Alpha channel.



Select your first opened image, go to Channels tab and select the RGB channels, press Ctrl+A to select the image with the Rectangular Marquee tool and copy. Switch to new image, make sure RGB channels are selected and paste then align with Move tool.



Switch to the image you just copied and switch to Alpha channel. Copy then switch to new image, make sure Alpha channel is selected and paste then align.



Repeat last two steps for other two renders. Enable both RGB and Alpha channels to ensure there's no misalignment. Switch to Layers tab and flatten your image (or Layers>Flatten image). Your result should be this:



(Disregard white lines seen in RGB channels, screenshot was taken before I actually flattened the image. And that's why you flatten it.)


Now right click on the top bar of your image window and open Image size dialog (or press Alt+Ctrl+I). With Constrain proportions enabled resize width to 512.



Create a new 512x256 image, RGB 8bit.
(make sure it's RGB, sometimes with Alpha channels last selected the new image dialog gives Gray 8bit instead)

As before, create an Alpha channel on new image then copy RGB and Alpha channels
from your resized render to the new image. You should not need to align, keep the image where it's pasted in the middle.



With sample tool take a sample of the background color then fill the transparent bits with bucket tool.



Save a .psd for backup, then name your image as yourtreename_lod and save your image as .dds, DXT5 with all mipmaps into the directory where your tree's other textures are located, for me in this case C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\objects\vegitation\pr\textures.

You can now close Photoshop and switch back to your 3ds Max scene of your tree.

Open Material editor and make a new standard material using your newly saved render texture, diffuse only.

Freeze your tree so you don't select or modify it by accident.

Start creating a new plane that fits your tree in each of the three viewports you rendered (top, left, front). Make sure plane has only one lenght and width segment (one poly/two tris plane).

Don't worry if it doesn't fit right away, convert to editable poly and move the edges to align. Make sure the plane is in the middle of the tree trunk.



Once you've created all three planes, attach them together and apply the material using the render texture then unwrap UV on channel 1.



In the Edit UVW window, go into Face selection mode, then Mapping>Flatten Mapping and uncheck Normalize clusters. This ensures the UVs aren't scaled according to the image we'll load soon.



At top right of the Edit UVW window where it says Checker Pattern, click to get the drop down list and select our texture. Zoom out to see all the UVs.



I won't cover basics of UV editing here, so edit the UVs to fit the texture, top render to top plane etc. Make sure the UVs do not touch the edge or go over the border. UVs must be inside the 0-1 range (no tiling). Enable Smooth+Highlights on all viewports to adjust the renders to fit the frozen tree model. Rotate, don't flip UVs. Make sure the trunk part of render fits the trunk.



With the UVing complete, name your model as your render texture, yourtreename_lod and center its pivot point.
Do not move the model after adjusting pivot.



Open the BF2 Utilities and use the StaticMesh button to set the model up for export.



Export the model to the same directory as your tree using the BF2 Exporter.

Once exported, open the directory where the model was exported to, cut the .con and meshes folder in it and paste them to your tree's folder.



With the lod model done, your tree is now ready to be used in BF2 editor.

Outlawz7 is offline Reply With Quote
Reply


Tags
exporting, makeing, making, overgrowth, tree, tutorial
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 21:19.