Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Some questions about Dark Shader and DBPro

Author
Message
Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 31st May 2011 00:53
Hi, people.
I haven't yet figured how to add a shader only to certain textures/colors in an imported object in Dark Shader. So how is it done? How about doing water-shaders and cloud-shaders(makes moving clouds?) in Dark Shader? One DBPro example had water-shader, but I can't find one in Dark Shader. Also how else to do moving clouds?

I also would like to know the best ways to do a sandbox-type environment in DBPro. Can it be one big .x-file or is it divided into many objects? I mean that I would do a world in Blender and should I divide it to many objects and if so then how to add it to the game like tiles are added in 2d?

In short:
1.)How to apply shaders to only certain parts in an object?
2.)How to make water-shaders in Dark Shader?
3.)How to make cloud-shaders in Dark Shader / How to make moving clouds in DBPro?
4.)Best ways to make big environments like a city in DBPro?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 31st May 2011 15:51
Hi @Screen!

1-Applying shaders to parts of an object is possible using "SET LIMB EFFECT Object Number, Limb Number, Effect Number"
2-Not sure but there are plenty of water shaders out there. Look up "Fresnel water shader" or check out the effects available free on EVOLVED's site here: Evolved
3-Again evolved has some good shaders, or there's DarkClouds which makes a pretty good backdrop effect but is slightly buggy
4-Large environments are best created using a modelling program rather than using dbpro primitives as you can add your own LOD (Level Of Detail) optimisation as well as make other optimisation that will help your game run quickly.

I hope that helps?

Screen
15
Years of Service
User Offline
Joined: 24th Sep 2010
Location:
Posted: 1st Jun 2011 00:52
Thanks for your reply.

I am using Blender, so how can I adjust the LOD settings? Say, if I have a city modeled in blender and exported to DBPro as .x. Then how would I adjust the LOD for it? Do I do it in Blender or DBPro? Thanks anyways, Im checking out the evolved's shaders..
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Jun 2011 10:30
Normally you achieve LOD by making different quality versions of the same model for different viewing distances. So maybe you make a simple box to be viewed from far away, something with a little more detail for middle distance and something really detailed for close up.

Then you export them all as one object (no expert on Blender but) this should give you an object with three 'limbs' which are essentially the three levels of detail.

By showing and hiding the limbs based on distance from the camera you can reduce the poly count by quite a lot and improve performance without the player noticing it is happening...

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 1st Jun 2011 12:43
How can Evolved's water be modified to achieve some nice specular highlights on the water surface? I've been looking at the demo for some time feeling that something is not there, then i finally realised that's what i was subconsciously missing.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Jun 2011 12:50
I believe if you use the full advanced lighting code you get specular highlights from any lights you add (using evolved's own lighting shader). I know it works with his ocean shader anyway. Not too sure whether there's an equivalent for the fresnel water shader...

Here's a video:


Login to post a reply

Server time is: 2026-07-10 23:13:21
Your offset time is: 2026-07-10 23:13:21