Drawing to a texture or surface.

Started by
23 comments, last by SiliconMunky 20 years, 4 months ago
Glad that you got it working

D3D doesn''t include a sw alpha blitter because it encourages the use of hardware features to do that. In this case, though, you''d need to create a render target destination, and draw the src into it using a textured quad and d3d alpha blending capabilities - if you were to use a hw "blitter". A bit overkill in this particular situation?

---

I work as a general manager and an agent in a Finnish multimedia studio, which me and my friend found several years ago. Gamedev has been my favourite hobby for over 10 years!

-Nik

Niko Suni

Advertisement
Yeah I was thinking of the possibilities of rendering the view of some alpha blended quads to the texture, but yeah.. that''s definetly overkill I think.

I haven''t got it working yet, because I have to have a usable graphics engine done by the end of this month. So for now I''m going to stick with large pre-rendered textures, and then once things are together I''m going to come back and create the textures on load-up by alpha blending a bunch of tiles and modular parts together.

I was originally going make the textures for the entire terrain pre-rendered. But due to memory constraints we had to ditch that idea.
Have you considered procedural texturing?
By modifying my blitter code to use some other formula than copying the src pixels, you could produce, for example, Perlin noise textures.

The d3dx has much more optimized texture filler for this purpose, though

Procedural textures are very memory-efficient, you can discard them anytime; when needed, just create them back. No need to load any files!

-Nik

Niko Suni

quote:Original post by Nik02
Have you considered procedural texturing?


well the reason I wanted to stay away from more advanced ways of texturing the terrain is because I wanted to keep it as simple as possible for the artists to the create the terrain. Maybe once I''ve got shadows setup decently I''ll come back to making the terrain nicer. But I think this will do for now, as the camera is mostly top down and at a fixed altitude.

Sorry for the late response, i was sick all weekend.
quote:Original post by SiliconMunky
quote:Original post by Nik02
Have you considered procedural texturing?


well the reason I wanted to stay away from more advanced ways of texturing the terrain is because I wanted to keep it as simple as possible for the artists to the create the terrain.


I''m an artist and a programmer myself, didn''t think about that aspect I understand your situation, though; artists don''t usually like tweaking with code.

quote:
Sorry for the late response, i was sick all weekend.


No prob - I had a little flu too, but fortunately for me, it passed away easily :D

-Nik

Niko Suni

This topic is closed to new replies.

Advertisement