Sega Saturn Development > General Jo Engine Help

Making a 'corrected texture' for a triangle.

(1/4) > >>

20EnderDude20:
I've been looking at Sonic Z-Treme, and I've seen many triangular faces that are displaying the entire texture. Ever since, I've been thinking about making a texture become 'corrected', so to speak. I started out with messing around with the distort tool in Flash 8. But later, I thought that I could do this using UV mapping in Blender. however, I've hit a snag. I think UV distortion uses affine transformation, and if I use coordinates that aren't mathematically similar to the face, it won't give the intended result. Is there a solution to this?

ponut64:
This is the concept:
Take your square texture.
Take the bottom right vertice and move it to the same position as the bottom left vertice. Do not merge them.
Done.

You can do this in Adobe Photoshop.

So this texture...


What does this look like, undistorted?
It's this:


How do we pre-distort that .. when we want this:


... I don't know.

XL2:
Ponut is right about that solution, but use caution as even if it has invisible pixels, the Saturn still needs to "render" them, so it can make things way slower quickly. The way around that is to use end codes, which none of my tools support. The other solution is to pre-distort the texture, but again I don't know much about it.

20EnderDude20:
So, the thing that I noticed with 'correcting' a texture for an isosceles right triangle is that you form an isosceles triangle from the pixels that are outside the canvas. as an example, the vertex lines up with the top vertex of the triangle. Here are two triangles. The blue one being the face you're putting it on, and the dashed one being the amount of distortion on the texture.

you can see it's just a mirrored version of the face. This process worked when I tried it on the Saturn, and it's very easy with right triangles, but I never did it on a triangle without a right angle, so that's new territory for me.  ;D I hope this helps.

corvusd:

--- Quote from: XL2 on August 03, 2018, 01:36:15 pm ---Ponut is right about that solution, but use caution as even if it has invisible pixels, the Saturn still needs to "render" them, so it can make things way slower quickly. The way around that is to use end codes, which none of my tools support. The other solution is to pre-distort the texture, but again I don't know much about it.

--- End quote ---

This days assault me this dubt:
Is need it config register=0 Trasparent pixel disable, to avoid draw pixels in a texture/pattern used only to make a mask?
Or can be used End code draw in texture/pattern pixel data to avoid draw this pixels?
Or need both of then "activated"
For CC VDP1 is need both activated. But if you only need a mask texture... what option is the best to gain maxium time or use less cycles?
Wherever, I undestand that is necesary generate the data(pixel data or command table data) for this features to avoid waste cycles in draw VDP1.

Navigation

[0] Message Index

[#] Next page

Sitemap 1 2 3 4 5 6 7 8 9 10 
Go to full version