高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】adjusting texture bitmap
adjusting texture bitmap
adjusting texture bitmap
hi
i use the odavebitmap class to receive information of a texture bitmap position and scaling. so, the methods :
odavebitmap::scaleu();
....
and odavebitmap::scalev();
work fine for the map style fit to object, but they return incorrect values if i choose fixed scale map style and set the object size value.
in fact, there is no difference between fit to object and fixed scale - the returned values are the same.
my question is: can i get the object size value and to re-calculate the scale factor?
hi,
if i understand properly, you mean the "adjust material bitmap placement dialog box" in acad. the object size value refers only to preview in dialog and is not used while rendering.
quote:
object size
adjusts the size of the preview cube. you can use this option to preview the number of times the pattern tiles across the render objects. the larger the cube, the more material tiles are displayed.
scale specifies the number of times the bitmap fits onto the object in the u or v direction.
regards,
sergey vishnevetsky
hi,
that was the first thing i supposed but in fact in acad when i used the fixed scale option and the object size was set to some value it changed the scale factor not only for the preview but for the real render action - in dwgdirect the returned scale factor is equal for the fixed scale and fit to object. is it a difference between acad and dwgdirect?
thanks in advance
hi,
let's try to clear the subject up...
quote:
can i get the object size value and to re-calculate the scale factor?
at the moment (in dd 1.13 and previous) the preview objectsize value is missed in ave interface. it will be added in the next dd release.
quote:
in dwgdirect the returned scale factor is equal for the fixed scale and fit to object. is it a difference
between acad and dwgdirect?
in ddt the scale factor is returned/set by the methods:
odavebitmap::scaleu();
odavebitmap::scalev();
odavebitmap::setscaleu();
odavebitmap::setscalev();
independently of the methods:
odavebitmap::fittoobject();
odavebitmap::setfittoobject();
in acad a user can set the "scale" field in "adjust material bitmap placement" dialog box independently of "fixed scale/fit to object" and "object size" options.
quote:
when i used the fixed scale option and the object size was set to some value it changed the scale factor not only for the preview but for the real render action
as i know, the "object size" field does not have an influence on "scale" field in acad "adjust material bitmap placement" dialog box (the same for scale factor stored in file).
could you attach the drawings where the preview "objectsize" field affects real rendering?
regards,
sergey vishnevetsky
hi sergey,
you were right. object_size is used only for the preview. my problem was at another place. the differences between the results in fixed scale and fit to object are provoked by the real object size used for the first mode. this value is ignored for the second mode. i solved the problem by using the oddbentity::getgeomextents().
thank you for the support!
i have antoher question related to some scene settings for the render process: 1. ambient light ; 2. fog functionality.
i have explored the ave classes in the dwgdirect and i've noticed that they are kept in the odavefogopt class(for the fog) and odavepref class(for the ambient light) but i couldn't see how can i get a reference or a pointer to some objects of these classes.
note: for the scene lights i used the global functoin oddbgetlights().
is there anything similar way to get the fog and ambient light data?
thanks in advance
nino
hi,
code:
odaverenderoption renderopt;
renderopt.getrenderoption(pdb);
renderopt.m_pref;
renderopt.m_fogopt;
regards,
sergey vishnevetsky
thanks a lot!
|