Saturn Texture Coordinate Test

RockinB

Established Member
I just wanted to play SEGA GT on Dreamcast to get some fast new cars......but then this idea hit me once again!

Here's the download (binary executable + ISO):

NEW: TC_Saturn_demo3.zip

OLD:

[attachmentid=1365]

[attachmentid=1356]

Posting screenshots is welcome!

From the README.TXT that I could force me to write:

Texture Coordinate Test

for SEGA Saturn by The Rockin'-B, www.rockin-b.de

This demo was entirely made on one evening to demonstrate that my

Saturn Game Tutorial & Demo

http://www.rockin-b.de/saturn/SaturnGameTu...ameTutorial.htm

is indeed doing a good job.

The Saturn hardware can't do texture mapping with texture coordinates. I'm just trying to do it nevertheless...

About & Controls:

You see the source and target texture (each 128x128 pixel, 16 bit) and furthermore a blue rectangle on the source texture and the coordinates of it's 4 corner points.

The target texture is just what is inside the rectangle.

The control pad buttons

X Y

A B

are assigned to the 4 points of the blue rectangle, just like you see it on the screen.

To change a point's position, select the points to move by holding down the assigned button (X Y A B) and then move them with the D-PAD.

Now how holding down one of the buttons L or R will compute the new target texture from the content inside the blue rectangle.

L - let master CPU do computation

R - let slave CPU do computation

You will notice a slight slowdown when activating target texture computation while moving points.

You can do funny things with it!

Rockin'-B

http://www.rockin-b.de
 

Attachments

  • TC_Saturn.zip
    104.8 KB · Views: 156
  • TC_Saturn.zip
    104.8 KB · Views: 155
  • TC_Saturn.zip
    104.8 KB · Views: 161
  • TC_Saturn.zip
    104.8 KB · Views: 161
Originally posted by Rockin'-B@Sat, 2005-07-02 @ 08:41 AM

I just wanted to play SEGA GT on Dreamcast to get some fast new cars......but then this idea hit me once again!

Here's the download (binary executable + ISO):

[attachmentid=1356]

Posting screenshots is welcome!

From the README.TXT that I could force me to write:

[post=136159]Quoted post[/post]​


Nice work Rockin' :cheers can I put your samples and help on the Saturn dev section ?
 
Originally posted by vbt@Sat, 2005-07-02 @ 11:22 AM

Nice work Rockin' :cheers can I put your samples and help on the Saturn dev section ?

[post=136162]Quoted post[/post]​


That would be nice, vbt. :)
 
Anyone got some 3D knowledge to tell us what could all be done with (in-game changeable) texture coordinates?

I'm thinking of better shadows or reflections of clouds, for example.

I don't know enough about environment mapping, but that could be an option, too.

How are these cool shiny car reflections done that are implemented in a lot of Playstation racing games?

word up!
 
(edit: bad thread, talking about rockin'b tutorial)

You really did a very good and usefull work with this demo, conversion tools and tutorial.

About the pcm part, you have this byte in the PCM struct

Uint8 channel ; // PCM Channel Number

I guess it is set by the sgl when you call slPCMon. If it is called two times at the same time with the same PCM*, the channel playing the sound will not be the same, so there is no way to assume that the channel info will be right. So maybe the PCM struct should not be related directly to one sample. This could explain the strange behaviour of slPCMStat, couldn't it.
 
Originally posted by vreuzon+Mon, 2005-07-04 @ 09:57 AM--><div class='quotetop'>QUOTE(vreuzon @ Mon, 2005-07-04 @ 09:57 AM)</div><div class='quotemain'>(edit: bad thread, talking about rockin'b tutorial)

You really did a very good and usefull work with this demo, conversion tools and tutorial.

[/b]


Thanks, vreuzon!

The tutorial will be improved, I think. There was some request. Always good to get feedback from n00bs.

I hope to add depth cueing, linescroll and other stuff once it can be done.

Originally posted by vreuzon@Mon, 2005-07-04 @ 09:57 AM

About the pcm part, you have this byte in the PCM struct

Uint8 channel ; // PCM Channel Number

I guess it is set by the sgl when you call slPCMon. If it is called two times at the same time with the same PCM*, the channel playing the sound will not be the same, so there is no way to assume that the channel info will be right.

[post=136258]Quoted post[/post]​


Yes, playing a PCM sound twice will play the second one on another channel and overwrite the channel variable.

The channel is just an input for slPCMStat(), the SGL gets the playing info from elsewhere.

<!--QuoteBegin-vreuzon
@Mon, 2005-07-04 @ 09:57 AM

So maybe the PCM struct should not be related directly to one sample. This could explain the strange behaviour of slPCMStat, couldn't it.

[post=136258]Quoted post[/post]​

[/quote]

Sorry, I don't exactly understand what you mean here. I have no explanation for the slPCMStat bug. One would have to try it on a small demo to ensure that it's not caused by another hidden bug (I'm pretty sure there is none, hehe).
 
New WIP demo:

[attachmentid=1365]

Realtime mapping of a texture onto a cube using an intermediate surface(select: plane, cylinder or sphere).

Frameskip to balance work of texture mapping and resampling.

I'm having problems with repeating textures in cylinder and sphere mapping:

[attachmentid=1366]

Ideas welcome!

Next I'll work on view dependent texture mapping to enable environment mapping.

That would make the windows of Daytona USA cars much better!
 

Attachments

  • TC_ccw_problem.PNG
    TC_ccw_problem.PNG
    18.3 KB · Views: 120
  • TC_ccw_problem.PNG
    TC_ccw_problem.PNG
    18.3 KB · Views: 123
  • TC_ccw_problem.PNG
    TC_ccw_problem.PNG
    18.3 KB · Views: 120
  • TC_Saturn_demo2.zip
    135.3 KB · Views: 112
  • TC_Saturn_demo2.zip
    135.3 KB · Views: 99
  • TC_Saturn_demo2.zip
    135.3 KB · Views: 98
  • TC_Saturn_demo2.zip
    135.3 KB · Views: 103
  • TC_ccw_problem.PNG
    TC_ccw_problem.PNG
    18.3 KB · Views: 128
I don't know if anybody understands what I'm talking about,

but I could find a solution to the problem described above.

It does require more algorithmic computation, but there is space left to speed up the implementation.

New addition is the possibility to map each texel itself.

This is slower, but enables correct texture generation for faces mapped to problematic texture areas, like the poles in mapping to a sphere.

I hope I get my todo list finished soon to get this done.
 
:rockin:

[attachmentid=1367]
 

Attachments

  • Image1.jpg
    Image1.jpg
    108.7 KB · Views: 143
  • Image1.jpg
    Image1.jpg
    108.7 KB · Views: 146
  • Image1.jpg
    Image1.jpg
    108.7 KB · Views: 146
  • Image1.jpg
    Image1.jpg
    108.7 KB · Views: 142
Thanks for the shot,

but these are only the default textures.

Turn on texture generation by pressing START + A.

Change texture mapping transformations by pressing START + X, START + Y or START + Z.

Change texture mapping style (plane, cylinder, sphere) by pressing START + L and START + R (some frames may be skipped, so press again if nothing changes).
 
:thumbs-up:

[attachmentid=1368]
 

Attachments

  • Image2.jpg
    Image2.jpg
    108.7 KB · Views: 151
  • Image2.jpg
    Image2.jpg
    108.7 KB · Views: 150
  • Image2.jpg
    Image2.jpg
    108.7 KB · Views: 151
  • Image2.jpg
    Image2.jpg
    108.7 KB · Views: 154
Oh yeah, I made massive progress and I'm sort of proud now :) .

I spend a whole night playing my demo on real Saturn hardware to find the reason for strange texture errors.

Well, it finally turned out that -O1 and -O2 optimizations cause texture errors, but -fexpensive_optimizations works!

Antime, have you got a clue which optimization could cause my errors?

What's in:

more 3D models (cube, pyramid, cone, cylinder, sphere),

more mapping methods (all 2d or 3d: plane, cylinder, sphere mapping)

more textures to map (14 nice images from SEGA websites)

polygon select mode for debugging

slave CPU is used

texel throughput can be determined

Controls are manifold, all buttons are used, mostly with button combos.

What's not:

Environment mapping (view dependent) is implemented to 90%.

I'll need to get to know a simple graph coloring algorithm to balance the CPU work across multiple frames.

Some days and I'll release a fine technology demo. It doesn't run alone. Instead you got a lot of things to try out and stuff.

I'm planning to record some images or even short movies with my webcam :D
 
Originally posted by Rockin'-B@Sun, 2005-07-10 @ 05:58 PM

Well, it finally turned out that -O1 and -O2 optimizations cause texture errors, but -fexpensive_optimizations works!

Antime, have you got a clue which optimization could cause my errors?
O1 and O2 should not enable any "dangerous" optimizations, so barring any compiler bugs (always a possibility, esp. for a CPU that's not on the list of primary and secondary platforms) the problem is in your code. Look out for where you break the C spec. and where and how you interface with the hardware.
 
@antime: I can use all named optimizations flags used by -O1...-O3. It must be an unnamed optimization inside. I get no error or warnings. Anyways, for now it works with this bunch of 30 -f flags... .

Here is the new demo #3.

This is the most hottest thing I did for Saturn :banana . But controls are complex...

Download: TC_Saturn_demo3.zip

!!! READ THE README FOR CONTROLS BEFORE PLAYING !!!

Screenshots:

(bad low resolution webcam from flickering TV)

cube_cylinder_pds.png


cube_plane_outrun2_3.png


cylinder_plane_projectrub.png


hover_plane_projectrub.png


hover_plane_projectrub_2.png


sphere_plane_doae.png


sphere_sphere_doae.png


text_HUD.png


Post your own screenshots!
 
Timothy captured a video of the demo#3 running on Saturn.

I applied some DivX compression, here it is:

TC_demo3_tim.avi

(NOTE: doesn't look like on real Saturn due to compression and Satourne bugs like black lines between polygons and slightly triangle distortion of quads)

Thanks for the video, Timothy. I hope to see you at this board soon.
 
Originally posted by Rockin'-B@Tue, 2005-07-12 @ 08:17 AM

Timothy captured a video of the demo#3 running on Saturn.

I applied some DivX compression, here it is:

TC_demo3_tim.avi

(NOTE: doesn't look like on real Saturn due to compression and Satourne bugs like black lines between polygons and slightly triangle distortion of quads)

Thanks for the video, Timothy. I hope to see you at this board soon.

[post=136634]Quoted post[/post]​


Hi everyone, my name is timothy. I figured i should let everyone know i do lurk around here and i hope i showed most of what your program can do with the demo. It is a pretty awesome program Rockin'-B! :bow
 
Welcome @ this board, timothy!

I've taken some of our discussion as you went through SaturnOrbit and the SGT Demo and made FAQs at my board. This will be usefull for other people :newbie ;)

Yesterday I captured a video from real Saturn onto DVD, too. But I'm not a good button-smasher :D . So I will have to do some video editing.

If you want to make another video, that would be cool. Some features are missing in the current one:

- translating an object over still texture in plane mapping mode(START + A)

(hold down A+X and press LEFT/RIGHT/UP/DOWN)

- rotating an object with still texture in cylinder mapping mode(START + B)

(hold down B+Y and press LEFT/RIGHT on the cylinder or cube object, additionally UP/DOWN on cylinder is cool)

- face select mode with text HUD showing face debug stuff (START + LEFT/RIGHT or START + UP/DOWN)
 
Back
Top