News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Simutrans 32-bit graphics — work in progress and open for review

Started by victor_18993, September 05, 2026, 06:37:54 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

victor_18993

Thanks a lot as always for testing it and sharing your feedback. Sorry I've been away due to work. As for the XR32 Project, I think the time has come to start integrating it so we can test it and evolve it better from trunk, as it would make it easier for all of us to make changes and do testing.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)

makie

Quote from: victor_18993 on November 28, 2026, 01:28:47 PMI think the time has come to start integrating it so we can test it and evolve it better from trunk, as it would make it easier for all of us to make changes and do testing.
Agreed

I'm very satisfied with the current state. I think the solution is very successful. It works flawlessly. Good work.

Only one thing:

The new features are only visible when starting with "SIMUTRANS_XR32=1". Could this parameter perhaps also be included in the simuconf.tab of the package? Or could XR32 be automatically activated when it encounters XR32 packages?
------------------
[de]
Zustimmung!

Ich bin sehr zufrieden mit dem derzeitigen Stand. Ich finde die Lösung sehr gelungen. Es funktioniert problemlos. Gute Arbeit.

Einzig:
Die neuen Sachen sieht man nur wenn man mit "SIMUTRANS_XR32=1" startet. Könnte man diesen Parameter vielleicht auch in der simuconf.tab des Paks mitgeben? Oder dass XR32 automatisch aktiv wird wenn es auf XR32 Paks stoßt?

prissi

We have a renderer which can be changed at runtime  (simgraph16 simgraph0, and it was thought of an simgrpah16opengl). So in principle, it could be done at runtime ... but there are some routines which assume something about the size of PIXVAL, like the minimap and the ground blending. The latter would need to become part of the renderer, while the minimap could stay 555 and transformed at runtime. Or the routines manipulating the minimap need to go via gfx too.

makie

Quote from: prissi on November 30, 2026, 11:25:19 AMWe have a renderer which can be changed at runtime  (simgraph16 simgraph0, and it was thought of an simgrpah16opengl). So in principle, it could be done at runtime ... but .....
I don't see any need for a change during runtime.

Only when loading a Pak, it should be activatable by parameter in the simuconf.tab of the Pak. That should be easy to build in.

prissi

I need to review the code of the 32bit patch. But usually, the renderer is already loaded when the pak selector is shown, because that obviously relies on pak files displaying. So it order to have a pakset specific renderer, it needed to be able to be changed.

Also, the idea was that if OpenGL hardware was there, to use the hardware renderer or else the software renderer.


victor_18993

Thank you both for the feedback.
Makie, the latest demonstrations are impressive. It is particularly encouraging to see how 32-bit graphics are already opening new possibilities for pakset artists.

Prissi, I agree that moving towards a renderer-independent architecture would be a sensible long-term direction for Simutrans. The separation of PIXVAL dependencies, minimap rendering and ground blending could also provide a cleaner foundation for future OpenGL support.

I am happy to adapt XR32 to fit this architecture and work towards an incremental integration into trunk, while preserving compatibility with the existing 16-bit renderer and paksets.

We could approach this in stages, keeping the software renderers stable while preparing the common infrastructure for future hardware-accelerated rendering.

XR32 should not be an isolated development branch indefinitely, but a foundation upon which Simutrans can continue to evolve graphically.
Once you have reviewed the code, we can coordinate the next steps and agree on the most appropriate integration strategy.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)

makie

Using a dedicated graphic for nighttime is a brilliant approach. Even with countless special colors, the night watchman would not have been possible. At night, you can omit elements that only exist during the day—such as the shadows cast by objects in sunlight—while adding features like a lantern and its glow, which would look out of place during the day. The trade-off, however, is a valid warning message from `makeobj`.
QuoteWarning: stlab_night:   './Nachtwaechter.png' (472,82) is drawn by day but transparent in the night image: is the night image shifted or cropped?
Another advantage of having a separate night graphic is that it avoids cluttering the daytime graphics with special colors; the results for illuminated windows, in particular, used to look quite unsightly.

Converting an existing daytime graphic into a nighttime version is incredibly simple using GIMP:

You can even save these settings within GIMP for future use.

Once that's done, you can refine the night graphic pixel by pixel to suit your vision and save it as `xxx.night.png`.


-----------
[de]
Die Nutzung einer eigenen Grafik für die Nacht ist genial. Mit auch noch so vielen Sonderfarben wäre der Nachtwächter nicht möglich gewesen. Man kann in der Nacht Dinge weg lassen die es nur am Tag gibt, wie den Schatten den Objekte im Sonnenlicht werfen. Man kann Dinge in der Nacht hinzufügen, wie die Laterne und ihr Lichtschein, die am Tag störend wären. Man bezahlt das allerdings mit einer berechtigten Warnung in makeobj.

Ein weitere Vorteil der eigenständigen Nachtgrafik ist man verunstaltet damit die Taggrafiken nicht mit Sonderfarben. Die Resultate für beleuchtete Fenster waren doch hässlich.

Die Umwandlung einer bestehenden Tag-Grafik in eine Nachtgrafik ist mit GIMP denkbar einfach:

Es ist möglich diese Einstellungen in GIMP zu speichern.

Danach kann man die Nachtgrafik nach seinen Vorstellungen umpixeln und als xxx.night.png abspeichern.

Isaac Eiland-Hall

ooooo, this is fantastic. And I love the idea that headlights might be possible, and taillight glow even, especially for more modern vehicles. Incredible possibilities that would make me turn on the day/night cycle for sure!

prissi

The ground render used rgb anyway, so it is just a make rgb image into pixval image and back routine which need to go into the renderer. And maybe colors for the minimap. I think the separation did already a good job with this.