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!


mrbastard

Member Since 09 Oct 2000
Offline Last Active Jul 13 2014 03:35 PM

Topics I've Started

handling UV discontinuities

30 November 2011 - 02:28 PM

I'm working on a demo which computes the mandelbrot set in an HLSL pixel shader. I've been getting some great effects by using an 'orbit trap' and using the resulting values as texture coordinates.

The problem is that where the texture coordinates change very quickly between pixels I get horrid artifacts. See the thin, broken purple lines in the image below.

Posted Image
Ignore the texture magnification blur in the middle bottom of the image - it's just a low res texture!

Here's an image of the UVs, ( u in red, v in green, blue=0 ) - hopefully that points out where the artifacts would occur, even if you can't immediately see them in the first image Posted Image
Posted Image


Now, some of you are probably already reaching for a link to docs on sampleGrad. I've tried playing with it, but so far have only managed to bias the problem one way or the other - one side or other of the round features is still 'bad'. I may not fully understand what I'm doing though, and I'd be very grateful for an explanation if anyone thinks this is the right route to go down.

Another possible solution which I'm working on is to render the UVs to a texture and smooth them out with a box filter. I'll lose detail in the UV map, but I don't think that will make much difference to the final image.

I've also tried just painting over the artefacts - as they occur at the very edge of the 'trapping circle' I guessed they would fall between ~0.99 and 1.0. It turns out that the artefacts are actually on pixels next to (but sufficiently different in UV value from) the pixels with values 0.9...1.0. This is what led me to believe I couldn't solve this with knowledge of only one pixel - I need to use ddx/ddy/sampleGrad or another pass.

Any suggestions?

Opinion: The quot Virgin Mary quot of Video Games?

01 June 2010 - 12:17 AM

Come on guys, how long does it take to notice a mistake like this on the front page?

Python interprocess communication options?

14 September 2009 - 06:40 AM

I'm trying to get a handle on IPC options for Python. Background: I have a little app that generates simple GUIs for arbitrary classes using introspection. I'd like to be able to use it from other apps with minimal changes to the host app. The closest thing I can think of to compare it to is The Image Debugger, crossed with SmallTalk's inspector. Something like AutoGizmo( myClassInstance, options ) in the host app should open an instance of the GUI app. The apps then exchange data in real time. The host app is required to call an AutoGizmo.update function periodically, where the current values will be transferred to the GUI app. Similarly the GUI app needs to send changes to values back to the host app. I've pretty much decided against threading: the GIL seems to make using Python threads fairly pointless while still requiring extreme care to avoid errors. (Please say so if this assumption is incorrect!) The little GUI app uses wxPython, and it also seems much easier not to try and coerce wxPython's event loop to play nicely with the host app. The main use for this is with interactive apps BTW - stuff written in pygame and similar. I've been looking at the subprocess module, but as I know fairly little about IPC in general I'm finding it hard to work out what's supported on which platforms. Windows is my main platform so much of the posix stuff is out (no cygwin either thanks!). I'd also rather not use something windows-specific. So, it seems my choices are: -subprocess and use stdin stdout pipes for communication between processes -async_chat or similar to roll my own IPC based on TCP/IP sockets, possibly using pickle instead of serialization -something more heavyweight like XML-RPC - seems overkill, but already exists -something else? The Image Debugger uses memory mapped files - any use here? platform specific? thanks for any suggestions offered!

If you had an orbital mind control lazer...

25 May 2008 - 05:37 AM

...what would you use it to make people believe? (ok I have a vague game idea and want some use cases before I design the AI)

forum bug report

26 March 2007 - 04:53 AM

I posted in this topic and got:
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/community/forums/lib/genmail.asp, line 29

800401f3


The post was still made, but my post appeared before CTar's, even though it was made afterwards. edit: it also appears earlier than it should in my profile.

PARTNERS