categories:
Render
description
Hi Quest3D Users,
I wrote a tutorial teaching how to build a 3D landscape-game-type in Quest3D. You will need the following softwares to do the ENTIRE work:
-T.ED Professional http://www.d-grafix.com/?page=ted
-Okino Polytrans http://www.okino.com/conv/conv.htm
-3D Studio Max 8 or 9 http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=5659302
-Panda Exporter http://www.andytather.co.uk/Panda/directxmax_downloads.aspx
-V-ray Advanced 1.5 RC3 http://www.chaosgroup.com/software/vray/
-Adobe Photoshop http://www.adobe.com/products/photoshop/
-Quest3D 3.6.3 http://www.quest3d.com/index.php?id=13
P.s.: (but for this tutorial, only needed Quest3d, 3dsMax+V-ray, Panda Exporter and Photoshop).
It covers:
- How to paint and export vertex colors + vertex alpha in 3dsmax and export the result to Quest3D using Panda Exporter.
- How to render a scene using V-Ray Render in 3Dsmax and generate lightmaps using Render To Texture.
- How to import X meshes with vertex colors + vertex alpha data to Quest3D and apply diffuse and lightmap textures on objects.
Download the files here, if your download speed at this site isn´t good:
Tutorial File (9 Mb):
http://rapidshare.com/files/17502445/Landscape_Tutorial.rar
Before starting, it´s interesting to say that the Max Tutorial files already have a terrain mesh. It has 3 mesh layers that I generated using T.ED. Then, I exported it to "X with Vertex Alpha" and convert it to 3DS using PolyTrans. But you will not need to do this.( Terrain Editor Pro is a good software to generate terrain mesh layers, because it builds the surfaces in according to the texture area. Then, If I need 3 copies of my Terrain to display three blended surfaces with the traditional method, resulting in 3x7.938 polys or 24.000 polys, with Terrain Editor I have 1 opaque surface with 7.938 and 2 "alpha" surfaces with only the area covered by the texture ( 1 with 3.800 polys and 1 with 2.500 polys), resulting in 14.200 polys, what is cheaper for the gpu). But you can do this manually in 3dsmax, deleting the unwanted faces too.
Finally, I would like that anybody with a better English than mine rewrite the confuse parts of my text, because my English isn´t good Wink. And if anybody find an error, please, tell me.
Let´s start:
00- Decompress the archive "Landscape_Tutorial.rar" in C:landscape. (don´t choose other drive or folder!). Open "landscape_tutor_START.max".
01- Apply a shaded material on mesh (like Blinn) and light it. Attention: the light must illuminate ALL the mesh or the vertex colors will not display.
02- Select the mesh and go to "Utilities", "More" and click on "Assign Vertex Colors".
03- Select "Vertex Color","Lighting + Diffuse", "Color by Vertex", "Shadows", "Mapping" and press "Assign to Selected".
04- Click on mesh using the 3rd button mouse and "Convert to Edit Poly". Don´t use Collapse!!
05- In Edit Poly, go to "Selection" tab and select "Borders", select all, press CTRL (and continue pressing), go to "Vertex" (sub-selection mode) and open "Vertex Properties" tab (the 5th tab of Editable Poly).
06- In "Edit Vertex Colors", change the Color to something different from 0,0,0 or 255,255,255 to RGB values and type 0 for Alpha.
07- Apply a vertex painter modifier and select "Vertex Alpha" and "Color by Vertex". Don´t press "Assign button", however.( P.S: Unfortunately, you can´t export vertex colors or vertex alpha data properly to quest3d using panda exporter if you use the intuitive paint tools of vertex painter modifier, like brush, erase and those attractive tools. If you paint colors on mesh using that, the alpha information will be exported incorrectly).
08- Click on mesh and convert the result to Edit Poly. Save your work in "landscape" directory.
If you desire to generate a lightmap using V-ray, follow these steps (if no, Go to Item 09):
8.1- OpenGo to Rendering Menu, select Render and click on "Preset" (above the Viewport option). Select "Load Preset" and load "landscape.rps" in "landscape" folder.
8.2- Select all meshes and press 0 on your keyboard ( [ not in the numerical pad ]! It will open "Render to texture" dialog box).
8.3- Type C:Landscape (in "Path:").
8.4- In "Objects to bake" section, check "Use Automatic Unwrap" and type 3 to "Channel".
8.5- In "Output" section, clik on "ADD" button, select "VrayRawGlobalIlluminationMap" and press the button "Add Elements".Type 512 in "Size:". Press "Add" again, select "VrayRawLightingMap" and press the button "Add Elements". Type 512 in "Size:" too.(P.s: the default file format is TGA, but you can change to JPG, if your desire. However, you will need to change the format of each map of each mesh layer. I prefer generate in TGA and convert to JPG with ACDsee.
8.6- In "Baked Material" section, check "Render to Files Only".
8.7- Press "Unwrap Only" button to generate only the Unwrap UVW maps.
8.8- Make this with each mesh layer, separately:
8.8.1- In automatic Flatten UVs modifier, click on "Edit" button. It will open "Edit UVWs" dialog box.
8.8.2- Go to "Tools" menu and select "Pack UVs".
8.8.3- Select "Recursive Packing" and type 0,01 in "Spacing". Check all box options and press "ok" button. It will pack UVs for a best usage of texture, providing a better quality.
8.9- Select all meshes again, press "0" in your keyboard ( not in numerical pad).
8.10- Open "Objects to bake" section and check "Use existing Channel" in "Mapping Coordinates" section (since We already generated the UVs). Type "3" for "Channel:" and press "Render" button. It will generate 2 maps for each mesh layer. The "VrayRawGlobalIlluminationMap" (providing the indirect illumination from the scene elements, including skylight and color bleeding) and "VrayRawLightingMap" (including direct lighting [sun, for example] and shadows).
8.11- Start Photoshop, open these two different maps, select the "VrayRawLightingMap" image, select All (CTRL+a) and copy (CTRL+C). Then, select the "VrayRawGlobalIlluminationMap" and paste (CTRL+V) on it. For Layer 1, in Layers Tab, choose "Screen" instead "Normal". Finally, merge the two layers (CTRL+E) and apply a Blur Gaussian Blur filter with 0,7 of radius (don´t use ".", use ","). Access the Leves editor, pressing CTRL+L and play with them until you feel satisfacted ( I used 0 - 0,55 - 255). Save the image in JPG on "Landscape" folder. Repeat the entire process with the 2 different map types for each mesh layer.
09- Export the mesh in X format to QUest3D using Panda Exporter (don´t forget to mark "Vertex Colors", "Mesh Normals" and "Mapping Coordinates" in "3DS Max Objects" tab and uncheck "Left Handed Axis" in "X File Settings" tab).Save the X file in "landscape" directory.
10- In Quest3d, Import the X model (mark Flip Y Z) and check "Load textures from same folder etc", go to Object Section and select the two alpha mesh layers (don´t select the opaque layer!).
11- Now, in Surface tab, set its transparency to "Texture Alpha Image (last stage)".
12- In stage 1, select these options:
Color Blending (Advanced):
Arg1: Texture
Op: Modulate
Arg2: Diffuse
Alpha Blending (Advanced):
Arg1: Texture
Op: BlendCurrentAlpha
Arg2: Diffuse
13- To provide more realism to your landscape, put the Lightmap generated by Vray on stage 2.Let´s do this step by step:
13.1- Open the file "landscape_tutor_end._with_vray_lighting_END.max" and Repeat the step 09, saving this X file with other name, like "landscape_lm_01.x".
13.2- Repeat the steps 10 with "landscape_lm_01.x". Repeat steps 11 and 12 too.
13.3- Note that the diffuse textures were not load. Select each mesh layer. Go to "Textures", select "landscape-with-lightmap" in "Texture ChannelGroup (it will copy the texture to that group). Press the button "Load", go to landscape folder, select the respective texture, press "Open" and click on the loaded texture thumbnail to apply that to its respective mesh. Repeat that with all the meshes.
13.4- In "Textures", select "Texture stage 2". Repeat the entire process of step 13.3, loading each lightmap texture to its respective mesh. After that, don´t forget to select All surfaces ( in Object Section) and, in "Properties" tab, set the three emissive values to 1. Otherwise, your model will not be illuminated, since there is no light in the scene (what is normal for a lightmapped scene).
13.5- Finally, go to "Texture Stages","Texture stage 2", select All surfaces and change the Mapping to UV Set 1 (the UV mapping coordinate for lightmap is UV1. The UV0 is the mapping coordinate for the diffuse tilemap texture).
13.6- Open "Color Blending" (Advanced) and select:
Arg1: Texture
Op: Modulate2X
Arg2: Current
13.7- Open Alpha Blending (Advanced) and select:
Arg1: Texture
Op: BlendCurrentAlpha
Arg2: Diffuse
13.8- Note that the opaque_layer is very bright. To correct that, select the "opaque_layer", go to Stage 2, open "Color Blending" and choose "Modulate" instead "Modulate2X" for op.
13.9- You can change the number of UVs for each tilemap texture to adjust the repeating. Go to Stage1 and change the Mapping to Planay Y. Now, you can adjust the repeating for UV0 using the "Scale" button. However, don´t change the Mapping of a Lightmap (stage2, UV1), that is always imported ( Mapping: original set).
14- The Graphical Art isn´t ideal ( I didn´t have time). So, it´s interesting to generate others lightmaps, adjust the fog and bloom parameters etc.
Hope it helps,
Marco Eduardo.
requirements

Quest3D Version 3.6.6 - Creative Edition
|
|
|
|
You have to login to download this file!
|
comments:
Error while transmitting data! (ERROR 973) - Please try again!
Comment on this tutorial
Wooow,Great Tutorial.Thank you so much for spending time and providing us with such a nice step by step tutorial.