Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Reitano

Member Since 19 Jun 2007
Offline Last Active Yesterday, 10:05 AM

Posts I've Made

In Topic: Texture atlas generator

06 March 2015 - 06:12 AM

I am well aware of the technical limitations of texture atlases vs arrays vs slots. In the case of texture atlases, naturally I would manually unwrap the texture coordinates in the pixel shader and use tex2Dgrad (or equivalent function) for fetching the data. This approach has been used for more than a decade by tons of engines; I am simply looking for an existing bleeding-aware tool to pack textures.

Simple slots are not a solution in my case, as I want to support 64 textures and I want to dynamically fetch different textures per-pixel based on a material mask.


In Topic: Texture atlas generator

06 March 2015 - 05:00 AM

I should have been more specific. I am still targeting DirectX 9, so I cannot use texture arrays.
The tools recommended above are simple texture packers and ignore the issue of colour bleeding for wrapping, mip-mapped textures.
It is probably wise to write my own tool for texture processing, considering that I will need additional engine-specific features in the future.
Cheers.


In Topic: Clipping on a wavy surface

06 February 2015 - 05:41 AM

You render the reflections assuming a planar mirror, and then you apply the resulting texture to a displaced surface. Unless you use raytracing, you will not get 100% correct results with this technique, although with a wise mix of approximations and tricks you can obtain plausible results. Highly displaced surfaces like water are problematic though.

Please send a screenshot so that we can understand the exact issue and give you some suggestions.


In Topic: Shoreline waves?

06 February 2015 - 05:24 AM

Axefrog, your idea is brilliant. It shares similarities with the approach I hinted at in my previous post. Both approaches involve estimating the wave path near the shoreline at control points and then generating the final water surface by splatting a wave shape along the curve defined by the points, warped in amplitude and possibly other features based on the local bathymetry. One design question concerns the organization of control points. Some possibilites are a regular grid, a hierarchical structure or free particles. They all have pros and cons depending on the exact tech requirements. And do not forget physics, that also has big implications on the design choices.
For a prototype of the rendering code, I'd start by simulating waves approaching a circular island, for which the solution is known a priori. I'd then move to the computation of local control points, which in my opinion is by far the most challenging aspect of this technology.


In Topic: Shoreline waves?

05 February 2015 - 06:19 AM

In my opinion the simulation and rendering of water waves near the shoreline is one of the biggest challenges in real-time water rendering. Afaik no game engines or middlewares on the market support it. Offline renderers are well capable of producing convincing results, as demonstrated by the many animated movies in recent years with water scenes (e.g Surf's Up). Naturally they do not have the tight constraints that games have and can afford the cost of highly sophisticated physical models and continuos artistic refinement.

Games traditionally have employed cheap effects such as foam near the shoreline, modulated by the distance from it, as seen in FarCry, Assassins Creed etc. Outerra uses procedural waves for the shoreline whose parameters (amplitude and phase) depend on the distance to the shoreline. That's a step forward in the right direction.

In general, the proper simulation of shallow waves, characterized by a change of propagation speed, direction and shape profile among other phenomena, would require a complete new technology and a significant investment in R&D that studios can hardly justify.

Myself I have ideas that I intend to prototype at some point in the future. In rough terms, I would calculate local wave solutions near the shoreline, characterized by functions that approximate locally the curvature and distance from the shoreline. For LOD, waves would have a variable granularity based on the distance from a reference point (e.g. the main camera position). For rendering, the local wave solutions would be splatted on offscreen accumulation buffers encoding the final waves displacement, gradients, foam level, variance etc. Physics would be handled entirely on the CPU side.

I'd be happy to go to into more details if there's enough interest, and also share ideas about other approaches.


PARTNERS