Author |
Message
|
bharatnag |
Posted: Sun Mar 02, 2014 9:54 pm Post subject: Terrain For Games - Learnings |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
I'm building a terrain for an upcoming mobile game from our studio (Threye). So this thread would be about me finding a way around to do certain things inside Grome. To start with, I plan to add in some features like Train Tunnels and rock arches in my terrain. Doing these things in a 3d package externally is a fail safe way to go about integrating them, but it would be great if I could somehow do it inside Grome, which would further allow me to take advantage of the single mesh export from Grome with LODs.
So Is there a way to cut tunnel HOLES inside Grome?
Also, is there a way to import meshes (such as cliff rocks, rock arches) and merge them into terrains??
Or what is the best way to make these kind of rock arches in Grome?
Please take a look at the attached picture (Source -- Polycount.com) fto relate to what Im saying.
Thanks.
 |
|
Back to top |
|
 |
ALicu |
Posted: Mon Mar 03, 2014 8:21 am Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
For terrain, Grome supports (for now) only heightmaps. This means that terrain cannot have overhangs. So anything like this needs to be imported from external generic 3d modeling applications (using, for example, the built-in collada importer).
Grome supports ground holes layers. These are material layers with Ground Hole shading which indicates that where you paint it as black the terrain is invisible. This facilitates holes in terrain where you want to place entrances into caves, tunnels etc. Of course after export your engine must also support this kind of layer (for rendering and collision), this in case you are using heightmap based engine. In case you are using simplified meshes, you can paint the solid surface with a selection layer (so all surface except the cave entries) and, when generating the simplified meshes you can check "Clip unselected geometry" option so the cave entries are cut out from the final mesh.
Now, about the objects - terrain integration. There are some tools that help you with this. There is for example the object select tool which let you paint a selection layer with the footprint of the objects. Then using this footprint you can for example rise the terrain around object, apply various erosions only on that region, all to make the transition from terrain to objects more smoothly.
Also, at export, if you are developing your own plugin (using Grome SDK) you can theoretically merge certain objects into the terrain simplified meshes. You can even use the footprint selection regions to cut the simplified meshes under the objects to save geometry.
I hope this information helps.
Kind Regards,
Adrian Licu |
|
Back to top |
|
 |
bharatnag |
Posted: Tue Mar 04, 2014 1:08 pm Post subject: |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
Thanks Alicu for the reply. Im still to try the collada imported but it already sounds promising.
I have another question thats been bothering me for a while now.
How do you bake Decals into textures?? _________________ http://www.behance.net/bharatnag |
|
Back to top |
|
 |
ALicu |
Posted: Tue Mar 04, 2014 1:36 pm Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
For collada just use OpenCollada plugins (which can be found compiled for Maya, Max etc). The default plugins for 3DS Max for example, are very bad and export non-standard collada files. There are also various threads on this forum regarding many common issues with collada (e.g. Grome supports reading only triangles from collada so, if needed, you need to use the refinery tool to transform collada generic polygons into triangles). Just use the search function and "collada".
As for decals, are you referring to decal layers from Grome? These are layers that you can be used to imprint decal textures on terrain and objects. Their textures can be baked into a simple color layer at export time if you develop your own plugin. The Grome SDK has functions to create snapshot of terrain layers as seen from above. But be aware that in the process you will loose resolution as decals are usually of much higher resolutions than global textures stretched on entire terrain.
Kind Regards,
Adrian |
|
Back to top |
|
 |
bharatnag |
Posted: Wed Mar 05, 2014 8:57 am Post subject: |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
Yes I want the decal layers to be a part of the terrain textures to be later used in unity. But like you said the snapshot thing wont solve my problem as ill loose tremendous amount of resolution. And developing a plugin to do a simple task is a pain for an artist doing the job. What purpose do these decals serve if you cannot by default export them to with the baked textures or some kind of meshes with textures??(' ') _________________ http://www.behance.net/bharatnag |
|
Back to top |
|
 |
ALicu |
Posted: Wed Mar 05, 2014 9:03 am Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
But they can be exported as meshes with textures. The Grome SDK comes with functions to access the entire scene data, including decals. But the way you use decals (usually you cannot simply use them as geometry) really depends on your engine. So there is no default way to export them (in some sort of generic form). Clients needing them, need to develop their own save routines so they save / process them for their custom needs.
Our own engine for example (Graphite) exports the decals as geometry. Then in run-time it applies them with special depth bias (to not interfere with terrain) and fade them with distance and don't render them when far away (as the decal geometry can be very big and complex for many decals).
For some sort of simple decals, put in few places, you can indeed use simple geometry without any tricks. Maybe the collada exporter can be modified to also export the decals geomtry.
Baking them in some sort of global texture is never a solution. The decals were invented in the first place to add high texturing details on top of a coarser image. So baking them would defeat their purpose.
Kind Regards,
Adrian L. |
|
Back to top |
|
 |
bharatnag |
Posted: Wed Mar 05, 2014 9:43 am Post subject: |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
Hi thanks ALicu.
I understand what ur trying to say. I guess ill go with roads for the purpose of making runway strips for the flight simulator game im working on. And if something bugs me ill trouble you again hehe.
Regards _________________ http://www.behance.net/bharatnag |
|
Back to top |
|
 |
ALicu |
Posted: Wed Mar 05, 2014 9:46 am Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
Ok, no problem. Let me know if you need any additional support. I think roads are saved to collada file.
Kind Regards,
Adrian L. |
|
Back to top |
|
 |
bharatnag |
Posted: Mon Mar 10, 2014 9:42 am Post subject: |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
Hi.
OK so ive been doing some tests in grome and it has proved out to be a great tool for editing terrains and terrain data but Im facing a lot of troubles with the limited export options available. I want the decal layers and road layers to be exported as meshes with textures that can be then edited in our 3d application of choice (Blender). I tried exploring the Graphite Exported but its not giving me some native .tzone files. Please tell me if there is a work around for this problem.
Blender supported mesh formats:
some tests to begin with:
 _________________ http://www.behance.net/bharatnag |
|
Back to top |
|
 |
ALicu |
Posted: Mon Mar 10, 2014 9:45 am Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
For roads best is to use Collada exporter (dae files). You have an option there (in the plugin UI) to export roads geometry.
For terrain heightmaps, you can export as raw format (General Data Sets Exporter or Text Exporter) and assemble the material layers back in Unity using special shaders.
For terrain simplified meshes again best is to use Collada exporter as demonstrated on the Unity integration tutorials on site.
For decals, as stated previously, there is no default out of the box exporter. You need to create your own using the Grome SDK as decals rendering is a engine specific problem.
Kind Regards,
Adrian L. |
|
Back to top |
|
 |
bharatnag |
Posted: Fri Mar 14, 2014 6:49 pm Post subject: Making Road Textures |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
OK so have started working on the terrain or the mobile game. I used the road feature to draw out the main road network. No I need smaller roads that should not be geometric roads but textures. One way is to paint the mask manually but it would take a lot of time. Any suggestions for making road textures? I tried using a shape file but i dnt know where I went wrong and nothing went into the mask. What would be the best way here to paint random road networks as textures??
 _________________ http://www.behance.net/bharatnag
Last edited by bharatnag on Sat Aug 02, 2014 9:57 am; edited 1 time in total |
|
Back to top |
|
 |
ALicu |
Posted: Fri Mar 14, 2014 7:12 pm Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
If you have standard external shape files that you want to use you can apply ShapeSelect tool (from Terrain -> Selection tools tab) to affect a selection layer using an external shape file (.shp). To be noted that shape files are georeferenced (real world lat and longitude) so you need to properly select the georeference origin of your scene in order for them to match your terrain. So in general shape files are used for real world data (imported heightmaps etc). Once you have the selection layer affected by the shapes you can just paint an entire layer with this selection layer marked in use. The mask will be affected only the selection is present.
If you want to affect the mask directly with a shape file you can also use MaskGen tool, add a distribution mask that goes on the entire altitude, slope and orientation range, check Shape checkbox and indicate the shape file. The distribution mask will affect the entire mask via this shape file.
I don't know for sure if you really want to use shape files though. Shape files, as described above, are georeferenced format used mainly in simulation industry.
Maybe another better possibility, is to just use the roads tools as you did for the main road. First assign a selection layer (with the same resolution as the heightmap). Then assign a road layer for the road geometry that you've just added. Enter again in selection mode (press Selection button to become red in the layers view). Right click on the road layer you've added and select "Copy roads masks" (this appears only if you are in selection mode). Next go to your selection layer, right click on it and choose "Paste selection masks". Now the mask (influence) of the roads are pasted into the selection. Use the selection to just fill a material layer mask. Once you do this you can just delete the roads geometry (or keep it for future if you want to readjust it).
This last method I guess is the fastest. You just create geometry roads and then copy their influence into a selection layer that you use to finally paint your texture layer (with a simple fill while selection is in use).
Kind Regards,
Adrian |
|
Back to top |
|
 |
bharatnag |
Posted: Sat Mar 22, 2014 9:54 am Post subject: |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
Ya Now i have the selection masks. How do you apply a selection mask to a material layer??? I know its a stupid question but im stuck.... _________________ http://www.behance.net/bharatnag |
|
Back to top |
|
 |
ALicu |
Posted: Sat Mar 22, 2014 10:11 am Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1330
|
Hi,
Once you have the selection layer created, allocated to zones and filled with proper data, mark it as active (press the button next to it so it becomes red), now the layer is in use (as you probably already know).
Now all the heightmaps and texturing tools will apply their modifications only where this selection is painted. So to just fill the mask of a texture where the selection is present, for example, you can open the Mask Gen tool, mark your texturing layer in use, add a distribution mask (a default one would be white), change its altitude range (min and max) to something very small and very big (so entire terrain height range is covered), leave the slope between 0 and 90 degrees, assign the distribution mask to the texturing layer and apply the tool. The Mask Gen will paint the mask on the entire layer (is like a complete fill) but because the selection layer is also in use, it will affect only the selected areas.
Of course, you can also apply other tool, like for example create a very big Mask Brush and paint with it.
Kind Regards,
Adrian L. |
|
Back to top |
|
 |
bharatnag |
Posted: Sat Mar 22, 2014 11:22 am Post subject: |
|
|
Joined: 28 Feb 2014 Posts: 24 Location: New Delhi, India
|
|
Back to top |
|
 |
|