modifying terra detail map and diffuse map

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
Nickak2003
Goblin
Posts: 272
Joined: Thu Jun 10, 2004 4:19 am
x 26

modifying terra detail map and diffuse map

Post by Nickak2003 »

what would be the best way to modify a terra's detail and diffuse map to implement dynamic splatting? I imagine I would have to grab the textures from a specific terra. Would I have to change them to be like a manual texture, and do:

Code: Select all

	mTexture->scheduleTransitionTo(Ogre::GpuResidency::Resident, &mImage, false);
?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: modifying terra detail map and diffuse map

Post by dark_sylinc »

See Samples/2.0/ApiUsage/UpdatingDecalsAndAreaLightTex sample which updates textures on demand dynamically in 2 different ways.

That sample makes use of reseved poolIds because decals (and textured area lights) have the limitations that all textures must have the same resolution.

However there is no such limitation for Terra, so the reserved pool id part can be ignored.
Lax
Hobgoblin
Posts: 583
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 50

Re: modifying terra detail map and diffuse map

Post by Lax »

Hi Nickack2003,

There is also a topic which deals with terra modifications:
viewtopic.php?t=93495
I also implemented terra highmap modification and splatting.
If you are interested, I could share my code. Its at an early stage and not perfect, but it works so far.
I'm still looking for someeone, which would also investigate time into this topic, so that in future, there would be an editable terra functionality.

I'm also looking for Ocean, but found no implementation for DirectX so far...

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

Lax
Hobgoblin
Posts: 583
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 50

Re: modifying terra detail map and diffuse map

Post by Lax »

Here the code:

https://sourceforge.net/p/nowa-engine/s ... nal/terra/

Its all in the terra.h and terra.cpp

The usage can be found here:

https://sourceforge.net/p/nowa-engine/s ... ponent.cpp

and here for undo/redo:

https://sourceforge.net/p/nowa-engine/s ... anager.cpp

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

Post Reply