3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2 3 ... 5

Author Topic: Terrain Shader Editor (in progress)  (Read 10974 times)

« on: December 29, 2009, 02:53:25 PM »
I've been working on terrain texture splatting and after playing around with the heightmap shader, I started working on a general terrain shader.

Features I will (try) to include is :
-------------------------------------
1. 4 base textures splatted based on heights. (sand,grass,rock,snow) you can ofcource change this.
2. (slider) Adjustable blending, blend as much as you want.
3. (slider) Adjustable heights on all base textures.
4. (slider) Adustable thickness (how wide is the rock belt)
5. (slider) Adjustable UV repetitions. (makes everything look good up close)
6. (slider) Adjustable specular lighting
7. (slider) Adjustable normalmapping (not started yet..)
8. Export shader settings to use with a terrain shader plugin.

Here is a early shot :


« Reply #1 on: December 29, 2009, 05:20:33 PM »
that look awsome shadmar! I'm sure it will be very useful!
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11
« Reply #2 on: December 30, 2009, 07:50:40 AM »
kickass tools as USUAL shad :)
Look into my eyes , Tell me what you see
You don't see a damn thing , 'cause you can't relate to me
You're blinded by our differences , My life makes no sense to you
I'm the persecuted one , You're the red, white and blue
« Reply #3 on: December 30, 2009, 07:53:20 AM »
Shad, you and Gene are really helping push 3DRad to the next gen! awesomeness!
« Reply #4 on: December 30, 2009, 08:21:49 AM »
Looking sweet! :o
Roll out!
http://www.youtube.com/watch?v=VD8MvMaPNO4

Do you have kids between the ages of 3 and 9?

http://www.amazon.com/dp/B007K1EFC6
« Reply #5 on: December 30, 2009, 09:44:40 AM »
Thanks for the comments :)
I also plan to have a load .x button working so you can try different meshes without having to import them to rad.


Here are some specular lighting tests on Fernando's default terrain0100.x using 3 of 4 base textures. (skipped grass)

« Reply #6 on: December 30, 2009, 02:11:45 PM »
 ;D Great Shadmar,
 isn't it possible to save a .x File?
I mean it's only a ASCI Textfile with a header and coordinates and path to the texture.
So it should be possible to generate a mesh and save it, but for visualising we need a 'Line' or 'Draw' command!
I think the 'Chain' Object could be good for it, so we can make a simple Terrain maker by 3DRad itself and export it to Rigidbody and Skinmesh automatically.
A Shader maker can modify the Textures later...
Newbie friendly and comfortable and the best: it could provide the 'Snap' function if Fernando tells us the secret how to...  ::)
 
best regards
 3DSim
 
new forum search:
http://www.google.com/ site:www.3drad.com searchword  ( <-- copy )
3DRad is now in the same Brain-Area like my old C64 and Amiga Memories!
« Reply #7 on: December 30, 2009, 02:57:50 PM »
You can do vertex displacement in the shader, so all we need is to save the vertex-shaded mesh to .x and you got an editor. (I think  ???)
« Reply #8 on: December 30, 2009, 03:12:06 PM »
Because what is processed by a shader isn't accessible by the CPU, and it also basically only exist as a rendered image on screen, there is no way to generate a file from it unfortunately.

Keep in mind that what a shaders does is real-time generation of what you see. It may not (and usually is not) something you can define as a 3d model and some textures applied to it.

The editor should instead output the effect as a script that anyone can simply apply to their SkinMesh objects.
« Reply #9 on: December 30, 2009, 05:59:08 PM »
but you can use the shader for a visual feedback of what you define with the sliders.
then you calculate a 3d mesh (invisible) based on the slider values and save it to a textfile in format of .x
the texture can be saved also saved as textfile in fomat as a loadable script.
 
 
new forum search:
http://www.google.com/ site:www.3drad.com searchword  ( <-- copy )
3DRad is now in the same Brain-Area like my old C64 and Amiga Memories!
« Reply #10 on: January 02, 2010, 06:16:57 AM »
Small progress update :
I was really busy trying to make my own specular-bump shader, but lighting got really screwed so I just adapted genetransfers excellent phong-bump-spec shader to my terrain shader. :)

Shader now takes 8 textures

4 Bases :  sand,grass,rock,snow
4 normalmaps (1 for each base)
Adjustable UV's for each individual texture and normalmap


« Reply #11 on: January 02, 2010, 08:50:12 AM »
C-O-O-L :P
« Reply #12 on: January 02, 2010, 08:56:00 AM »
how the shader read the image that apply the displacement map?

would be possible to read that image another way that... mm let us know the color values (black, white, greys) so a little script that write a .x file bassed on that  displacement map can be done?
« Last Edit: January 02, 2010, 08:57:32 AM by loop »
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!
« Reply #13 on: January 02, 2010, 12:59:09 PM »
Since we can't export .x or a vertex shaded mesh, I removed the heightmap part.
This is only for texturing terrain meshes, then export the shader for use with terrain skinmesh.
« Reply #14 on: January 04, 2010, 03:00:51 PM »
Another shot from progress, it's looking good :)

Added load any .x from anywhere to quickly shade/texture your terrains without having to import.
Added RGB adjustable values for all 4 textures
Added adjustable phong and specular power
Added adjustable lightvector.



Only thing missing now are load routines for textures, and the export shader functionality + some finetuning.
And a tutorial + shader plugin to use with the export,

This probably won't be in the initial release but...
I'm also looking into adding 1 or 2 alpha maps (ex: to get highly detailed roads/asphalt textured and uv'd in the shader.)
Also slope texturing, rocks on slopes steeper than value x, grass on flats etc.. but I haven't done any research yet.
Pages: [1] 2 3 ... 5