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.

Program Announcements / jGfx - Rendering and Effects Plugin for DBPro

Author
Message
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Aug 2018 13:18
Glad to see this thread reopened.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 26th Oct 2018 06:07
With performance in mind, in order to exclude a collection of geometric instances; setting the current instance count to 0, would essentially omit the group from rendering without having to exclude them one by one, is that correct?

I am currently writing code to exclude instances far from the camera, but within the viewing range (for replacement with lower levels of detail). Another concept which springs to mind was to clip distant instances in the applied shader.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Oct 2018 07:43 Edited at: 26th Oct 2018 07:44
Hi Chris,
Quote: "setting the current instance count to 0, would essentially omit the group from rendering"

That would work, but would also require tracking instance counts in order to re-include the instances. The GeoInst_SetHidden command can be used to exclude an entire instance group.

Quote: "I am currently writing code to exclude instances far from the camera, but within the viewing range (for replacement with lower levels of detail)."

I guess now is a good time to announce that I've been re-writing the GeoInst library to include culling and lod Not to worry though, the new command set will support all features present within the current library.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Oct 2018 18:11 Edited at: 29th Oct 2018 18:13
Thanks for the speedy response. I look forward to showing what I have been able to produce with your plugins.

One of my next challenges is to merge my comic strip and vector-graphic shaders with Evolves advanced lighting MRT implementation; and to merge that resulting system with my implementations of jGPU skin and GeoIns, along with a secret system I've been working on for my game.

Quite a undertaking; I hope it succeeds, but the main issue is that I would not want to have more than 100 regular dark basic draw calls/limbs (excluded or not). But AL is very much 'regular DBPro object based'.

Otherwise I may have to abandon the use of AL because the comics, vector-graphics, gameplay and performance is more important for this particular concept.

Quote: "GeoInst_SetHidden command"


I haven't quite memorized the command-set yet, glad you mentioned that command.

Quote: "I've been re-writing the GeoInst library to include culling and lod"


That's brilliant, that sounds extremely useful. Currently I am excluding instances out of the camera frustum using JGTools.

P.S. - The example projects and help files are always extremely helpful
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 30th Oct 2018 23:17
@revenant chaos

I and others appreciate the work you have dun

I was wondering do you think this could be made to work with AGK2 ?
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 4th Nov 2018 01:44 Edited at: 13th Nov 2018 14:27
Hi everyone,
I've finished up rewriting the geometry instancing library. Before removing the old GeoInst_ commandset from jGfx, the new lib is being released as a separate plugin. I'm not yet sure if this plugin will replace the old GeoInst_ commandset within jGfx, or if it will remain a separate plugin.

Whats New?
============================
- Multi-mesh instances, Culling and LOD
- New grouping system for easy exclusion and BVH tree assembly
- New custom element datatypes and usages (pass data to the vertex shader using POSITION or TEXCOORD semantics)

Whats Changed?
============================
- The old GeoInst_ commandset's functionality is now spread across two new commandsets: GInst_ and GInstBuffer_
- Render states must now be controlled entirely within the shader, dbpro renderstate settings are no longer used
- The plugin's world matrices are now passed to the shader as POSITION elements
- Effect references are no longer gathered directly from object limbs, a new command has been added for that purpose




Update Nov-13-2018:
===================================
- Fixed an issue with mesh bounding volumes
- New commands for getting/setting GInstBuffer and GInstGroup bounds
- Added TreeIT Example
- New Seamless Texture Atlasing Example

Modified Commands (1):
------------------------------------------
pGInstBuffer = GInstBuffer_MakeNew( pGInst, InstanceCount [, bDynamic ] )

New Commands (24):
------------------------------------------
GInstBuffer_SetAutoBoundsEnabled pGInstBuffer, bEnabled
bool = GInstBuffer_GetAutoBoundsEnabled( pGInstBuffer )
GInstBuffer_SetBounds pGInstBuffer, MinX#, MinY#, MinZ#, MaxX#, MaxY#, MaxZ#
Value# = GInstBuffer_SetBoundsMinX( pGInstBuffer )
Value# = GInstBuffer_SetBoundsMinY( pGInstBuffer )
Value# = GInstBuffer_SetBoundsMinZ( pGInstBuffer )
Value# = GInstBuffer_SetBoundsMaxX( pGInstBuffer )
Value# = GInstBuffer_SetBoundsMaxY( pGInstBuffer )
Value# = GInstBuffer_SetBoundsMaxZ( pGInstBuffer )
Value# = GInstBuffer_SetBoundsCenterX( pGInstBuffer )
Value# = GInstBuffer_SetBoundsCenterY( pGInstBuffer )
Value# = GInstBuffer_SetBoundsCenterZ( pGInstBuffer )
GInstGroup_SetAutoBoundsEnabled pGInstGroup, bEnabled
bool = GInstGroup_GetAutoBoundsEnabled( pGInstGroup )
GInstGroup_SetBounds pGInstGroup, MinX#, MinY#, MinZ#, MaxX#, MaxY#, MaxZ#
Value# = GInstGroup_SetBoundsMinX( pGInstGroup )
Value# = GInstGroup_SetBoundsMinY( pGInstGroup )
Value# = GInstGroup_SetBoundsMinZ( pGInstGroup )
Value# = GInstGroup_SetBoundsMaxX( pGInstGroup )
Value# = GInstGroup_SetBoundsMaxY( pGInstGroup )
Value# = GInstGroup_SetBoundsMaxZ( pGInstGroup )
Value# = GInstGroup_SetBoundsCenterX( pGInstGroup )
Value# = GInstGroup_SetBoundsCenterY( pGInstGroup )
Value# = GInstGroup_SetBoundsCenterZ( pGInstGroup )


Command List (124 total):


I've attached the new plugin to this post. Download contains the dll, keywords file, 8 example projects, and a command reference document (placeholder for help files until the new commandset's fate is decided).







@Chris,
I'm excited to see what you've come up with, this secret system has me intrigued. That does sound like quite the task, the new versions of AL are quite complicated but I have confidence that you'll find a way.

Quote: "I haven't quite memorized the command-set yet"

That's probably good, its obsolete now lol.


@Resourceful,
Unfortunately that won't be possible, DBPro and AppGameKit depend on two very different underlaying graphics APIs (DirectX9 vs OpenGL/OpenGLES). While I have no doubt that OpenGL is capable of everything this plugin provides, I'm not sure if AppGameKit supports external renderers and It would be much better if something were developed from the ground up with OpenGL in mind. I currently have no plans to release AppGameKit versions of my plugins.

Attachments

Login to view attachments
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 7th Nov 2018 21:55 Edited at: 7th Nov 2018 21:56
Glad to see this update. I will start testing it out, and will implement it into my project once I get a clearer understanding of it.

So, now the geometric instances contain more than one mesh, through defining buffers based on a certain mesh; and each of these buffers contain a certain number of instances, indexed from 1.

Once an instance, its buffers (and groups) are defined; will we be able to remove the original DBPro objects from memory after instance definition, or keep them loaded for the instancing system to function?

I look forward to trying this out.

I am actually developing the viewport for my game based on your plugins at this very moment, the viewport will pretty much represent what the players install on their PCs, with most of the action taking place on my servers. I think it will be about 2 or so months before my demo release, should all go well which I think will attract a lot of developers to try your plugins out.

As for Advanced Lighting; it turns out I did not fancy refactoring and changing all object references to instances; although quite possible, I think it will be easier for me to write a purpose built instance+skin shader pipeline.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Nov 2018 08:11 Edited at: 8th Nov 2018 08:13
Yep that's pretty much it. The new library was written in hopes of providing an easy migration for any existing code. As such, it should be viewed as if the old command set was simply chopped in half then expanded upon. GInsts are templates for defining rendering resources, LOD settings, and custom elements. GInstBuffers are arrays of instances which source their renderdata from a GInst. Multiple GInstBuffers can source renderdata from a single GInst. Instances can now be composed of multiple meshes, whereas the old lib would have required creating a GeoInst for eash mesh and filling them with identical instance data. The old lib's behavior can be duplicated using the GInst_BeginObjectAssembly, GInst_AddMesh, and GInst_FinishObjectAssembly commands. Instances are rendered using DBPro-allocated vertex and index buffers, objects can't be deleted as long as they are being referenced by the library.

Quote: "I think it will be about 2 or so months before my demo release"
That's awesome man, I can't wait to give it a go.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Nov 2018 17:28 Edited at: 9th Nov 2018 17:29
Thanks, good info.

So far I have come to understand that each GeoInst (now GeoInst_Buffer) vertex shader function call is transforming an instance of a mesh, given the matrix transforms provided by your plugin function and any calls to position, rotate and scale.

It seems like the vertex shader is using a single call to define the transform for pixel shading. The mesh itself is SHARED and STATIC, only the normals and screen position are calculated by the vertex shader (at the basic level before any extension).

The question that springs to mind is, what can be done to the mesh from the vertex shader; other than read its mesh data?

If for example, I needed leaves on a tree to be animated by the blowing wind; and for the algorithm to be performed by the GPU; I can certainly adjust the rotation of the leaf in the vertex shader, but I am assuming (prior to testing) that you could not bend the leaf by its vertices because if that were possible, the mesh would be unique for each leaf, not an instance.

Even though there are ways to simulate bent and straight leaves with hardware instancing, and the use of clipping, pixel shading and swapping meshes; I am exploring a variety of ways to pin point the best for certain situations.

Another example is using the world coordinate of an instance, to define how it should look and behave. There are plenty of ways to make a leaf above water blow in the wind, and the leaves below water float in the water. But again, ones options are based on what one can perform with vertex shaders in the hardware instancing context.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 11th Nov 2018 14:31 Edited at: 11th Nov 2018 14:32
Vertex shaders are essentially preprocessor functions which can alter vertexdata before triangles are submitted for rasterization. The results of a vertex shader only exist temporarily within graphics memory as triangles are passed through the pipeline. Other than the usual limitations associated with instancing techniques (identical source mesh data, same effect/textures, etc...), I can't think of any functional advantages or disadvantages associated with geometry instancing in relation to the vertex shader. The key difference between geometry instances and dbpro objects is the method used to submit vertices for drawing. Any transformations/deformations which are possible within a typical vertex shader should still be possible when using geometry instancing. Vegetation shaders typically rely on vertex blend weights to apply non-uniform mesh deformation; Varying weight data across surfaces can be used to produce bending. I've attached an example project which uses geometry instancing to render animated trees created using Evolved's Tree It.

Attachments

Login to view attachments
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 11th Nov 2018 21:23 Edited at: 11th Nov 2018 21:25
Great update revenant chaos!
I've tested Forest demo with 1500 trees and get about 230fps - amazing endeed!
I think all mesh in game scene should be moved to GInst - due to such speed and memory economy improvements
I remember that there was an issue with correct alpha blending but nowdays there is only alpha clipping ( if you use Deferred shading or another such render system with depth buffer )
- so it is not issue at all!
Its time to create crowd demos like in last Assassins Creed games
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 12th Nov 2018 23:32
Thanks, the info was very helpful; and the demo provided answers a lot of questions.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 13th Nov 2018 14:33
Hi everyone, I've updated the GInst plugin release post with a new version. Fixes an issue with mesh bounding volumes, adds 24 new commands, TreeIT example, and a new seamless texture atlasing example.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 17th Nov 2018 13:57
Hi everyone, here is a beta release which implements dynamic batch rendering to reduce draw calls and improve CPU performance. I've never tried anything quite like this before so I'm hoping to get some feedback before pursuing the technique farther. Download includes beta plugin and an example project for testing.

Attachments

Login to view attachments
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 17th Nov 2018 19:45
@revenant chaos

hi

I will give it a test and let you know what the outcome is ;o)
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Nov 2018 14:56
Likewise. Thanks for the update. I am about to migrate from the old to new instancing system.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 21st Nov 2018 21:28 Edited at: 21st Nov 2018 21:30
@revenant chaos

I ran the beta

I got fps speed of 123 with items on the screen
and just for fun, I got 528 fps with nothing on the screen

on a screen size 1920 x 1200

when i used wireframe
the fps went down to 79 fps

so, all in all, run fine on a 6-year-old laptop

my system

revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 21st Nov 2018 22:16
Hi Resourceful, Thanks for testing. Could you run the example again with batch rendering disabled? I'm wondering how much of an impact it has on various systems.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 21st Nov 2018 23:04
@revenant chaos

Which Settings would I change to make that happen ?
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 21st Nov 2018 23:40
Near the top of the project, find the line that says "bUseBatching = 1" and comment it out (or change 1 to 0).
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 22nd Nov 2018 00:57
Here is test results
UseBatching=1 fps = 2200
UseBatching=0 fps = 880
So, its work very well , I guess
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 22nd Nov 2018 01:29
Hi Kuper, thanks for testing. Could you post your system specs?
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 22nd Nov 2018 14:53
Its laptop i7 4720hq and nvidia 980m
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 22nd Nov 2018 19:40
Awesome, thanks Kuper.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th Nov 2018 11:35 Edited at: 25th Nov 2018 11:38
Today was my first time testing the new GInst library; the new improved library looks like one of the best. The FPS efficiency is the name of the game, and all the provided demos regardless of instance count, with VSync turned off, the FPS is staggering.

My FPS for the forest demo was: 270 FPS, The average 4 core AMD A10-6800k, 8GB Ram, NVIdia GeForce GT 740 with 2GB DDR5 VRam.

Very well done with this one; this and the jGPU skin plugins are going to be in operation on many, many computers across the globe. I will be migrating to the new library at some point in the next week or so.

At first glance, it seems that my game's use of your frustum functions in JTools will no longer be required because the GInstGroup functions can be used to cull off-screen groups. Third-party objects and entities could still be excluded with my hard coded solution through the JTools frustum functions.

When I saw the texture atlas demo I was intrigued because I wrote a texture atlas function for my shaders a while ago, but came up with my own solution for looking up a constrained area of a texture because I could not find another way. I noticed your method looks quite different to mine, and will see which method compiles faster and runs faster.

My method essentially obtains a integer representing the index of the atlas based on equal sized sections, and wraps the coordinates using the modulo function.

GInst_DiffuseAtlas.fx


My UV wrap function


The problem with my solution is that I could not get the GPU to cast to an integer without using a hack. Without casting the 'atlas index' to an integer, it will not work. With the hack, it works however.

I will try out your method.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Nov 2018 09:30 Edited at: 26th Nov 2018 12:49
Hi Chris,
That's great news, I'm quite proud of how well the new library is performing.

Your atlasing technique is pretty cool, I hadn't considered that method. Thanks for sharing.

The example atlas shader uses partial derivatives to control the sampled mip level, I've read that this same technique is implemented at the hardware level. The partial derivatives represent the rate of change in texture coordinates with respect to screen space coordinates. Greater rates of change call for sampling from lower quality mipmaps. In order to avoid seams around each tile, derivatives are calculated using unwrapped/unconstrained UVs. The values are then scaled down based on the atlas tile size, allowing the gpu to sample from a sensible mip level. This method seems to work quite well, but has a couple of caveats:

- To avoid mipmap artifacts, textures require padding areas which effectively half the usable resolution. The method I used to create the example atlas is as follows:

For each texture:
a) Tile the texture 3 by 3
b) Scale to twice the size of the atlas tile
c) Copy the center 50% of the image into the atlas tile

- It seems to work best if mipmaps are calculated at load time. I tried every method I could think of to use precalculated mipmaps, but d3d's automatic mip generation beat them all in terms of filtering quality.

- The shader doesn't limit mip level selection. I haven't run into any problems yet, but this could result in tiles bleeding into one another should the gpu sample from a sufficiently low quality mipmap.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Nov 2018 12:51 Edited at: 28th Nov 2018 04:40
Hi everyone, The batch rendering system has been completed. Batched instances are now pooled within a single buffer before being submitted for rendering. This method has the potential to use less memory in GInst heavy scenes.


Modified Commands (1):
----------------------------------------------
pGInst = GInst_MakeNew( [bDrawBatching] )


New Commands (7):
----------------------------------------------
GInstBuffer_CalculateBounds pGInstBuffer
GInstGroup_CalculateBounds pGInstGroup
GInstGroup_SetParentGroup pGInstGroup, pParentGroup
GInstBatch_SetPoolManagement iMode [, ExpMul# ]
GInstBatch_PrimePool NumBytes
GInstBatch_FlushPool
NumBytes = GInstBatch_GetPoolSize()


Download includes updated plugin, keywords file, command reference, batch rendering example, and a new terrain example. I'm also attaching two grass rendering examples which rely on JGTools' pMath plugin, Includes compiled exes in case JGTools isn't installed.

Attachments

Login to view attachments
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 26th Nov 2018 12:57
Thanks for the info, I always like test different solutions to determine the best for a given problem; the solution you provided will no doubt be useful.

Particle effects are not one of DBPro's strong points. Besides the Dark Physics particle effect functions and Dark Imposters, most other solutions or work arounds have poor performance. Using the POINTSPRITEENABLE effect state have had no desirable performance benefit on my hardware when using regular DBPro objects, particularly when close to the camera.

I am hoping that point sprites will work a lot better with Geometric-Instance objects.

My next challenge will be to think up a way to render my clouds and cast my shadows.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 26th Nov 2018 13:23
Remarkable looking grass demo you posted there.

So the Get Position/Angle/Scale functions will not work when using GInstBuffer_SetWorldMatrix for manual specification. Good to know. The transforms are decidedly sourced from elsewhere anyway, so no issues there; am I right? Or is there an internal feature in the library which could potentially move the instances?

This is all for learning.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 26th Nov 2018 21:38
@revenant chaos

sorry for the delay

here are the stats

bUseBatching off
120 normal
81 wireframe

bUseBatching = 1
bBuildQuadtree = 0

121 normal
77 wireframe

@Chris Tate
wow my system is slow compared to yours lol

revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Nov 2018 07:20 Edited at: 28th Nov 2018 03:23
One big problem with particle rendering is overdraw. Overlapping geometry leads to redrawing pixels multiple times and quickly becomes taxing on the gpu's fill rate capabilities. The issue becomes worse when particles occupy large portions of the screen, this is often farther compounded by texture magnification filtering. A few suggestions I've seen are:
- Rather than using planes, use particle geometry which loosely conforms to the texture. This can reduce the overhead of processing fully transparent pixels.
- Render the scene and particles separately, then composite them for the final render. Overdraw penalties can be reduced if particles are drawn to a lower resolution render target.

The new GInst library still doesn't mix well with DBPro's alpha blending. Experimentation has shown that external renderers are called before DBPro draws it's own objects, however alpha objects must be drawn after all opaque geometry has been rendered.

Quote: "so no issues there; am I right?"

Yep, that is correct. The library will not transform instances unless instructed to do so. The GetPosition/Angle/Scale commands simply return whatever values were last passed into their Set counterparts. The plugin assumes that custom matrices are non-standard and therefore can't extract valid rotation and scale values.


@Resourceful
No problem, thanks for testing.


[Edit] Fixed some obvious typos, probably shouldn't have posted immediately before sleep lol [/Edit]
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 28th Nov 2018 01:55 Edited at: 28th Nov 2018 01:56
Thanks for the info. The overdraw issue pretty much explains the problems I have experienced when attempting to display any particle effects using their designated functions. The performance drop caused by unoptimized particle effects have been detrimental to the gaming experience, and there is little time for optimizing something which could be easily replaced.

It looks like I will have to limit the use of conventional particle effects and try to achieve something with post rendering and screen projected texture coordinates on alpha blended objects.

The thing about the DBPro draw order problem is that 90% of what is being drawn on my client viewport are geometric instances and jgpu skin objects; so I should be able to find a way to limit the use of regular objects to avoid alpha blending issues. So far there has been no need for regular objects; other than to initialize your plugins, and other third party entities.

@Resourceful

That is reassuring. My PC is getting kind of old. I will need to get some new hardware soon. I look forward to seeing how well this all performs on modern PCs.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 29th Nov 2018 18:44
@Chris Tate

if the startup I am apart of would start paying
there is a $10,000 laptop I got my eye on and it has two built-in video cards
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 30th Nov 2018 01:29
I certainly hope they will start paying; I had to let a number of clients go because of consistent late payments. They will never change.

Send us a link for the laptop; I am curious.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 1st Dec 2018 20:19 Edited at: 1st Dec 2018 20:21
@Chris Tate
Try this Video Link on youtube

https://www.youtube.com/watch?v=LLBhfpFYjCQ

And This video Link

https://www.youtube.com/watch?v=l9CaofVvdog
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Dec 2018 23:51
@Resourceful


Wow imagine spilling apple juice on a $1,000,000 laptop.

I am not a laptop guy, but I could do with a new one, something lightweight for travel.


@revenant chaos

A quick question, I know you are very busy.

What is the difference between the behaviour of hidden instances and excluded instances? Are hidden instances processed by the shader with zero scales or are they also excluded from rendering? I am going to need to determine when it is best to hide, rather than exclude.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 2nd Dec 2018 04:33 Edited at: 2nd Dec 2018 05:18
Hi Chris,
The SetHidden commands toggle the visibility of entire GInsts and GInstBuffers, whereas exclusion applies to individual instances.

[Edit] Just realized I forgot about GInstGroups. In the current release group visibility is toggled using the GInstGroup_SetExcluded command. In the next release, this command will be renamed to GInstGroup_SetHidden to match the rest of the commandset.


Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 2nd Dec 2018 15:52
Thanks
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 2nd Dec 2018 20:51
@Chris Tate

if I had the money and it had the specs that I need
i would spend that much
if was just for looks then I would not

asus made one that has liquid cooling but I don't like the look of it as much as the
Acer with the 21"display, I wish the Acer had a taller screen

both company's failed to build a good gaming laptop

the asus only had a 18.6" display they should have been 21 like the acer

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Dec 2018 16:29
The terrain demo really shows how great this library is for games which require height field terrains using custom build shaders; probably the best option for height field terrains in DBpro especially if you start to optimise with sub-terrain groups and LOD features.

Few other terrain solutions allow provide you with a means to apply your own shaders.

@Resourceful
I was never into laptops, but will definitely be on the look out for some good deals.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Dec 2018 18:30 Edited at: 4th Dec 2018 18:32
Creating an additional object and inserting the line of code below into the main loop of the basic demo demonstrates swapping out the original object used by a different instance buffer, therefore changing the appearance of a world of instances from a few lines of code.

Pretty cool feature of the system.

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 5th Dec 2018 01:19

Minor function string table issue: GInstBuffer_GetGroup() does not return any values, according to the compiler.

Also, will GeoInst_CheckDeviceSupport() remain in the older library? Perhaps people who use the new library (alone) will need it.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 5th Dec 2018 02:09
Oops, here's a quick update.

- Renamed GInstGroup_SetExcluded/GetExcluded commands to GInstGroup_SetHidden/GetHidden
- Fixed GInstBuffer_GetGroup()'s string table entry
- Added a command for checking device support

New Commands (1):
----------------------------------
bool = Device_CheckGInstSupport() //Returns true if the graphics hardware supports rendering with concurrent data streams.

Download contains updated plugin, keywords, and command reference document.

Attachments

Login to view attachments
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 5th Dec 2018 12:46
Quote: "swapping out the original object"

I didn't have that in mind when writing the library, but that being said I don't foresee any problems. Changing a GInst's object or effect will also require redeclaring it's custom elements. LOD must be re-setup after changing a GInst's object/meshes.
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 5th Dec 2018 13:15
Oh okay, so it requires a bit more work if LODs and custom elements are used, and so would be better suited for when LODs and custom elements are not used,
but swapping - quite like change mesh - is an interesting way to create special effects and instant changes to scenery.

Thanks for the update.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 5th Dec 2018 19:09
@Chris Tate

unlike when I first got the gaming laptop
the newer one come with much better video cards
and in one case, I know it is replaceable

the ones I posted the video link to have dual video cards and dual power supply
mine had a single for both

the one I have it is permanently attached
the dumb asses were not nice to do that

@revenant chaos
Thanks for the update
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 9th Dec 2018 23:55
Hi everyone, here is another update.

- Added commands for changing GInst meshes, textures, and effects after initial setup
- New GInstCam command set, Renamed the GInst_GetDraw????() commands to GInstCam_GetDraw????()
- Added per-camera culling and LOD calculation settings
- Added support for ATI SM2.0 hardware (untested)

Updated Commands (1):
----------------------------------------------------
Device_CheckGInstSupport() //Updated to perform additional compatibility tests

Renamed Commands (3):
----------------------------------------------------
GInst_GetDrawPrimitives( [CameraID] ) -> GInstCam_GetDrawPrimitives( [CameraID] )
GInst_GetDrawCalls( [CameraID] ) -> GInstCam_GetDrawCalls( [CameraID] )
GInst_GetDrawInstances( [CameraID] ) -> GInstCam_GetDrawInstances( [CameraID] )

New Commands (17):
----------------------------------------------------
GInst_SetMinDrawDistance pGInst, Distance#
Distance# = GInst_GetMinDrawDistance( pGInst )
GInst_SetTexture pGInst, StageIndex, ImageID
GInst_SetMeshTexture pGInst, MeshIndex, StageIndex, ImageID
ImageID = GInst_GetMeshTexture( pGInst, MeshIndex, StageIndex )
GInst_ChangeEffect pGInst, EffectID
GInst_ChangeMesh pGInst, MeshIndex, ObjectID, LimbID, bKeepTextures
GInst_RecalculateBounds pGInst, iUpdateBuffers
GInst_SetBounds pGInst, CenterX#, CenterY#, CenterZ#, Radius#, iUpdateBuffers
Value# = GInst_GetBoundsCenterX( pGInst )
Value# = GInst_GetBoundsCenterY( pGInst )
Value# = GInst_GetBoundsCenterZ( pGInst )
Value# = GInst_GetBoundsRadius( pGInst )
GInst_SetDepthSorting pGInst, iMode
GInstCam_ConfigureLOD CameraID, DistScale#, DistOffset#
GInstCam_OverrideLOD CameraID, Distance#
GInstCam_Link CameraID, SrcCameraID, iLinkMode, iCullMode


Command List (149 Total):


Download includes plugin, keywords, command reference, and example projects.

Attachments

Login to view attachments
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Dec 2018 02:33
This one looks like a big update. Will trying it out in about a week; I am currently implementing the latest jGPU skin functions into my client.

Login to post a reply

Server time is: 2024-11-17 22:32:31
Your offset time is: 2024-11-17 22:32:31