Log In  

Demo of 3D lighting and texture mapping.

Cart #feisar-0 | 2019-10-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

updated version without flicker:

Cart #feisar-1 | 2019-10-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

up/down/left/right - orient the model
z - toggle lighting/texture-mapping

P#69313 2019-10-26 15:17 ( Edited 2019-10-28 11:34)

:: dw817

Looks the Feisar from PSX Wipeout. Nice. Option for Lighting+Texture minus flicker ?

P#69322 2019-10-26 16:52 ( Edited 2019-10-26 16:54)
:: jimmi

that's what it is. the flicker is dithering to add more shades - less noticable on the desktop app.

P#69323 2019-10-26 16:58
:: dw817

Definitely noticeable on the PC though. :(

P#69329 2019-10-26 17:42
:: dw817

How about this ? Don't reserve yourself to the 16-colors but use the expanded additional 16 to re-palette the existing 16 for best match to draw your 3D object ? ... and still have option to bypass flicker.

P#69333 2019-10-26 18:54 ( Edited 2019-10-26 18:55)

samey for me on the app though, 30 fps is really not enough for that tech. nice work otherwise!

P#69334 2019-10-26 19:02

Something you could do to make the flicker better is run the cart at 60 fps to update colors, but only update the render every 2 frames. Break that 57% CPU in two parts, 1 in even frames the other on odd frames.

P#69339 2019-10-26 21:46

Super cool, nice work!

It would be amazing to see a whole game made with these visuals - but given the CPU usage from this model alone that sounds like a pretty lofty goal.

P#69341 2019-10-27 00:21
:: dw817

I'm no good with 3D but perhaps two connected trapezoids with no bottom might work, like an inverted V for the racing game. But probably no more than that for the player and opponent ships or it would tax Pico-8's system.


P#69342 2019-10-27 00:51 ( Edited 2019-10-27 00:52)
:: jimmi

personally I prefer the 'flickering' version - but I've uploaded a version without for comparison. It already uses four colours per material, from both the original and extended palettes.

the number of triangles are not the limiting factor - I have flat shading working with 600+ tri models. it is the number of textured pixels, because they require pset to draw to the screen - which is slow compared to rectfill.

P#69396 2019-10-28 11:38 ( Edited 2019-10-28 11:39)
:: dw817

OoOoh ! The non-flicker is awesome ! Starred and favorited.

Really a marvel to see this without flicker now. Can really see and focus on the detail to the ship.

Maybe add option to change background color so you can see this 3D model in different ways where the current dark gray sometimes appears on the ship unfortunately rendering that part invisible.

I also noticed that when the ship is standing on end. Bottom at bottom of screen, top at top of screen, that the CPU exceeds 100%.

I know very little about 3D but ... shouldn't the CPU be the same in all cases with hidden-line removal despite any angle the ship is drawn at ?

P#69404 2019-10-28 15:21 ( Edited 2019-10-28 20:18)
:: jimmi

sorry for late reply.

you're correct about the grey, it's because that shade is a part of the white material ramp.

it won't be the same % from every angle because I'm doing backface culling - and at different angles different numbers of faces are front facing (see the #faces printed on the screen).

P#69520 2019-10-31 12:18

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-06-06 11:29 | 0.026s | 2097k | Q:60