Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Project Mode7 (https://forums.graalonline.com/forums/showthread.php?t=134266427)

DustyPorViva 05-17-2012 10:22 AM

Quote:

Originally Posted by Tricxta (Post 1694877)
Is it creating the reflection only initially or constantly refreshing. If it is constantly refreshing I thought that'd be rather intensive, no?
Also, does this have any lag overall as of yet?

Reflections are all real-time. Intensive? Not really, running fine on my computer(20fps). Quality can be adjusted, lowering the quality will create distortion in the textures, but still mostly playable.

Here, see a video :)



Chances are in final play the scene won't be that zoomed in on the terrain, though.

Tricxta 05-17-2012 11:36 AM

Oh neat, I see what you did there. Seems very smooth as well. Well done, can't wait to mess around with the code.

Hezzy002 05-17-2012 01:31 PM

The horizon renders much further than that in a mode7 racer. Not to be a killjoy, but this is just as far as everyone else gets with mode7 in Graal. The hump has been getting enough texel density to accurately render things further out on the horizon. I think with the new technique you're using it'll be totally possible, though. Best of luck.

Crono 05-17-2012 04:08 PM

looks awesome.

DustyPorViva 05-17-2012 04:10 PM

Quote:

Originally Posted by Hezzy002 (Post 1694886)
The horizon renders much further than that in a mode7 racer. Not to be a killjoy, but this is just as far as everyone else gets with mode7 in Graal. The hump has been getting enough texel density to accurately render things further out on the horizon. I think with the new technique you're using it'll be totally possible, though. Best of luck.

"Chances are in final play the scene won't be that zoomed in on the terrain, though."
http://i.imgur.com/jpojQ.png
Actual racing levels will probably be gmaps, alleviating this issue moreso.

Hezzy002 05-17-2012 05:04 PM

Quote:

Originally Posted by DustyPorViva (Post 1694907)
"Chances are in final play the scene won't be that zoomed in on the terrain, though."
Actual racing levels will probably be gmaps, alleviating this issue moreso.

yeah, I know what you said. I'm just saying as you approach the horizon you have to do more texel samples in order to accomplish the desired effect.

This might not be an issue for you since you can cheap out by just having the GPU do its built-in texture interpolation because you build an image.

I'm also not sure what method you're using, but mode7 isn't a 3D transformation or projection. It's a 2D affine transformation, which is why there's a clearly defined (and perspectively inaccurate) horizon line that appears. If you are doing a 3D transformation, you should just drop it and use the actual formula. It's on Wikipedia in the form of an affine transformation matrix. It'd probably make it very easy to replicate the mode7 results pretty much perfectly.

DustyPorViva 05-18-2012 10:40 PM

I was having a bit of trouble messing around with PFA's version, since it's not something I wrote up so I was fairly unfamiliar with it, and decided to revisit my own to see where I get.

I'm pretty happy with what I eventually ended up with:
http://i.imgur.com/89JkU.png

BlueMelon 05-19-2012 12:28 AM

Quote:

Originally Posted by DustyPorViva (Post 1695017)
I was having a bit of trouble messing around with PFA's version, since it's not something I wrote up so I was fairly unfamiliar with it, and decided to revisit my own to see where I get.

I'm pretty happy with what I eventually ended up with:
http://i.imgur.com/89JkU.png

live demo? ;D

Hezzy002 05-19-2012 01:24 AM

Are you having framerate issues? I see the 3 and have some ideas.

DustyPorViva 05-19-2012 01:29 AM

Quote:

Originally Posted by Hezzy002 (Post 1695025)
Are you having framerate issues? I see the 3 and have some ideas.

I cranked up the quality to 1 polygon per tile simply to make it look nice :) Here's at 16 tiles per polygon:
http://i.imgur.com/y2sdr.png
There's more distortion because of the extreme angle, but honestly I'm okay with that. People with more powerful computers will be able to adjust the quality.

Quote:

Originally Posted by BlueMelon (Post 1695022)
live demo? ;D

Anyone who has access on Testbed can go on and add "Public/DustyPorViva/Mode7" Though I'm still changing things around so don't be surprised if it's not working at any given time.

Hezzy002 05-19-2012 03:34 AM

Quote:

Originally Posted by DustyPorViva (Post 1695027)
I cranked up the quality to 1 polygon per tile simply to make it look nice :) Here's at 16 tiles per polygon:
There's more distortion because of the extreme angle, but honestly I'm okay with that. People with more powerful computers will be able to adjust the quality.

Does it bottleneck during rasterization or transformation with the higher quality?

You could also probably get away by scaling up the polycount for the closer sections.

DustyPorViva 05-19-2012 04:17 AM

Quote:

Originally Posted by Hezzy002 (Post 1695029)
Does it bottleneck during rasterization or transformation with the higher quality?

You could also probably get away by scaling up the polycount for the closer sections.

I was curious and checked it out before. Simply running the loop at 64*64 with no math or rendering drops the fps down to about 8. Then the math/rendering drops it down to 3.

I was thinking about the scaling resolution as well, but that may be WAY too much work.

Chompy 05-19-2012 05:30 AM

I so want to play around with that code. Really good job on it so far! :D

Tim_Rocks 05-19-2012 05:45 AM

Let me play with it ;)

Hezzy002 05-19-2012 03:50 PM

Quote:

Originally Posted by DustyPorViva (Post 1695031)
I was curious and checked it out before. Simply running the loop at 64*64 with no math or rendering drops the fps down to about 8. Then the math/rendering drops it down to 3.

I was thinking about the scaling resolution as well, but that may be WAY too much work.

Wait, no math or rendering as in a 64x64 loop without transformation or rendering? What else are you doing? It sounds like something odd is going on if you're getting significant performance drops from things other than what should most intensive parts.

Unless I'm misunderstanding what you meant by math and rendering, of course.

Putting each polygon on its own layer, or at least ensuring neighboring polygons don't have the same layer should prevent Graal from trying to sort them. Normally Graal sorts images by their bottom left corner, which, at least on some of the older clients, caused huge performance drops because it was done every frame without regard to the previous frame (It should store the new, sorted data so the majority of the stuff is still sorted).

Dynamically scaling up would drastically increase performance and visual quality..


All times are GMT +2. The time now is 04:12 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.