Archive: Back with a preset...


4th January 2005 03:13 UTC

Back with a preset...
I'm back, working on J10 a little inbetween working and sleeping. Here is a preset that I've just finished that I'm probably putting in the pack.

It uses a 1/4 res 'fullscreen' superscope to raytrace a square tunnel and apply 'per pixel' colored lighting, normal mapping and specular mapping to the lightly textured walls.

There is some basic interactivity which can be accessed by moving the mouse to the left of the screen.

To speed up the preset try turning off the specularity and also turning off the bilinear filtering in the movement.

Let me know if it is too slow...


4th January 2005 06:08 UTC

I was just think I hadn't seen anything new from these forums in a while... An entirely superscope raytraced scene? That's impressive. How'd you do the textures?


4th January 2005 06:45 UTC

Mwahahahah.

Seriously, this is starting to look niiiiiiice. I was thinking you could render part of it with the raytrace SSC and render part of it with plain SSCs (like the danger stripes) for higher detail. The only thing which seems wrong to me is the normal map for the left/right walls which seems to be too exaggerated. It looks wrong next to the flat danger stripes (or, you could try implementing parallax mapping *g*).

Also, I had another nifty idea for the adaptive sampling thingie... bump up the resolution to x2, but for pixels further away than a certain distance, set the odd pixels equal to the last pixel. If you wrap all the code in an if block, you should get a nice speed improvement without losing detail in the lighter areas.

Though what's up with that interface...? Some of those checkboxes behave like radiobuttons! TSK TSK! :D


4th January 2005 08:46 UTC

thats insane. hell insane. amazing. ehh i have to collect my jaws from the ground.


4th January 2005 09:14 UTC

Does this mean I will actually live to see my remixes released in a pack?

:p

Funneh preset, but since it is more of a tech-demo, why not give the user a chance to change the "quality" 1/4 of the screen size is too small and looks crappy when zoomed.

Technical value=10/10 (shit hawt coding)

Entertaining value=hmm... okay maybe 2/10 and that's being polite.


I really hope this just a alpha_beta_0.00001 version, because it requires a lot of work for being nothing more than a 2 minutes technical show-off.


4th January 2005 09:44 UTC

I remember myself saying: n=w*h will never be used or something like that. This is getting real close though

can someone help me up now please?


4th January 2005 11:05 UTC

:eek: wow.. er... oh my god!

I had to remove all other components to believe that the scene is really rendered by ONE single ssc.
Wow! Amazing.

I'm dying to see how the finished version will finally look.
Although there are some small defects in the textures this preset shows great potential (and knowledge..) ;)


4th January 2005 12:40 UTC

I'm just not a great fan of that movement.. I prefer the raw image and black borders, but that's just me...


4th January 2005 15:05 UTC

omg! this really rocks.:D


4th January 2005 16:31 UTC

Thanks for all the feedback.

I'm amazed anyone noticed the lack of realism in the normal map... Although the danger stripes should really have a better bevel framing them that follows the rest of the shape. I'm going to leave this how it is for the moment, and focus on my intro so that I can get this pack out.

Now that I have a framework this is just the beginning. I'd be happy to explain it to anyone if they cared enough, anyone with knowledge of raytracing and general avs could use it if they are willing to take the lighting equations on faith.

(cough)REMIX(splutter)hint(choke)
er hmmmm...

oh and a code fix... the x line in the per point for the superscope should be +pw*1.05 instead of pw to fix some rounding errors in higher resolutions.


13th January 2005 03:22 UTC

So this is all just a rectangular tunnel with hardcoded normals layered over the walls? I still dont know how you did the textures... if you dont mind explaing that. More specifically the warning strips.


13th January 2005 10:07 UTC

sorry for two posts in a row but it's too late to edit old one...


Now you've got me playing around with bump mapping and all that jazz... I really wish there was a way to read in texture color values though... Justin? :)


14th January 2005 21:52 UTC

Well... you could write a file loader ape

i used stuff like cos and sin and ranges to to the textures... and some mental imaging... none of it was planned. For instance looking at cos(k*(x+y)) and choosing above 0 black and below 0 yellow, produces danger stripes.

its slow as all hell but like all my presets this is a rush job

nothing that complicated.

if you look at the code:
(this is from a newer version... i can't be arsed to d/l old one again)


// first define a load of stuff to base textures from
// (cpz/spz = sin/cos (pz)
// ik4 = if floor

// distances to wires on ceiling in x axis
dw1=.3*cpz*sin(1.7*pz+1)-px;
dw2=.7+.2*cos(3*pz+spz)*cos(4.2*pz+1)-px;
// these are all for the walls
// area for stripes
co1=above(spz,.99);
// some divisions to define normal maps
co2=band(ik4,above(abs(px),.7));
co3=below(abs(py),.7);
// danger stripe condition
co4=band(co3,above(sin(15*(py+pz)),0));
// little border next to stripes
co5=.6*bnot(co3);

// next generate the color map from all this (i.e. the texture)
cr=min(if(band(ik1+ik2,co1),if(co4,0,1-co5),...
cg=min(if(band(ik1+ik2,co1),if(co4,0,1-co5),...
cb=min(if(band(ik1+ik2,co1),if(co4,0,.75*co5...




hope that helps some...

15th January 2005 08:35 UTC

I dont know if I have enough skill in C++ to write an ape like that. I'd love to see one though...

As far as the preset goes, I love techy presets. I'm a sucker for them so this one is great for me. I agree with unconed that you could fix some of the normal mapping to make it look a little bit better. Have to say I dont like that split on the walls very much... I think you were just trying to break it up with something but I dont think it looks good...

There's something wrong with your stretching too... At certain screen sizes I get columns or rows that go black. Also, maybe you should make the resolution variable. I tried to fix your code a bit to make it the full resolution (used multiple scopes so it could be a larger size window too) but the different scopes got messed up which probably has to do with your time adjustments but I didn't feel like digging that far into it. I'd love to see this in full resolution!