Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411482 Posts in 69370 Topics- by 58426 Members - Latest Member: shelton786

April 24, 2024, 12:33:19 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)What are you programming RIGHT NOW?
Pages: 1 ... 48 49 [50] 51 52 ... 71
Print
Author Topic: What are you programming RIGHT NOW?  (Read 210068 times)
Halogen
Level 0
**



View Profile WWW
« Reply #980 on: June 19, 2013, 02:44:04 PM »

Coding oven controls with my limited knowledge of c++. As of now, I'm working on the temperature input and lighting feature.
Logged
8BitPimp
Level 0
**


View Profile WWW
« Reply #981 on: June 20, 2013, 03:18:56 AM »



I am sorry if I seem to be spamming this thread,  but I am totally pumped just now since I got my newest voxel renderer working.  I came up with a unique and really efficient way to do voxel rendering of a height map.  It doesn't use any ray casting, which almost all other software based methods use.

You can see it in motion here:



Logged

powly
Level 4
****



View Profile WWW
« Reply #982 on: June 20, 2013, 06:04:17 AM »

By the looks of it, you're rendering a line per height map texel. It wouldn't look like that nearly as much if you rendered a black line below the last of each row, leaving only a "thin surface" visible. The technique might be efficient in some cases (<-> no decent GPU), but it's nothing new - I implemented this in early 2010 to test my map generator and remember a JS version years earlier. Still very cool.

Edit: your blog seems to suggest you're actually doing something smarter, I'd be happy to hear more about how the zooming and perspective stuff would work.
Logged
Kekskiller
Guest
« Reply #983 on: June 20, 2013, 08:14:04 AM »

Well, voxels are volumetric pixels (== 3D), height maps are flat (== 2D). Don't you think you got something wrong there or is it just to accelerate the lower layers of a voxel world?
Logged
8BitPimp
Level 0
**


View Profile WWW
« Reply #984 on: June 20, 2013, 08:48:04 AM »

By the looks of it, you're rendering a line per height map texel. It wouldn't look like that nearly as much if you rendered a black line below the last of each row, leaving only a "thin surface" visible. The technique might be efficient in some cases (<-> no decent GPU), but it's nothing new - I implemented this in early 2010 to test my map generator and remember a JS version years earlier. Still very cool.

Edit: your blog seems to suggest you're actually doing something smarter, I'd be happy to hear more about how the zooming and perspective stuff would work.

Ah well, it seems to be fundamentally the same as what you describe, however I just have a few changes. I started by implemented something similar to an old rotozoom effect, but with a variable skew in it so that it draws isometrically, similar to the way the old "Mode7" effect is done.  So the effect here works from screen space to texture space, not the other way around, this gives it an invariance to the resolution of the landscape texture used, which is a nice benefit.  Another change is that I draw from the bottom of the screen (closest to the "camera") to the top (farthest from the "camera") drawing vertical spans for each pixel based on their height in the height map. I draw in this order because it allows me optimize to get zero overdraw, so each pixel on the screen is only written too one, giving a huge speed increase.
Its funny that you say you implemented the same thing to test your map generator, since that was also my goal when writing this Smiley

Well, voxels are volumetric pixels (== 3D), height maps are flat (== 2D). Don't you think you got something wrong there or is it just to accelerate the lower layers of a voxel world?

Well if it was strictly just a planar height map then yes it would be 2D but since it is being displaced in such a way, it is commonly referred to as being voxelised, since each pixel has an associated perceptual volume.  The word voxel actually derived from volume pixel, which in this case it has.  "Voxel landscape rendering" is being referred to commonly enough and since this is no less 3D then the standard techniques, I believe the terminology to be correct in this case.  I don't believe that voxels have to be entirely free in 3D space, as is common in modern voxel implementations.

This is a well cited tutorial on the standard technique.

http://www.flipcode.com/voxtut/
Logged

Kekskiller
Guest
« Reply #985 on: June 20, 2013, 09:57:32 AM »

Yeah, this clarifies a few things. Though I rather prefer the term voxel as used in health informatics where it's (to my knowledge) almost always some sort of 3D structure atleast composed of multiple 2D scans rather than just raising a scaled pixel image.

Whatever. Go go voxel front!
Logged
powly
Level 4
****



View Profile WWW
« Reply #986 on: June 20, 2013, 10:15:24 AM »

... zero overdraw...

Ah! That is indeed a nice trick, I never even thought about optimizing it after it rendered correctly in a sane time.
Logged
Kekskiller
Guest
« Reply #987 on: June 20, 2013, 10:22:25 AM »

Edit: Oh come on, seriously? Flipcode? Outcast? Most landscape there's still height map but since you only mentioned rendering, not the base data... Well, you might win with your own terminology. However, it's still a height map. Raytracing/casting is usually used because you have a full grid and whatever point of view and want to get information of voxel sides, crossed volumes, angle etc. From what I understood you're just iterating over the potentially seen pixels without elevation and skip invisible parts after rendering. I can only see lines and line ends, no actual volume use or even individual volumetric elements.

Sorry about this nitpicking but take a look at Outcast's Wikipedia page ("Development"). It's very old-fashioned to use it the term voxel this way.
Logged
8BitPimp
Level 0
**


View Profile WWW
« Reply #988 on: June 20, 2013, 11:01:24 AM »

Edit: Oh come on, seriously? Flipcode? Outcast? Most landscape there's still height map but since you only mentioned rendering, not the base data... Well, you might win with your own terminology. However, it's still a height map. Raytracing/casting is usually used because you have a full grid and whatever point of view and want to get information of voxel sides, crossed volumes, angle etc. From what I understood you're just iterating over the potentially seen pixels without elevation and skip invisible parts after rendering. I can only see lines and line ends, no actual volume use or even individual volumetric elements.

Sorry about this nitpicking but take a look at Outcast's Wikipedia page ("Development"). It's very old-fashioned to use it the term voxel this way.

Your right in the sense that is really old fashioned to use the term voxel in this way, since the current trend is to use the term only in conjunction with an octree data structure.

In any case I guess it is hard to see the volume of each element because it was so zoomed out. Here is a screenshot when the camera is pulled in really close.  There is elevation and volume to each texel there you see.

Edit:
Ah in fact after re-reading your post, I see your problem really is just that there its not a true 3D data-set that is being worked with.  It is just and only ever could be a suitably elevated 2D data-set.  I agree with you that the term voxel is a little muddy in this context.  I wouldn't know what the hell else to call this method though, and voxels are the classical term used for it so, meh.

« Last Edit: June 20, 2013, 11:18:17 AM by 8BitPimp » Logged

Kekskiller
Guest
« Reply #989 on: June 20, 2013, 11:29:29 AM »

Yep, it's difficult to classify/termify non-standard, non-legacy techniques. But good to see this in higher resolution, looks way more interesting this way. I once made a little fixed-angle ortographic water simulation which optimized render time by a similar method just that was no rotation involved (even better to optimize).
Logged
EdgeOfProphecy
Level 2
**



View Profile WWW
« Reply #990 on: July 02, 2013, 10:35:11 PM »

Just wrapped up an animation frame index generator for my Unity sprite system that generates the frame indicies from a TexturePacker sprite sheet.  Sure beats punching in frame numbers by hand.
Logged
Liza
Level 1
*



View Profile WWW
« Reply #991 on: July 02, 2013, 11:43:54 PM »

I am working on solving a bug with the initial implementation of single player AI for my board game. The bug has to do with the AI starting its turn before the human player's turn has been fully handed over, resulting in entity possession being cleared from the pointer before it gets a chance to actually drop the tile into its proper place.
Logged

notnowlewis
Level 0
*

physics and ennui


View Profile
« Reply #992 on: July 03, 2013, 03:14:15 AM »

Getting the Box2D joint juuuuust right so my main character moves how I want him to.
Logged
Overloaded
Level 0
*


I use GameMaker: Studio to make games.


View Profile
« Reply #993 on: July 03, 2013, 06:09:47 AM »

Well GLSL ES and HLSL9 shaders are now supported by GameMaker: Studio (they are still on beta of course) and I'm trying to learn basic GLSL. So far I've only copied and pasted some shader examples into my game, but I want to make my own shaders. I just need to practice more Smiley
Logged

This is my signature. Or, maybe this is Sparta, I dunno.
SoulSharer
Level 1
*



View Profile
« Reply #994 on: July 03, 2013, 06:11:50 AM »

I'm programming my brain to stop programming for atleast 5-10 minutes. Who, Me?
Logged

Twitter: twitter.com/SoulSharer
Skype: disturbedfearless
d
Level 0
***


View Profile
« Reply #995 on: July 03, 2013, 10:18:29 AM »

Code:
movaps	xmm3, xmm2
shufps xmm3, xmm0, 0x33
shufps xmm2, xmm3, 0xC9
shufps xmm3, xmm1, 0x36
shufps xmm0, xmm3, 0xC9
shufps xmm1, xmm3, 0x69
Logged
bateleur
Level 10
*****



View Profile
« Reply #996 on: July 04, 2013, 08:09:06 AM »

I'm trying to code a proper ScrollPane in Unity. I think it might be impossible.

My current strategy is to make big eyes at it and say "Please work!" and offer it cake.
Logged

R.D.
Level 2
**


Making a game about balls. Yepp.


View Profile WWW
« Reply #997 on: July 04, 2013, 09:44:51 AM »

I'm trying to code a proper ScrollPane in Unity. I think it might be impossible.

My current strategy is to make big eyes at it and say "Please work!" and offer it cake.


Oh hey, that's what I do all the time too. Sometimes I also close my eyes and I swear I can set the developers giggling at me :/
Logged

Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #998 on: July 11, 2013, 09:15:17 PM »



I make the best software.
Logged
JoshuaSmyth
Level 0
***


View Profile WWW
« Reply #999 on: July 12, 2013, 12:12:15 AM »

For some reason I decided to write an auto load-balancing multi-threaded task manager in C#.
It's actually a lot simpler than it sounds at ~150 lines of code. Scales jobs to n cores.

Unfortunately rendering is the bottleneck in my game. Not update tasks. But it was fun and I'm sure it'll come in handy in the future.

Edit: I wrote a blog post on it
http://blog.joshuasmyth.me/post/A-simple-auto-load-balancing-multi-threaded-task-scheduler-in-C
« Last Edit: July 12, 2013, 02:22:01 AM by JoshuaSmyth » Logged

Pages: 1 ... 48 49 [50] 51 52 ... 71
Print
Jump to:  

Theme orange-lt created by panic